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: 1512201 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 35E1E40079 for ; Thu, 27 Sep 2012 08:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755068Ab2I0ILI (ORCPT ); Thu, 27 Sep 2012 04:11:08 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:45352 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753736Ab2I0ILB (ORCPT ); Thu, 27 Sep 2012 04:11:01 -0400 Received: by weyt9 with SMTP id t9so457017wey.19 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 Cc: Russell King , devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, Richard Genoud 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> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.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 # ---------------------------------------------------------------------------