From patchwork Thu Nov 29 14:30:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 1821491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 01ABFDF23A for ; Thu, 29 Nov 2012 14:36:18 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Te58g-0006IZ-1g; Thu, 29 Nov 2012 14:30:54 +0000 Received: from service87.mimecast.com ([91.220.42.44]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Te58b-0006Gh-SY for linux-arm-kernel@lists.infradead.org; Thu, 29 Nov 2012 14:30:51 +0000 Received: from emea-cam-gw1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) (Using TLS) by service87.mimecast.com; Thu, 29 Nov 2012 14:30:46 +0000 Received: from arm.com (10.1.2.13) by emea-cam-gw1.Emea.Arm.com (10.1.248.203) with Microsoft SMTP Server (TLS) id 8.2.254.0; Thu, 29 Nov 2012 14:30:44 +0000 Date: Thu, 29 Nov 2012 14:30:41 +0000 From: Catalin Marinas To: Stephen Warren Subject: Re: [PATCH V7 3/7] arm64: use new common dtc rule Message-ID: <20121129143041.GC30437@arm.com> References: <1354058956-7199-1-git-send-email-swarren@wwwdotorg.org> <1354058956-7199-3-git-send-email-swarren@wwwdotorg.org> MIME-Version: 1.0 In-Reply-To: <1354058956-7199-3-git-send-email-swarren@wwwdotorg.org> Thread-Topic: [PATCH V7 3/7] arm64: use new common dtc rule Accept-Language: en-GB, en-US Content-Language: en-US User-Agent: Mutt/1.5.20 (2009-06-14) X-MC-Unique: 112112914304601901 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121129_093050_232622_498B7E42 X-CRM114-Status: GOOD ( 18.49 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [91.220.42.44 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Michal Marek , "linux-arch@vger.kernel.org" , Stephen Warren , "linux-kernel@vger.kernel.org" , "rob.herring@calxeda.com" , Grant Likely , Sam Ravnborg , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Tue, Nov 27, 2012 at 11:29:12PM +0000, Stephen Warren wrote: > From: Stephen Warren > > 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 > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Stephen Warren 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 ;). From 906ea5523f1a5c2fadea72b54d5d6a8e5fecdfe5 Mon Sep 17 00:00:00 2001 From: Catalin Marinas 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 --- 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