Thread (16 messages) 16 messages, 4 authors, 2018-10-01

Re: [PATCH v3 6/9] kbuild: consolidate Devicetree dtb build rules

From: Masahiro Yamada <hidden>
Date: 2018-10-01 05:49:50
Also in: linux-arm-kernel, linux-devicetree, linux-kbuild, linux-mips, lkml

Hi Rob,


2018年9月29日(土) 0:43 Rob Herring [off-list ref]:
+#
---------------------------------------------------------------------------
+# Devicetree files
+
+ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),)
+dtstree := arch/$(SRCARCH)/boot/dts
+endif
+
+ifneq ($(dtstree),)
+
+%.dtb : scripts_dtc
%.dtb: prepare3 prepare


because we need to make sure KERNELRELEASE
is correctly defined before dtbs_install happens.

+       $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
+
+PHONY += dtbs dtbs_install
+dtbs: scripts_dtc

dtbs: prepare3 scripts_dtc


+       $(Q)$(MAKE) $(build)=$(dtstree)
+
+dtbs_install: dtbs

Please do not have dtbs_install to depend on dtbs.

No install targets should ever trigger building anything
in the source tree.


For the background, see the commit log of
19514fc665ffbce624785f76ee7ad0ea6378a527



+       $(Q)$(MAKE) $(dtbinst)=$(dtstree)
+
+ifdef CONFIG_OF_EARLY_FLATTREE
+all: dtbs
+endif
+
+endif
+
+PHONY += scripts_dtc
+scripts_dtc: scripts_basic
+       $(Q)$(MAKE) $(build)=scripts/dtc
+
 #
---------------------------------------------------------------------------
 # Modules

-- 
Best Regards
Masahiro Yamada
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help