android: boot: add vendor boot image to prepare for v3, v4 support

Introduce vendor boot image for version 3 and 4 of boot image header.
The vendor boot image will hold extra information about kernel, dtb
and ramdisk.

This is done to prepare for boot image version 3 and 4 support.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
Safae Ouajih
2023-02-06 00:50:11 +01:00
committed by Tom Rini
parent 447240e27b
commit e058176be3
6 changed files with 81 additions and 39 deletions

View File

@@ -72,7 +72,7 @@ static int abootimg_get_dtb_load_addr(int argc, char *const argv[])
const struct andr_boot_img_hdr_v0 *hdr;
hdr = map_sysmem(abootimg_addr(), sizeof(*hdr));
if (!android_image_get_data(hdr, &img_data)) {
if (!android_image_get_data(hdr, NULL, &img_data)) {
unmap_sysmem(hdr);
return CMD_RET_FAILURE;
}
@@ -119,7 +119,7 @@ static int abootimg_get_dtb_by_index(int argc, char *const argv[])
return CMD_RET_FAILURE;
}
if (!android_image_get_dtb_by_index(abootimg_addr(), num,
if (!android_image_get_dtb_by_index(abootimg_addr(), 0, num,
&addr, &size)) {
return CMD_RET_FAILURE;
}