Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: zboot: put appended dtb into a section

This will make a separated section for dtb appear in ELF, and we can
then use objcopy to patch a dtb into vmlinuz when RAW_APPENDED_DTB
is set in kernel config.

command to patch a dtb:
objcopy --set-section-flags=.appended_dtb=alloc,contents \
--update-section=.appended_dtb=<target>.dtb vmlinuz

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Chuanhong Guo and committed by
Thomas Bogendoerfer
d2e850e9 ab7cffb8

+6 -3
+6 -3
arch/mips/boot/compressed/ld.script
··· 31 31 CONSTRUCTORS 32 32 . = ALIGN(16); 33 33 } 34 - __appended_dtb = .; 35 - /* leave space for appended DTB */ 36 - . += 0x100000; 34 + 35 + .appended_dtb : { 36 + __appended_dtb = .; 37 + /* leave space for appended DTB */ 38 + . += 0x100000; 39 + } 37 40 38 41 _edata = .; 39 42 /* End of data section */