ARM: build dtbs during build process using extra-y
When using a builtin dtb the builtin dtb is built twice, once from as a dependency of the 'dtbs' target and once as a dependency of the corresponding dtb.o target. This can happen in parallel with parallel make which results in build corruption when two processes try to generate the dtb at the same time. Typical errors include: fixdep: error opening depfile: arch/arm/dts/.imx51-babbage.dtb.d: No such file or directory make[1]: *** [arch/arm/dts/imx51-babbage.dtb] Error 2 fixdep: arch/arm/dts/.imx51-babbage.dtb.d is empty mv: cannot stat `arch/arm/dts/.imx51-babbage.dtb.tmp': No such file or directory make[1]: *** [arch/arm/dts/imx51-babbage.dtb] Error 1 To fix this build the devicetree blobs using extra-y instead of a separate target. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
5c294b6416
commit
a56472209f
|
@ -274,11 +274,6 @@ dts := arch/arm/dts
|
|||
%.dtb: scripts
|
||||
$(Q)$(MAKE) $(build)=$(dts) $(dts)/$@
|
||||
|
||||
dtbs: scripts
|
||||
$(Q)$(MAKE) $(build)=$(dts) dtbs
|
||||
|
||||
KBUILD_DTBS := dtbs
|
||||
|
||||
KBUILD_IMAGE ?= $(KBUILD_BINARY)
|
||||
|
||||
archprepare: maketools
|
||||
|
|
|
@ -7,6 +7,6 @@ obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
|
|||
targets += dtbs
|
||||
targets += $(dtb-y)
|
||||
|
||||
dtbs: $(addprefix $(obj)/, $(dtb-y))
|
||||
extra-y += $(dtb-y)
|
||||
|
||||
clean-files := *.dtb *.dtb.S
|
||||
|
|
Loading…
Reference in New Issue