24b11387e6f8e9c0f38af02b06a633c4fae616ef
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0316-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch
1 From 7542fb08d2726606057c4283b3a454abb195a0f5 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 23 Sep 2019 09:26:41 +0100
4 Subject: [PATCH] kbuild: Allow .dtbo overlays to be built piecemeal
5
6 Before 4.20, it was possible to build an arbitrary overlay by copying
7 it to arm/boot/dts/overlays/mytest-overlay.dts and running:
8
9 make ARCH=arm overlays/mytest.dtbo
10
11 In 4.20 the .dtb build rules were centralised, requiring the dowstream
12 .dtbo build rules to be changed. They were, enough to support "make ...
13 dtbs", but not sufficiently to allow this ad-hoc, one-off building of
14 individual files.
15
16 Add the missing makefile rule to support this way of building.
17
18 See: https://github.com/raspberrypi/linux/issues/3250
19
20 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
21 ---
22 Makefile | 3 +++
23 1 file changed, 3 insertions(+)
24
25 --- a/Makefile
26 +++ b/Makefile
27 @@ -1246,6 +1246,9 @@ ifneq ($(dtstree),)
28 %.dtb: include/config/kernel.release scripts_dtc
29 $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
30
31 +%.dtbo: prepare3 scripts_dtc
32 + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
33 +
34 PHONY += dtbs dtbs_install dtbs_check
35 dtbs: include/config/kernel.release scripts_dtc
36 $(Q)$(MAKE) $(build)=$(dtstree)