Tags: HGYGO/mkbootimg
Tags
mkbootimg: check dtb image size - per aosp-mirror/platform_system_core@96fd887 - check all dt* image sizes - clean up dt* error messages
unpackbootimg: fix unpacking Huawei "Cairo" signing - Huawei boot.img has header_version=0 but "Cairo SIGN" at offset 1632 would confuse header.dtb_size so protect against this - add similar protection for header.recovery_dtbo_size
mkbootimg: update for boot_img_hdr_v2 - switch to v2 and support new --dtb and --dtb_offset when --header_version 2 (or greater) - pre-version switch --dt for old dt_size dt section remains for when --header_version 0 (default) - add --recovery_acpio which is really just --recovery_dtbo in everything but the switch name
mkbootimg: update for boot_img_hdr_v1 - switch to v1 and write fields based on logic to still support v0 and pre-version images - support --dt only when --header_version 0 (default), support --recovery_dtbo when --header_version 1 (or greater) - elide some redundant code - fix up some inconsistent bracing and spacing from previous PRs
unpackbootimg: work around new bootimg.h header_version conflict with… … old dtbsize stop-gap measure until boot_img_hdr_v1 can be properly integrated Ref: https://github.com/aosp-mirror/platform_system_core/blob/master/mkbootimg/include/bootimg/bootimg.h
unpackbootimg: fix SIGSEGV in case of input / output file not available
unpackbootimg: support old mkbootimg format extended cmdline as well
mkbootimg: fix off-by-ones to remove enforced null termination - per osm0sis#8 AOSP's mkbootimg no longer uses null termination at any point in the cmdline or extended cmdline fields allowing the full 512- and 1536-byte lengths, respectively; unpackbootimg already handles this correctly (thanks again @ehem) - clean up comments/alternate code