Skip to content

Commit 11e79c5

Browse files
committed
libbootimg: Fix support of Stock Sony ELF boot images
* Unlike all boot images built for CyanogenMod or AOSP based ROMs over the last years, the elf bootimages from Stock also include additional metadata in the header section that is required for the device to power up with its kernel * Add a 3900 8bits array at the end of the header, followed by the 16 chars of the added bootimage name, in order to match the Sony ELF 4096 first block and therefore save the additional data from Stock images * Regular Sony ELF images have about 1200-1600 chars there so filling the 4096 block is more than enough for this, and moving the bootimage name at the end makes things safer Change-Id: Ic2b619b6f5e862920dcfefa5b86b016987305d4a Signed-off-by: AdrianDC <radian.dc@gmail.com>
1 parent cc1f4ba commit 11e79c5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

include/boot_img_hdr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ struct boot_img_hdr_elf
130130
uint32_t cmd_msize; /* cmdline size duplicate */
131131
uint32_t cmd_flags; /* cmdline flags (0xAC to 0xAF) */
132132
uint32_t cmd_align; /* cmdline alignment */
133+
uint8_t header_vals[3900]; /* header additional values */
133134
uint8_t name[BOOT_NAME_SIZE]; /* added - asciiz product name */
134135
};
135136

0 commit comments

Comments
 (0)