android: boot: update android_image_get_data to support v3, v4

Since boot image header version 3 and 4 introduced vendor boot image,
use the following functions to fill the generic android
structure : andr_image_data:

 - android_boot_image_v3_v4_parse_hdr()
 - android_vendor_boot_image_v3_v4_parse_hdr()

Update android_image_get_data() to support v3 and v4

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:12 +01:00
committed by Tom Rini
parent e058176be3
commit 1115027d2f
3 changed files with 91 additions and 3 deletions

View File

@@ -1876,6 +1876,17 @@ bool android_image_print_dtb_contents(ulong hdr_addr);
*/
bool is_android_boot_image_header(const struct andr_boot_img_hdr_v0 *hdr);
/**
* is_android_vendor_boot_image_header() - Check the magic of vendor boot image
*
* This checks the header of Android vendor boot image and verifies the magic
* is "VNDRBOOT"
*
* @vendor_boot_img: Pointer to boot image
* Return: non-zero if the magic is correct, zero otherwise
*/
bool is_android_vendor_boot_image_header(const void *vendor_boot_img);
/**
* board_fit_config_name_match() - Check for a matching board name
*