From patchwork Sat Apr 2 10:39:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 886 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:47:03 -0000 Delivered-To: patches@linaro.org Received: by 10.68.42.69 with SMTP id m5cs7356pbl; Sat, 2 Apr 2011 03:36:15 -0700 (PDT) Received: by 10.150.200.6 with SMTP id x6mr5378377ybf.110.1301740574670; Sat, 02 Apr 2011 03:36:14 -0700 (PDT) Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id v41si4286669yba.1.2011.04.02.03.36.12 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 02 Apr 2011 03:36:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by pxi6 with SMTP id 6so2858766pxi.17 for ; Sat, 02 Apr 2011 03:36:12 -0700 (PDT) Received: by 10.142.161.11 with SMTP id j11mr4127622wfe.208.1301740572255; Sat, 02 Apr 2011 03:36:12 -0700 (PDT) Received: from localhost.localdomain ([114.216.147.29]) by mx.google.com with ESMTPS id y2sm4229896wfd.20.2011.04.02.03.36.05 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 02 Apr 2011 03:36:11 -0700 (PDT) From: Shawn Guo To: linux-arm-kernel@lists.infradead.org Cc: devicetree-discuss@lists.ozlabs.org, linaro-kernel@lists.linaro.org, patches@linaro.org, Shawn Guo Subject: [PATCH] arm/dt: Add a make rule to build dtb for enabled platform Date: Sat, 2 Apr 2011 18:39:43 +0800 Message-Id: <1301740783-23147-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.1 It's based on commit fe8e6d0b0e601ca0a63fe768d4b812d5a45a9da7 "arm/dt: Add dtb make rule" from Rob Herring. With 'make ARCH=arm dtb', it builds Device Tree Blobs for those platforms enabled by CONFIG. Signed-off-by: Shawn Guo --- This patch works against Linaro kernel tree. But it needs to go through mainline review before it gets applied. arch/arm/Makefile | 3 +++ arch/arm/boot/Makefile | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index d51ab6c..7fd2af9 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -292,6 +292,9 @@ zinstall uinstall install: vmlinux %.dtb: $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ +dtb: + $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ + # We use MRPROPER_FILES and CLEAN_FILES now archclean: $(Q)$(MAKE) $(clean)=$(boot) diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 08fc37f..dcea984 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -63,6 +63,20 @@ endif $(obj)/%.dtb: $(src)/dts/%.dts $(call cmd,dtc) +dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb +dtb-$(CONFIG_MACH_MX51_BABBAGE) += mx51-babbage.dtb +dtb-$(CONFIG_MACH_MX51_EFIKAMX) += genesi-efikamx.dtb +dtb-$(CONFIG_MACH_MX51_EFIKASB) += genesi-efikasb.dtb +dtb-$(CONFIG_MACH_MX53_LOCO) += mx53-loco.dtb +dtb-$(CONFIG_MACH_OMAP3_BEAGLE) += omap3-beagle.dtb +dtb-$(CONFIG_MACH_OMAP4_PANDA) += omap4-panda.dtb +dtb-$(CONFIG_MACH_OVERO) += omap3-overo.dtb +dtb-$(CONFIG_MACH_SMDKV310) += exynos4-smdkv310.dtb +dtb-$(CONFIG_ARCH_VERSATILE_PB) += versatile-pb.dtb +dtb-$(CONFIG_MACH_VERSATILE_AB) += versatile-ab.dtb + +$(obj)/dtb: $(addprefix $(obj)/, $(dtb-y)) + quiet_cmd_uimage = UIMAGE $@ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ -C none -a $(LOADADDR) -e $(STARTADDR) \