* [PATCH RESEND] ARM: add dtbImage.<dt> and dtbuImage.<dt> rules
[not found] <504DFBBF.5010202@free-electrons.com>
@ 2012-09-27 8:10 ` Richard Genoud
[not found] ` <1348733441-11626-1-git-send-email-richard.genoud-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Richard Genoud @ 2012-09-27 8:10 UTC (permalink / raw)
To: Grant Likely, Rob Herring, Michal Marek
Cc: Russell King, devicetree-discuss, linux-arm-kernel, linux-kbuild,
Richard Genoud
[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.<dt> is actually just a:
cat zImage <dt>.dtb > dtbImage.<dt>
The dtbuImage.<dt> makes an uImage out of the dtbImage.<dt> file.
KernelVersion: v3.6-rc5
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.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
# ---------------------------------------------------------------------------
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] ARM: add dtbImage.<dt> and dtbuImage.<dt> rules
[not found] ` <1348733441-11626-1-git-send-email-richard.genoud-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-09-27 8:29 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-27 9:08 ` Richard Genoud
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-27 8:29 UTC (permalink / raw)
To: Richard Genoud
Cc: Michal Marek, Russell King, linux-kbuild-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On 10:10 Thu 27 Sep , Richard Genoud wrote:
> [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.<dt> is actually just a:
> cat zImage <dt>.dtb > dtbImage.<dt>
>
> The dtbuImage.<dt> makes an uImage out of the dtbImage.<dt> file.
>
> KernelVersion: v3.6-rc5
>
> Signed-off-by: Richard Genoud <richard.genoud-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Tested-by: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
as discuss with Grant no this is a temporary solution so no Makefile Target
so nack
Best Regards,
J.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] ARM: add dtbImage.<dt> and dtbuImage.<dt> rules
2012-09-27 8:29 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-09-27 9:08 ` Richard Genoud
0 siblings, 0 replies; 3+ messages in thread
From: Richard Genoud @ 2012-09-27 9:08 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD
Cc: Grant Likely, Rob Herring, Michal Marek, devicetree-discuss,
Russell King, linux-arm-kernel, linux-kbuild, Gregory CLEMENT
2012/9/27 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
>> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
>> Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> as discuss with Grant no this is a temporary solution so no Makefile Target
>
> so nack
hum, it doesn't seems to be temporary on powerpc.
cf 25431333813686654907ab987fb5de10c10a16db
and
ARCH=powerpc make help
So what's the problem on arm ?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-27 9:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <504DFBBF.5010202@free-electrons.com>
2012-09-27 8:10 ` [PATCH RESEND] ARM: add dtbImage.<dt> and dtbuImage.<dt> rules Richard Genoud
[not found] ` <1348733441-11626-1-git-send-email-richard.genoud-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-09-27 8:29 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-27 9:08 ` Richard Genoud
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).