From patchwork Fri Dec 7 21:06:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 1851751 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id B72493FC71 for ; Fri, 7 Dec 2012 21:10:48 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Th58q-0002jp-P4; Fri, 07 Dec 2012 21:07:28 +0000 Received: from service87.mimecast.com ([91.220.42.44]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Th58B-0002dm-3X for linux-arm-kernel@lists.infradead.org; Fri, 07 Dec 2012 21:06:50 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 07 Dec 2012 21:06:42 +0000 Received: from e102109-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 7 Dec 2012 21:06:41 +0000 From: Catalin Marinas To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/7] arm64: Add dtbs target for building all the enabled dtb files Date: Fri, 7 Dec 2012 21:06:27 +0000 Message-Id: <1354914392-9634-3-git-send-email-catalin.marinas@arm.com> X-Mailer: git-send-email 1.7.12.3 In-Reply-To: <1354914392-9634-1-git-send-email-catalin.marinas@arm.com> References: <1354914392-9634-1-git-send-email-catalin.marinas@arm.com> X-OriginalArrivalTime: 07 Dec 2012 21:06:41.0888 (UTC) FILETIME=[C1800600:01CDD4BE] X-MC-Unique: 112120721064203901 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121207_160647_448124_A581A630 X-CRM114-Status: GOOD ( 10.28 ) 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] 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Based on Rob Herring's patches for arch/arm, this patch adds a dtbs target to arch/arm64/boot/Makefile. In the process, also clean up the unused MACHINE variable. Signed-off-by: Catalin Marinas --- I'll drop this patch once Rob pushes his version into linux-next (or mainline). arch/arm64/Makefile | 17 +++++++++++------ arch/arm64/boot/.gitignore | 1 + arch/arm64/boot/Makefile | 8 +++++++- 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 arch/arm64/boot/dts/Makefile diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 364191f..64089bc 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -41,20 +41,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: @@ -63,6 +67,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 eca209b..1ab9bf1 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,9 +24,13 @@ $(obj)/Image: vmlinux FORCE $(obj)/Image.gz: $(obj)/Image FORCE $(call if_changed,gzip) -$(obj)/%.dtb: $(src)/dts/%.dts +targets += $(dtb-y) + +$(obj)/%.dtb: $(src)/dts/%.dts FORCE $(call cmd,dtc) +$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) + install: $(obj)/Image $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ $(obj)/Image System.map "$(INSTALL_PATH)"