mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Michal Marek <mmarek@suse.cz>,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Russell King <linux@arm.linux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
	linux-arm-kernel@lists.infradead.org,
	Stephen Warren <swarren@nvidia.com>
Subject: [PATCH V7 2/7] ARM: dt: change .dtb build rules to build in dts directory
Date: Tue, 27 Nov 2012 16:29:11 -0700	[thread overview]
Message-ID: <1354058956-7199-2-git-send-email-swarren@wwwdotorg.org> (raw)
In-Reply-To: <1354058956-7199-1-git-send-email-swarren@wwwdotorg.org>

From: Grant Likely <grant.likely@secretlab.ca>

The current rules have the .dtb files build in a different directory
from the .dts files. The only reason for this is that it was what
PowerPC has done historically. This patch changes ARM to use the generic
dtb rule which builds .dtb files in the same directory as the source .dts.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
[swarren: added rm command for old stale .dtb files]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v7: New patch.
---
 arch/arm/Makefile          |    4 ++--
 arch/arm/boot/Makefile     |   12 ------------
 arch/arm/boot/dts/Makefile |    8 ++++++++
 3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 1ec5f67..5f92252 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -291,10 +291,10 @@ zinstall uinstall install: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
 
 %.dtb: scripts
-	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
 
 dtbs: scripts
-	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs
 
 # We use MRPROPER_FILES and CLEAN_FILES now
 archclean:
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index 9137df5..abfce28 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -15,8 +15,6 @@ ifneq ($(MACHINE),)
 include $(srctree)/$(MACHINE)/Makefile.boot
 endif
 
-include $(srctree)/arch/arm/boot/dts/Makefile
-
 # Note: the following conditions must always be true:
 #   ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
 #   PARAMS_PHYS must be within 4MB of ZRELADDR
@@ -59,16 +57,6 @@ $(obj)/zImage:	$(obj)/compressed/vmlinux FORCE
 
 endif
 
-targets += $(dtb-y)
-
-# Rule to build device tree blobs
-$(obj)/%.dtb: $(src)/dts/%.dts FORCE
-	$(call if_changed_dep,dtc)
-
-$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
-
-clean-files := *.dtb
-
 ifneq ($(LOADADDR),)
   UIMAGE_LOADADDR=$(LOADADDR)
 else
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a17d5ab..cb217f8 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -136,4 +136,12 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
 	wm8650-mid.dtb
 dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb
 
+targets += dtbs
 endif
+
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+	# *.dtb used to be generated in the directory above. Clean out the
+	# old build results so people don't accidentally use them.
+	rm -f $(obj)/../*.dtb
+
+clean-files := *.dtb
-- 
1.7.10.4


  reply	other threads:[~2012-11-27 23:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 23:29 [PATCH V7 1/7] kbuild: centralize .dts->.dtb rule Stephen Warren
2012-11-27 23:29 ` Stephen Warren [this message]
2012-11-27 23:50   ` [PATCH V7 2/7] ARM: dt: change .dtb build rules to build in dts directory Olof Johansson
2012-12-03 16:15   ` Rob Herring
2012-12-03 17:26     ` Stephen Warren
2012-12-26 14:27   ` Shawn Guo
2012-12-29  0:43     ` Stephen Warren
2012-11-27 23:29 ` [PATCH V7 3/7] arm64: use new common dtc rule Stephen Warren
2012-11-29 14:30   ` Catalin Marinas
2012-12-03 17:27     ` Stephen Warren
2012-11-27 23:29 ` [PATCH V7 4/7] openrisc: " Stephen Warren
2012-11-27 23:29 ` [PATCH V7 5/7] c6x: " Stephen Warren
2012-11-28 18:09   ` Mark Salter
2012-11-27 23:29 ` [PATCH V7 6/7] microblaze: " Stephen Warren
2012-11-27 23:29 ` [PATCH V7 7/7] xtensa: " Stephen Warren
2012-11-28 17:44 ` [PATCH V7 1/7] kbuild: centralize .dts->.dtb rule Catalin Marinas
2012-11-28 18:33 ` Stephen Warren
2012-11-28 23:28   ` Benjamin Herrenschmidt
2012-11-30 16:01 ` Rob Herring
2012-11-30 19:34   ` Stephen Warren
2012-12-01  4:43   ` Max Filippov

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=1354058956-7199-2-git-send-email-swarren@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=arnd@arndb.de \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mmarek@suse.cz \
    --cc=olof@lixom.net \
    --cc=rob.herring@calxeda.com \
    --cc=sam@ravnborg.org \
    --cc=swarren@nvidia.com \
    /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

all inboxes | Powered by JetHome®