From patchwork Thu Sep 27 08:10:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Genoud X-Patchwork-Id: 1512371 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 B1A5240079 for ; Thu, 27 Sep 2012 08:12:57 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TH9Ba-0006Qa-SW; Thu, 27 Sep 2012 08:11:06 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TH9BW-0006Q7-BO for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2012 08:11:04 +0000 Received: by wgbgg4 with SMTP id gg4so183936wgb.18 for ; Thu, 27 Sep 2012 01:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=vDkszb2G3+8fYfEKh8wui6lU1tKXjDHsiwVLvW0FMEQ=; b=Uc/wg295C1o2JVBaDwwMGLONtXSnOYroXAccbCBCm/N1FT/e08iE/8HTPua3Ubobem 4z95wHnjgiyrzOCrsarJtWaO9F1eyoqShR+FiRw3JCDRHtwUtOnUYPyFa7NMpKhARMij aETJEY4oMiracLJQ34ZB0fYF7hgHRzIKRopjD3Y6kfSYA7jrPWNjxGJaaAJCod6mD0dg wU1mIUq/9JkwwYUJ+H6j++hVynpsAWBjHBT3OLdScHYZ9ChCOkyFiXZhgbArAFp8Z+2Z G0bXrDpMUiqrvIpGYiJ2GpMXBi46G4jOwdriW51dDyNWwXt7KZDeh6XpdIBCDbUdn4C+ uvPw== Received: by 10.216.214.209 with SMTP id c59mr961902wep.214.1348733459899; Thu, 27 Sep 2012 01:10:59 -0700 (PDT) Received: from localhost.localdomain (lyon.paratronic.fr. [213.41.177.106]) by mx.google.com with ESMTPS id ga2sm11820200wib.2.2012.09.27.01.10.58 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 01:10:59 -0700 (PDT) From: Richard Genoud To: Grant Likely , Rob Herring , Michal Marek Subject: [PATCH RESEND] ARM: add dtbImage.
and dtbuImage.
rules Date: Thu, 27 Sep 2012 10:10:41 +0200 Message-Id: <1348733441-11626-1-git-send-email-richard.genoud@gmail.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <504DFBBF.5010202@free-electrons.com> References: <504DFBBF.5010202@free-electrons.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (richard.genoud[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 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] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Richard Genoud , devicetree-discuss@lists.ozlabs.org, Russell King , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.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: , 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 [add Grant Likely and Rob Herring in To: since this is maybe more OF related than ARM related] This rules are useful for appended device tree conforming to the CONFIG_ARM_APPENDED_DTB kernel option. The rule dtbImage.
is actually just a: cat zImage
.dtb > dtbImage.
The dtbuImage.
makes an uImage out of the dtbImage.
file. KernelVersion: v3.6-rc5 Signed-off-by: Richard Genoud Tested-by: Gregory CLEMENT --- arch/arm/Makefile | 30 ++++++++++++++++-------------- arch/arm/boot/Makefile | 11 +++++++++++ scripts/Makefile.lib | 6 ++++++ 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 30eae87..c5f2673 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -278,7 +278,7 @@ archprepare: # Convert bzImage to zImage bzImage: zImage -zImage Image xipImage bootpImage uImage: vmlinux +zImage Image xipImage bootpImage uImage dtbImage.% dtbuImage.% : vmlinux $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ zinstall uinstall install: vmlinux @@ -300,17 +300,19 @@ i zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ define archhelp - echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' - echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' - echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' - echo ' uImage - U-Boot wrapped zImage' - echo ' bootpImage - Combined zImage and initial RAM disk' - echo ' (supply initrd image via make variable INITRD=)' - echo ' dtbs - Build device tree blobs for enabled boards' - echo ' install - Install uncompressed kernel' - echo ' zinstall - Install compressed kernel' - echo ' uinstall - Install U-Boot wrapped compressed kernel' - echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' - echo ' (distribution) /sbin/$(INSTALLKERNEL) or' - echo ' install to $$(INSTALL_PATH) and run lilo' + echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' + echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' + echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' + echo ' uImage - U-Boot wrapped zImage' + echo ' bootpImage - Combined zImage and initial RAM disk' + echo ' (supply initrd image via make variable INITRD=)' + echo ' dtbs - Build device tree blobs for enabled boards' + echo ' dtbImage.
- zImage with an appended device tree blob' + echo ' dtbuImage.
- uImage with an embedded device tree blob' + echo ' install - Install uncompressed kernel' + echo ' zinstall - Install compressed kernel' + echo ' uinstall - Install U-Boot wrapped compressed kernel' + echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' + echo ' (distribution) /sbin/$(INSTALLKERNEL) or' + echo ' install to $$(INSTALL_PATH) and run lilo' endef diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index c877087..35c01a8 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -98,6 +98,17 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(call if_changed,objcopy) @echo ' Kernel: $@ is ready' +# dtbImage.% - a dtbImage is a zImage with an appended device tree blob +$(obj)/dtbImage.%: $(obj)/zImage $(obj)/%.dtb FORCE + $(call if_changed,cat) + @echo ' Kernel: $@ is ready' + +# dtbuImage.% - a dtbuImage is a uImage with an embedded device tree blob +$(obj)/dtbuImage.%: $(obj)/dtbImage.% FORCE + @$(check_for_multiple_loadaddr) + $(call if_changed,uimage) + @echo ' Image $@ is ready' + PHONY += initrd FORCE initrd: @test "$(INITRD_PHYS)" != "" || \ diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 0be6f11..8550466 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -235,6 +235,12 @@ cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \ quiet_cmd_objcopy = OBJCOPY $@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ +# Cat +# --------------------------------------------------------------------------- + +quiet_cmd_cat = CAT $@ +cmd_cat = (cat $(filter-out FORCE,$^) > $@) || (rm -f $@ ; false) + # Gzip # ---------------------------------------------------------------------------