From patchwork Mon Sep 10 13:38:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Genoud X-Patchwork-Id: 1432331 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 16F5540220 for ; Mon, 10 Sep 2012 13:42:08 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TB4CQ-0000f7-Ft; Mon, 10 Sep 2012 13:38:50 +0000 Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TB4CM-0000ek-VO for linux-arm-kernel@lists.infradead.org; Mon, 10 Sep 2012 13:38:47 +0000 Received: by weyr3 with SMTP id r3so1299283wey.36 for ; Mon, 10 Sep 2012 06:38:45 -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; bh=8nXZKfkFvArx8S/mhiL/vkhPw0eV3xatRx2kmbeH1P4=; b=LyraNqoW/kWsI03bt4uJvAliL6pXWOIjtTURi1zL2xGDiNBnhOqW6EPNIrvcpMPFxi mrJC1MrUvdX7FQZWo31w+RrSZwRkKLFTqcBhxQ2QBsAwoKMH9b/4NW5C7eZI3Li14wfE OYk6wdNl3cTm+YtBCluExdE1f03xFg2ViZjf/yxigFWtULWhi6+UjxQjDlPkQ9kTThpm xeihAfMaNN8YFBOQSHtSOgexqOy0WTxK9WmOmGbsyuZ0R7goIyhse4BQ3xFN0nhVunBe uiBK6QKj1yLeUvfS1tN77PfJhnGtwN/5zgPahqjpx+31FItEwwjV2VhEeIRXcygzQk6p fJ9Q== Received: by 10.180.100.35 with SMTP id ev3mr17330077wib.7.1347284325422; Mon, 10 Sep 2012 06:38:45 -0700 (PDT) Received: from localhost.localdomain (lyon.paratronic.fr. [213.41.177.106]) by mx.google.com with ESMTPS id fb20sm25443687wid.1.2012.09.10.06.38.42 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Sep 2012 06:38:43 -0700 (PDT) From: Richard Genoud To: Michal Marek , Russell King Subject: [PATCH] ARM: add dtbImage.
and dtbuImage.
rules Date: Mon, 10 Sep 2012 15:38:33 +0200 Message-Id: <1347284313-2857-1-git-send-email-richard.genoud@gmail.com> X-Mailer: git-send-email 1.7.2.5 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.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (richard.genoud[at]gmail.com) -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 , 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 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 --- 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 # ---------------------------------------------------------------------------