[PATCH] Makefile: add support to build dedicated devicetree

Add the support to build a dedicated devicetree located in arch/$(ARCH)/dts This devicetree does not need to be listed in the relevant devicetree makefile.
Just run the following command to build the foo devicetree placed before at the right path: $ make foo.dtb
Signed-off-by: Kory Maincent kory.maincent@bootlin.com --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/Makefile b/Makefile index 027e31e09e..2ebeaee515 100644 --- a/Makefile +++ b/Makefile @@ -1136,6 +1136,12 @@ dtbs: dts/dt.dtb dts/dt.dtb: u-boot $(Q)$(MAKE) $(build)=dts dtbs
+ifneq ($(wildcard $(srctree)/arch/$(ARCH)/dts/),) +dtstree := arch/$(ARCH)/dts +%.dtb: u-boot + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ +endif + quiet_cmd_copy = COPY $@ cmd_copy = cp $< $@
participants (1)
-
Kory Maincent