summaryrefslogtreecommitdiff
path: root/boot/image-board.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/image-board.c')
-rw-r--r--boot/image-board.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/boot/image-board.c b/boot/image-board.c
index 9bf70824cb7..c602832249e 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -284,7 +284,7 @@ int genimg_get_format(const void *img_addr)
return IMAGE_FORMAT_FIT;
}
if (IS_ENABLED(CONFIG_ANDROID_BOOT_IMAGE) &&
- !android_image_check_header(img_addr))
+ is_android_boot_image_header(img_addr))
return IMAGE_FORMAT_ANDROID;
return IMAGE_FORMAT_INVALID;
@@ -426,11 +426,22 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a
break;
case IMAGE_FORMAT_ANDROID:
if (IS_ENABLED(CONFIG_ANDROID_BOOT_IMAGE)) {
- void *ptr = map_sysmem(images->os.start, 0);
int ret;
+ if (IS_ENABLED(CONFIG_CMD_ABOOTIMG)) {
+ void *boot_img = map_sysmem(get_abootimg_addr(), 0);
+ void *vendor_boot_img = map_sysmem(get_avendor_bootimg_addr(), 0);
+
+ ret = android_image_get_ramdisk(boot_img, vendor_boot_img,
+ rd_datap, rd_lenp);
+ unmap_sysmem(vendor_boot_img);
+ unmap_sysmem(boot_img);
+ } else {
+ void *ptr = map_sysmem(images->os.start, 0);
+
+ ret = android_image_get_ramdisk(ptr, NULL, rd_datap, rd_lenp);
+ unmap_sysmem(ptr);
+ }
- ret = android_image_get_ramdisk(ptr, rd_datap, rd_lenp);
- unmap_sysmem(ptr);
if (ret)
return ret;
done = true;
@@ -1115,7 +1126,8 @@ fallback:
}
/* get script subimage data address and length */
- if (fit_image_get_data(fit_hdr, noffset, &fit_data, &fit_len)) {
+ if (fit_image_get_data_and_size(fit_hdr, noffset,
+ &fit_data, &fit_len)) {
puts("Could not find script subimage data\n");
return 1;
}