mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/8] ARM: build dtbs during build process using extra-y
Date: Mon, 20 May 2013 16:14:14 +0200	[thread overview]
Message-ID: <1369059260-28872-3-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1369059260-28872-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 arch/arm/Makefile     | 5 -----
 arch/arm/dts/Makefile | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index d506b12..5da0a8f 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -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
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 45a3304..4569e3d 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -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
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-05-20 14:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 14:14 [PATCH] devicetree misc updates Sascha Hauer
2013-05-20 14:14 ` [PATCH 1/8] ARM: dtb: Add $(obj)/$(BUILTIN_DTB).dtb.S as secondary target Sascha Hauer
2013-05-20 14:14 ` Sascha Hauer [this message]
2013-05-20 14:14 ` [PATCH 3/8] scripts: fixdep: update from v3.10-rc1 Sascha Hauer
2013-05-20 14:14 ` [PATCH 4/8] kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp Sascha Hauer
2013-05-20 14:14 ` [PATCH 5/8] of: When checking for existing devices also check resource end Sascha Hauer
2013-05-20 14:14 ` [PATCH 6/8] of: Call of_add_memory from of_probe Sascha Hauer
2013-05-20 14:14 ` [PATCH 7/8] of: Add of_match_node function Sascha Hauer
2013-05-20 14:14 ` [PATCH 8/8] of: populate devices based on "simple-bus" property Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369059260-28872-3-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox