From: Catalin Marinas <catalin.marinas@arm.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Michal Marek <mmarek@suse.cz>,
Grant Likely <grant.likely@secretlab.ca>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
Sam Ravnborg <sam@ravnborg.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Stephen Warren <swarren@nvidia.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V7 3/7] arm64: use new common dtc rule
Date: Thu, 29 Nov 2012 14:30:41 +0000 [thread overview]
Message-ID: <20121129143041.GC30437@arm.com> (raw)
In-Reply-To: <1354058956-7199-3-git-send-email-swarren@wwwdotorg.org>
[-- Attachment #1: Type: text/plain, Size: 938 bytes --]
On Tue, Nov 27, 2012 at 11:29:12PM +0000, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> The current rules have the .dtb files build in a different directory
> from the .dts files. This patch changes arm64 to use the generic dtb
> rule which builds .dtb files in the same directory as the source .dts.
>
> This requires moving parts of arch/arm64/boot/Makefile into newly created
> arch/arm64/boot/dts/Makefile, and updating arch/arm64/Makefile to call the
> new Makefile.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
I had a bit more clean-up in a local patch (see attached). Depending on
the timing, you can just fold it into your patch (basically removing the
MACHINE argument, adding KBUILD_DTBS and dtbs target help). It's been
derived from your arch/arm patch anyway ;).
--
Catalin
[-- Attachment #2: 0001-arm64-Add-dtbs-target-for-building-all-the-enabled-d.patch --]
[-- Type: text/x-diff, Size: 3068 bytes --]
From 906ea5523f1a5c2fadea72b54d5d6a8e5fecdfe5 Mon Sep 17 00:00:00 2001
From: Catalin Marinas <catalin.marinas@arm.com>
Date: Wed, 21 Nov 2012 11:44:59 +0000
Subject: [PATCH] arm64: Add dtbs target for building all the enabled dtb
files
Based on Rob Herring's patches for arch/arm, this patch adds a dtbs
target to arch/arm64/boot/Makefile.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
arch/arm64/Makefile | 17 +++++++++++------
arch/arm64/boot/.gitignore | 1 +
arch/arm64/boot/Makefile | 6 ++++++
3 files changed, 18 insertions(+), 6 deletions(-)
create mode 100644 arch/arm64/boot/dts/Makefile
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 93e871e..ddadd27 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -42,20 +42,24 @@ libs-y := arch/arm64/lib/ $(libs-y)
libs-y += $(LIBGCC)
# Default target when executing plain make
-KBUILD_IMAGE := Image.gz
+KBUILD_IMAGE := Image.gz
+KBUILD_DTBS := dtbs
-all: $(KBUILD_IMAGE)
+all: $(KBUILD_IMAGE) $(KBUILD_DTBS)
boot := arch/arm64/boot
Image Image.gz: vmlinux
- $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
zinstall install: vmlinux
- $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
+ $(Q)$(MAKE) $(build)=$(boot) $@
-%.dtb:
- $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+%.dtb: scripts
+ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+
+dtbs: scripts
+ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
@@ -64,6 +68,7 @@ archclean:
define archhelp
echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
+ echo '* dtbs - Build device tree blobs for enabled boards'
echo ' install - Install uncompressed kernel'
echo ' zinstall - Install compressed kernel'
echo ' Install using (your) ~/bin/installkernel or'
diff --git a/arch/arm64/boot/.gitignore b/arch/arm64/boot/.gitignore
index 8dab0bb..98af90a 100644
--- a/arch/arm64/boot/.gitignore
+++ b/arch/arm64/boot/.gitignore
@@ -1,2 +1,3 @@
Image
Image.gz
+*.dtb
diff --git a/arch/arm64/boot/Makefile b/arch/arm64/boot/Makefile
index 20048be..ce8642e 100644
--- a/arch/arm64/boot/Makefile
+++ b/arch/arm64/boot/Makefile
@@ -14,6 +14,8 @@
# Based on the ia64 boot/Makefile.
#
+include $(srctree)/arch/arm64/boot/dts/Makefile
+
targets := Image Image.gz
$(obj)/Image: vmlinux FORCE
@@ -22,6 +24,10 @@ $(obj)/Image: vmlinux FORCE
$(obj)/Image.gz: $(obj)/Image FORCE
$(call if_changed,gzip)
+targets += $(dtb-y)
+
+$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
+
install: $(obj)/Image
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
$(obj)/Image System.map "$(INSTALL_PATH)"
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
new file mode 100644
index 0000000..e69de29
next prev parent reply other threads:[~2012-11-29 14:30 UTC|newest]
Thread overview: 31+ 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 ` [PATCH V7 2/7] ARM: dt: change .dtb build rules to build in dts directory Stephen Warren
2012-11-27 23:29 ` Stephen Warren
2012-11-27 23:50 ` 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-26 14:27 ` Shawn Guo
2012-12-29 0:43 ` Stephen Warren
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-27 23:29 ` Stephen Warren
2012-11-29 14:30 ` Catalin Marinas [this message]
2012-12-03 17:27 ` Stephen Warren
2012-11-27 23:29 ` [PATCH V7 4/7] openrisc: " Stephen Warren
2012-11-27 23:29 ` Stephen Warren
2012-11-27 23:29 ` [PATCH V7 5/7] c6x: " Stephen Warren
2012-11-27 23:29 ` 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 ` 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 17:44 ` Catalin Marinas
2012-11-28 18:33 ` Stephen Warren
2012-11-28 23:28 ` Benjamin Herrenschmidt
2012-11-28 23:28 ` Benjamin Herrenschmidt
2012-11-30 16:01 ` Rob Herring
2012-11-30 19:34 ` Stephen Warren
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=20121129143041.GC30437@arm.com \
--to=catalin.marinas@arm.com \
--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=mmarek@suse.cz \
--cc=rob.herring@calxeda.com \
--cc=sam@ravnborg.org \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.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;
as well as URLs for NNTP newsgroup(s).