1 From 7d1531c81c0fb4c93bea8dc316043ad0e4d0c270 Mon Sep 17 00:00:00 2001
2 From: Chuanhong Guo <gch981213@gmail.com>
3 Date: Sun, 25 Oct 2020 23:19:40 +0800
4 Subject: [PATCH] MIPS: zboot: put appended dtb into a section
6 This will make a separated section for dtb appear in ELF, and we can
7 then use objcopy to patch a dtb into vmlinuz when RAW_APPENDED_DTB
8 is set in kernel config.
10 command to patch a dtb:
11 objcopy --set-section-flags=.appended_dtb=alloc,contents \
12 --update-section=.appended_dtb=<target>.dtb vmlinuz vmlinuz-dtb
14 Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
16 arch/mips/boot/compressed/ld.script | 9 ++++++---
17 1 file changed, 6 insertions(+), 3 deletions(-)
19 --- a/arch/mips/boot/compressed/ld.script
20 +++ b/arch/mips/boot/compressed/ld.script
21 @@ -31,9 +31,12 @@ SECTIONS
26 - /* leave space for appended DTB */
31 + /* leave space for appended DTB */
36 /* End of data section */