[PATCH v2 09/17] android: boot: add vendor boot image to prepare for v3,v4 support

Simon Glass sjg at chromium.org
Fri Jan 27 01:54:56 CET 2023


Hi Safae,

On Thu, 26 Jan 2023 at 09:05, Safae Ouajih <souajih at baylibre.com> wrote:
>
> This is done to prepare for boot image version 3 and 4 support.
>
> Signed-off-by: Safae Ouajih <souajih at baylibre.com>
> ---
>  boot/bootm.c         |  8 +++----
>  boot/image-android.c | 54 ++++++++++++++++++++++++++++----------------
>  boot/image-board.c   |  3 +--
>  boot/image-fdt.c     |  3 ++-
>  cmd/abootimg.c       |  4 ++--
>  include/image.h      | 22 +++++++++++-------
>  6 files changed, 58 insertions(+), 36 deletions(-)
>

> diff --git a/include/image.h b/include/image.h
> index 6264d13e0c..df8a9075fa 100644
> --- a/include/image.h
> +++ b/include/image.h
> @@ -1735,20 +1735,26 @@ 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;
>
> -bool android_image_get_data(const void *boot_hdr, struct andr_image_data *data);
> +bool android_image_get_data(const void *boot_hdr, const void *vendor_boot_hdr,
> +                           struct andr_image_data *data);
> +
>  struct andr_boot_img_hdr_v0;
> -int android_image_get_kernel(const struct andr_boot_img_hdr_v0 *hdr, int verify,
> +int android_image_get_kernel(const struct andr_boot_img_hdr_v0 *hdr,
> +                            const void *vendor_boot_img, int verify,
>                              ulong *os_data, ulong *os_len);
>  int android_image_get_ramdisk(const struct andr_boot_img_hdr_v0 *hdr,
> -                             ulong *rd_data, ulong *rd_len);
> +                             const void *vendor_boot_img, ulong *rd_data, ulong *rd_len);
>  int android_image_get_second(const struct andr_boot_img_hdr_v0 *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_boot_img_hdr_v0 *hdr);
> -ulong android_image_get_kload(const struct andr_boot_img_hdr_v0 *hdr);
> -ulong android_image_get_kcomp(const struct andr_boot_img_hdr_v0 *hdr);
> +bool android_image_get_dtb_by_index(ulong hdr_addr, ulong vendor_boot_img,
> +                                   u32 index, ulong *addr, u32 *size);
> +ulong android_image_get_end(const struct andr_boot_img_hdr_v0 *hdr,
> +                           const void *vendor_boot_img);
> +ulong android_image_get_kload(const struct andr_boot_img_hdr_v0 *hdr,
> +                             const void *vendor_boot_img);
> +ulong android_image_get_kcomp(const struct andr_boot_img_hdr_v0 *hdr,
> +                             const void *vendor_boot_img);
>  void android_print_contents(const struct andr_boot_img_hdr_v0 *hdr);
>  #ifdef CONFIG_CMD_ABOOTIMG
>  bool android_image_print_dtb_contents(ulong hdr_addr);
> --
> 2.34.1
>

Please add comments for those that you change. Really all of these
should have proper comments.

Regards,
Simon


More information about the U-Boot mailing list