From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: Michal Marek <mmarek@suse.cz>,
Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] ARM: add dtbImage.<dt> and dtbuImage.<dt> rules
Date: Mon, 10 Sep 2012 16:39:59 +0200 [thread overview]
Message-ID: <504DFBBF.5010202@free-electrons.com> (raw)
In-Reply-To: <1347284313-2857-1-git-send-email-richard.genoud@gmail.com>
On 09/10/2012 03:38 PM, Richard Genoud wrote:
> This rules are useful for appended device tree conforming to the
> CONFIG_ARM_APPENDED_DTB kernel option.
>
> The rule dtbImage.<dt> is actually just a:
> cat zImage <dt>.dtb > dtbImage.<dt>
>
> The dtbuImage.<dt> makes an uImage out of the dtbImage.<dt> file.
Tested on my Armada XP board, it worked as expected.
You can add my Tested-by.
>
> KernelVersion: v3.6-rc5
>
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
> ---
> 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=<path>)'
> - 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=<path>)'
> + echo ' dtbs - Build device tree blobs for enabled boards'
> + echo ' dtbImage.<dt> - zImage with an appended device tree blob'
> + echo ' dtbuImage.<dt> - 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
> # ---------------------------------------------------------------------------
>
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: add dtbImage.<dt> and dtbuImage.<dt> rules
Date: Mon, 10 Sep 2012 16:39:59 +0200 [thread overview]
Message-ID: <504DFBBF.5010202@free-electrons.com> (raw)
In-Reply-To: <1347284313-2857-1-git-send-email-richard.genoud@gmail.com>
On 09/10/2012 03:38 PM, Richard Genoud wrote:
> This rules are useful for appended device tree conforming to the
> CONFIG_ARM_APPENDED_DTB kernel option.
>
> The rule dtbImage.<dt> is actually just a:
> cat zImage <dt>.dtb > dtbImage.<dt>
>
> The dtbuImage.<dt> makes an uImage out of the dtbImage.<dt> file.
Tested on my Armada XP board, it worked as expected.
You can add my Tested-by.
>
> KernelVersion: v3.6-rc5
>
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
> ---
> 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=<path>)'
> - 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=<path>)'
> + echo ' dtbs - Build device tree blobs for enabled boards'
> + echo ' dtbImage.<dt> - zImage with an appended device tree blob'
> + echo ' dtbuImage.<dt> - 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
> # ---------------------------------------------------------------------------
>
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-09-10 14:40 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 13:38 [PATCH] ARM: add dtbImage.<dt> and dtbuImage.<dt> rules Richard Genoud
2012-09-10 13:38 ` Richard Genoud
2012-09-10 14:39 ` Gregory CLEMENT [this message]
2012-09-10 14:39 ` Gregory CLEMENT
2012-09-27 8:10 ` [PATCH RESEND] " Richard Genoud
2012-09-27 8:10 ` Richard Genoud
2012-09-27 8:29 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-27 8:29 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-27 8:29 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-27 9:08 ` Richard Genoud
2012-09-27 9:08 ` Richard Genoud
2013-09-24 10:55 ` Gerlando Falauto
2013-09-24 10:55 ` Gerlando Falauto
2013-09-24 12:01 ` Jason Cooper
2013-09-24 12:01 ` Jason Cooper
2013-09-24 12:19 ` Russell King - ARM Linux
2013-09-24 12:19 ` Russell King - ARM Linux
2013-09-24 12:34 ` Richard Genoud
2013-09-24 12:34 ` Richard Genoud
2013-09-24 15:14 ` Gerlando Falauto
2013-09-24 15:14 ` Gerlando Falauto
2013-09-30 18:14 ` Tim Bird
2013-09-30 18:14 ` Tim Bird
2013-09-30 22:44 ` Rob Herring
2013-09-30 22:44 ` Rob Herring
2013-10-01 3:21 ` Nicolas Pitre
2013-10-01 3:21 ` Nicolas Pitre
2013-10-01 2:40 ` Nicolas Pitre
2013-10-01 2:40 ` Nicolas Pitre
2013-09-30 20:21 ` Maxime Bizon
2013-09-30 20:21 ` Maxime Bizon
2013-09-30 20:42 ` Jason Cooper
2013-09-30 20:42 ` Jason Cooper
2013-09-30 21:07 ` Maxime Bizon
2013-09-30 21:07 ` Maxime Bizon
2013-10-01 3:14 ` Nicolas Pitre
2013-10-01 3:14 ` Nicolas Pitre
2013-10-01 10:41 ` Maxime Bizon
2013-10-01 10:41 ` Maxime Bizon
2013-10-01 11:12 ` Jason Cooper
2013-10-01 11:12 ` Jason Cooper
2013-10-02 21:14 ` Russell King - ARM Linux
2013-10-02 21:14 ` Russell King - ARM Linux
2013-09-24 15:14 ` Gerlando Falauto
2013-09-24 15:14 ` Gerlando Falauto
2013-09-24 15:54 ` Jason Cooper
2013-09-24 15:54 ` Jason Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=504DFBBF.5010202@free-electrons.com \
--to=gregory.clement@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mmarek@suse.cz \
--cc=richard.genoud@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.