diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2020-03-20 02:14:45 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-03-20 02:14:45 +0000 |
| commit | ecafcd1f728ef03bea6ca1b3b1eb3c7aa7ab4e01 (patch) | |
| tree | f548d3d5269d65f90c2fd034192505217525ecac | |
| parent | 0fbe1a51363fa86b49d8c5c5603c5669ad0e3e7b (diff) | |
| parent | 5bb77e1e36b995b8be9e24588ab20d4691e88c4d (diff) | |
Snap for 6314400 from 5bb77e1e36b995b8be9e24588ab20d4691e88c4d to rvc-release
Change-Id: I5873046ea2a2e60cba266c6987c128011e9ee570
| -rw-r--r-- | include/bootimg/bootimg.h | 18 | ||||
| -rw-r--r-- | mkbootimg.py | 2 | ||||
| -rwxr-xr-x | unpack_bootimg.py | 2 |
3 files changed, 9 insertions, 13 deletions
diff --git a/include/bootimg/bootimg.h b/include/bootimg/bootimg.h index 09411c6..8c9f6ee 100644 --- a/include/bootimg/bootimg.h +++ b/include/bootimg/bootimg.h @@ -44,7 +44,7 @@ struct boot_img_hdr_v0 { uint32_t second_size; /* size in bytes */ uint32_t second_addr; /* physical load addr */ - uint32_t tags_addr; /* physical addr for kernel tags */ + uint32_t tags_addr; /* physical addr for kernel tags (if required) */ uint32_t page_size; /* flash page size we assume */ // Version of the boot image header. @@ -153,10 +153,8 @@ struct boot_img_hdr_v1 : public boot_img_hdr_v0 { * 5. If booting to recovery mode in a non-A/B device, extract recovery * dtbo/acpio and apply the correct set of overlays on the base device tree * depending on the hardware/product revision. - * 6. prepare tags at tag_addr. kernel_args[] is - * appended to the kernel commandline in the tags. - * 7. r0 = 0, r1 = MACHINE_TYPE, r2 = tags_addr - * 8. if second_size != 0: jump to second_addr + * 6. set up registers for kernel entry as required by your architecture + * 7. if second_size != 0: jump to second_addr * else: jump to kernel_addr */ struct boot_img_hdr_v2 : public boot_img_hdr_v1 { @@ -192,7 +190,7 @@ struct boot_img_hdr_v2 : public boot_img_hdr_v1 { * | dtb | q pages * +---------------------+ - * o = (2108 + page_size - 1) / page_size + * o = (2112 + page_size - 1) / page_size * p = (vendor_ramdisk_size + page_size - 1) / page_size * q = (dtb_size + page_size - 1) / page_size * @@ -205,10 +203,8 @@ struct boot_img_hdr_v2 : public boot_img_hdr_v1 { * 3. load the vendor ramdisk at ramdisk_addr * 4. load the generic ramdisk immediately following the vendor ramdisk in * memory - * 5. prepare tags at tag_addr. kernel_args[] is appended to the kernel - * commandline in the tags. - * 6. r0 = 0, r1 = MACHINE_TYPE, r2 = tags_addr - * 7. if the platform has a second stage bootloader jump to it (must be + * 5. set up registers for kernel entry as required by your architecture + * 6. if the platform has a second stage bootloader jump to it (must be * contained outside boot and vendor boot partitions), otherwise * jump to kernel_addr */ @@ -263,7 +259,7 @@ struct vendor_boot_img_hdr_v3 { uint8_t cmdline[VENDOR_BOOT_ARGS_SIZE]; - uint32_t tags_addr; /* physical addr for kernel tags */ + uint32_t tags_addr; /* physical addr for kernel tags (if required) */ uint8_t name[VENDOR_BOOT_NAME_SIZE]; /* asciiz product name */ uint32_t header_size; diff --git a/mkbootimg.py b/mkbootimg.py index b06d42d..9682033 100644 --- a/mkbootimg.py +++ b/mkbootimg.py @@ -82,7 +82,7 @@ def write_header_v3(args): pad_file(args.output, BOOT_IMAGE_HEADER_V3_PAGESIZE) def write_vendor_boot_header(args): - VENDOR_BOOT_IMAGE_HEADER_V3_SIZE = 2108 + VENDOR_BOOT_IMAGE_HEADER_V3_SIZE = 2112 BOOT_MAGIC = 'VNDRBOOT'.encode() args.vendor_boot.write(pack('8s', BOOT_MAGIC)) diff --git a/unpack_bootimg.py b/unpack_bootimg.py index 628c19b..83c2bbe 100755 --- a/unpack_bootimg.py +++ b/unpack_bootimg.py @@ -24,7 +24,7 @@ from struct import unpack import os BOOT_IMAGE_HEADER_V3_PAGESIZE = 4096 -VENDOR_BOOT_IMAGE_HEADER_V3_SIZE = 2108 +VENDOR_BOOT_IMAGE_HEADER_V3_SIZE = 2112 def create_out_dir(dir_path): """creates a directory 'dir_path' if it does not exist""" |
