Build a zImage or uImage with dtb already appended
PATCH v4 1/1 Build a zImage or uImage with dtb already appended
From: Domenico Andreoli <[email protected]>
Add new targets to build zImage and uImage with DTB appended (i.e. make 'uImage-dtb.am335x-bone' or 'make zImage-dtb.omap3-evm').
Signed-off-by Jeremy Kerr <[email protected]>
Signed-off-by Grant Likely <[email protected]>
Signed-off-by Domenico Andreoli <[email protected]>
Signed-off-by Tom Rini <[email protected]>
---
There are still times where you will run into the need to run a modern kernel on a board with old firmware that you cannot update. This patch is not intended for merging anywhere, but just to make use of this mechanism when needed easier.
V1: by Grant Likely (02 Aug 2011)
V2: by Domenico Andreoli (29 Jun 2012)
added .gitignore change
V3: by Christoph Junghans (14 Jan 2015)
added archhelp
V4: Rebase to v4.13-rc6, update depends
--- arch/arm/Makefile | 8 ++++++++ arch/arm/boot/.gitignore | 2 ++ arch/arm/boot/Makefile | 7 +++++++ 3 files changed, 17 insertions(+)
arch/arm/Makefile +8 -0
@@ -337,6 +337,12 @@ $(BOOT_TARGETS): vmlinux $(INSTALL_TARGETS): $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ +zImage-dtb.%: + $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ + +uImage-dtb.%: + $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ + %.dtb: | scripts $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
@@ -364,9 +370,11 @@ bp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage define archhelp echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' + echo ' zImage-dtb.* - zImage' with appended dtb blob for machine=*' 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 ' uImage-dtb.* - U-Boot wrapped zImage' with appended dtb blob for machine=*' 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'
arch/arm/boot/.gitignore +2 -0
@@ -1,6 +1,8 @@ Image zImage +zImage-dtb.* xipImage bootpImage uImage +uImage-dtb.* *.dtb
arch/arm/boot/Makefile +7 -0
@@ -55,6 +55,9 @@ $(obj)/compressed/vmlinux: $(obj)/Image FORCE $(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy) +$(obj)/zImage-dtb.%: $(obj)/dts/%.dtb $(obj)/zImage + cat $(obj)/zImage $< > $@ + endif ifneq ($(LOADADDR),)
@@ -79,6 +82,10 @@ $(obj)/uImage: $(obj)/zImage FORCE @$(check_for_multiple_loadaddr) $(call if_changed,uimage) +$(obj)/uImage-dtb.%: $(obj)/zImage-dtb.% FORCE + $(call if_changed,uimage) + @echo ' Image $@ is ready' + $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(Q)$(MAKE) $(build)=$(obj)/bootp $@
Signature · 1 line
1.9.1