summaryrefslogtreecommitdiff
path: root/boot/image-android.c
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-10-06 13:20:24 -0600
committerTom Rini <[email protected]>2025-10-06 13:20:24 -0600
commit0eaa4b337336dbbe93395d1f2ccc18937eaafea2 (patch)
treec01e661d69181dceca68f56a4849a9bd04608521 /boot/image-android.c
parente50b1e8715011def8aff1588081a2649a2c6cd47 (diff)
parent4e4a9de31de2a5f395ee25c59e4026422fbcb27e (diff)
Merge branch 'next'
Merge the outstanding changes from the 'next' branch to master.
Diffstat (limited to 'boot/image-android.c')
-rw-r--r--boot/image-android.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/boot/image-android.c b/boot/image-android.c
index 1cd2060bb3f..e46dee0d9b3 100644
--- a/boot/image-android.c
+++ b/boot/image-android.c
@@ -107,7 +107,12 @@ static void android_vendor_boot_image_v3_v4_parse_hdr(const struct andr_vnd_boot
data->dtb_load_addr = hdr->dtb_addr;
data->bootconfig_size = hdr->bootconfig_size;
end = (ulong)hdr;
- end += hdr->page_size;
+
+ if (hdr->header_version > 3)
+ end += ALIGN(ANDR_VENDOR_BOOT_V4_SIZE, hdr->page_size);
+ else
+ end += ALIGN(ANDR_VENDOR_BOOT_V3_SIZE, hdr->page_size);
+
if (hdr->vendor_ramdisk_size) {
data->vendor_ramdisk_ptr = end;
data->vendor_ramdisk_size = hdr->vendor_ramdisk_size;