From 7f2531502c74c02323af107c4d2d9714b582848d Mon Sep 17 00:00:00 2001 From: Sam Protsenko Date: Fri, 24 Jan 2020 17:53:41 +0200 Subject: image: android: Add routine to get dtbo params Android Boot Image v1 adds "Recovery DTB" field in image header and associate payload in boot image itself [1]. Payload should be in Android DTB/DTBO format [2]. That "Recovery DTB" area should be only populated for non-A/B devices, and only in recovery image. Add function to get an address and size of that payload. That function can be further used e.g. in 'abootimg' command to provide the user a way to get the address of recovery dtbo from U-Boot shell, which can be further parsed using 'adtimg' command. [1] https://source.android.com/devices/bootloader/boot-image-header [2] https://source.android.com/devices/architecture/dto/partitions Signed-off-by: Sam Protsenko Signed-off-by: Lokesh Vutla --- include/image.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/image.h') diff --git a/include/image.h b/include/image.h index 4e36b87f42..b316d167d8 100644 --- a/include/image.h +++ b/include/image.h @@ -1425,6 +1425,7 @@ int android_image_get_ramdisk(const struct andr_img_hdr *hdr, ulong *rd_data, ulong *rd_len); int android_image_get_second(const struct andr_img_hdr *hdr, ulong *second_data, ulong *second_len); +bool android_image_get_dtbo(ulong hdr_addr, ulong *addr, u32 *size); bool android_image_get_dtb_by_index(ulong hdr_addr, u32 index, ulong *addr, u32 *size); ulong android_image_get_end(const struct andr_img_hdr *hdr); -- cgit