diff options
author | Chuanhong Guo <gch981213@gmail.com> | 2020-10-26 15:29:25 +0300 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2020-11-06 13:28:16 +0300 |
commit | d2e850e961835825492f37346ae76670bf4758f5 (patch) | |
tree | 622f2e81abcf0468efcaa51b36cd021ba126b4c9 /arch/mips/boot/compressed | |
parent | ab7cffb8d2367e5b088c7c14452724e719a10eba (diff) | |
download | linux-d2e850e961835825492f37346ae76670bf4758f5.tar.xz |
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>
Diffstat (limited to 'arch/mips/boot/compressed')
-rw-r--r-- | arch/mips/boot/compressed/ld.script | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/mips/boot/compressed/ld.script b/arch/mips/boot/compressed/ld.script index 2ed08fbef8e7..0ebb667274d6 100644 --- a/arch/mips/boot/compressed/ld.script +++ b/arch/mips/boot/compressed/ld.script @@ -31,9 +31,12 @@ SECTIONS CONSTRUCTORS . = ALIGN(16); } - __appended_dtb = .; - /* leave space for appended DTB */ - . += 0x100000; + + .appended_dtb : { + __appended_dtb = .; + /* leave space for appended DTB */ + . += 0x100000; + } _edata = .; /* End of data section */ |