aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSafae Ouajih2023-02-06 00:50:12 +0100
committerTom Rini2023-04-04 14:50:47 -0400
commit1115027d2f75ade805f0d4d44a6a2c21e74ea6b2 (patch)
tree11ceb4ab2e89966431db20868b43dc272d9b8a03 /include
parente058176be32b09ca4f787442fd99d29e44079519 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/android_image.h3
-rw-r--r--include/image.h11
2 files changed, 14 insertions, 0 deletions
diff --git a/include/android_image.h b/include/android_image.h
index fb3a9d9858b..99e78035082 100644
--- a/include/android_image.h
+++ b/include/android_image.h
@@ -323,6 +323,8 @@ struct andr_image_data {
ulong kernel_ptr; /* kernel address */
u32 kernel_size; /* size in bytes */
u32 ramdisk_size; /* size in bytes */
+ ulong vendor_ramdisk_ptr; /* vendor ramdisk address */
+ u32 vendor_ramdisk_size; /* vendor ramdisk size*/
u32 boot_ramdisk_size; /* size in bytes */
ulong second_ptr; /* secondary bootloader address */
u32 second_size; /* secondary bootloader size */
@@ -342,6 +344,7 @@ struct andr_image_data {
ulong tags_addr; /* physical addr for kernel tags */
u32 header_version; /* version of the boot image header */
u32 boot_img_total_size; /* boot image size */
+ u32 vendor_boot_img_total_size; /* vendor boot image size */
};
#endif
diff --git a/include/image.h b/include/image.h
index f84c03f08fb..c2e751c1364 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1877,6 +1877,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
*
* This is used when SPL loads a FIT containing multiple device tree files