[PATCH v2 03/17] android: boot: replace android_image_check_header

Mattijs Korpershoek mkorpershoek at baylibre.com
Wed Feb 1 09:33:19 CET 2023


On Thu, Jan 26, 2023 at 17:54, Simon Glass <sjg at chromium.org> wrote:

> On Thu, 26 Jan 2023 at 09:05, Safae Ouajih <souajih at baylibre.com> wrote:
>>
>> With the new vendor boot image introduced in versions 3 and 4
>> of boot image header, the header check must be done for both boot
>> image and vendor boot image. Thus, android_image_check_header() is
>> being replaced by is_android_boot_image_header() to only refer to
>> boot image header check.
>>
>> Signed-off-by: Safae Ouajih <souajih at baylibre.com>
>> ---
>>  boot/image-android.c      | 8 ++++----
>>  boot/image-board.c        | 2 +-
>>  cmd/abootimg.c            | 4 ++--
>>  drivers/fastboot/fb_mmc.c | 3 +--
>>  include/image.h           | 2 +-
>>  5 files changed, 9 insertions(+), 10 deletions(-)
>>
>
> [..]
>
>> diff --git a/include/image.h b/include/image.h
>> index bcb24d92de..c1594ee169 100644
>> --- a/include/image.h
>> +++ b/include/image.h
>> @@ -1735,7 +1735,6 @@ 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_boot_img_hdr_v0;
>> -int android_image_check_header(const struct andr_boot_img_hdr_v0 *hdr);
>>  int android_image_get_kernel(const struct andr_boot_img_hdr_v0 *hdr, int verify,
>>                              ulong *os_data, ulong *os_len);
>>  int android_image_get_ramdisk(const struct andr_boot_img_hdr_v0 *hdr,
>> @@ -1750,6 +1749,7 @@ 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);
>>  void android_print_contents(const struct andr_boot_img_hdr_v0 *hdr);
>>  bool android_image_print_dtb_contents(ulong hdr_addr);
>> +bool is_android_boot_image_header(const struct andr_boot_img_hdr_v0 *hdr);
>
> Please add a full comment
>
>>
>>  /**
>>   * board_fit_config_name_match() - Check for a matching board name
>> --
>> 2.34.1
>>
>
> With that:
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> Regards,
> SImon

Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>


More information about the U-Boot mailing list