summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/android_image.h27
-rw-r--r--include/image.h12
2 files changed, 39 insertions, 0 deletions
diff --git a/include/android_image.h b/include/android_image.h
index f0543630019..fb3a9d9858b 100644
--- a/include/android_image.h
+++ b/include/android_image.h
@@ -317,4 +317,31 @@ struct andr_boot_img_hdr_v0 {
* contained outside boot and vendor boot partitions), otherwise
* jump to kernel_addr
*/
+
+/* Private struct */
+struct andr_image_data {
+ ulong kernel_ptr; /* kernel address */
+ u32 kernel_size; /* size in bytes */
+ u32 ramdisk_size; /* size in bytes */
+ u32 boot_ramdisk_size; /* size in bytes */
+ ulong second_ptr; /* secondary bootloader address */
+ u32 second_size; /* secondary bootloader size */
+ ulong dtb_ptr; /* address of dtb image */
+ u32 dtb_size; /* size of dtb image */
+ ulong recovery_dtbo_ptr; /* size in bytes for recovery DTBO/ACPIO image */
+ u32 recovery_dtbo_size; /* offset to recovery dtbo/acpio in boot image */
+
+ const char *kcmdline; /* boot kernel cmdline */
+ const char *kcmdline_extra; /* vendor-boot extra kernel cmdline */
+ const char *image_name; /* asciiz product name */
+
+ u32 kernel_addr; /* physical load addr */
+ ulong ramdisk_addr; /* physical load addr */
+ ulong ramdisk_ptr; /* ramdisk address */
+ ulong dtb_load_addr; /* physical load address for DTB image */
+ 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 */
+};
+
#endif
diff --git a/include/image.h b/include/image.h
index 6e67cf4817a..4bf6c98ced7 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1733,7 +1733,19 @@ struct cipher_algo {
int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo);
struct cipher_algo *image_get_cipher_algo(const char *full_name);
+struct andr_image_data;
+/**
+ * android_image_get_data() - Parse Android boot image
+ *
+ * This is used to parse boot image header into andr_image_data
+ * generic structure.
+ *
+ * @boot_hdr: Pointer to boot image header
+ * @data: Pointer to generic boot format structure
+ * Return: true if succeeded, false otherwise
+ */
+bool android_image_get_data(const void *boot_hdr, struct andr_image_data *data);
struct andr_boot_img_hdr_v0;
/**