boot image header v4

This commit is contained in:
vvb2060
2021-05-08 22:32:51 +08:00
committed by John Wu
parent 0580932610
commit 439d497a13
2 changed files with 128 additions and 4 deletions

View File

@ -247,7 +247,15 @@ void boot_img::parse_image(uint8_t *addr, format_t type) {
auto hp = reinterpret_cast<boot_img_hdr*>(addr);
if (type == AOSP_VENDOR) {
fprintf(stderr, "VENDOR_BOOT_HDR\n");
hdr = new dyn_img_vnd_v3(addr);
switch (hp->header_version) {
case 4:
hdr = new dyn_img_vnd_v4(addr);
break;
case 3:
default:
hdr = new dyn_img_vnd_v3(addr);
break;
}
} else if (hp->page_size >= 0x02000000) {
fprintf(stderr, "PXA_BOOT_HDR\n");
hdr = new dyn_img_pxa(addr);
@ -276,6 +284,9 @@ void boot_img::parse_image(uint8_t *addr, format_t type) {
case 3:
hdr = new dyn_img_v3(addr);
break;
case 4:
hdr = new dyn_img_v4(addr);
break;
default:
hdr = new dyn_img_v0(addr);
break;