From 734cb47d6de16d2e3b52a03bce5daab40e5bb29d Mon Sep 17 00:00:00 2001 From: Safae Ouajih Date: Mon, 6 Feb 2023 00:50:05 +0100 Subject: android: boot: replace android_image_check_header 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, replace android_image_check_header() by is_android_boot_image_header() to only refer to boot image header check. Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek Tested-by: Mattijs Korpershoek --- include/image.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index 735484117d7..6e67cf4817a 100644 --- a/include/image.h +++ b/include/image.h @@ -1736,17 +1736,6 @@ struct cipher_algo *image_get_cipher_algo(const char *full_name); struct andr_boot_img_hdr_v0; -/** - * android_image_check_header() - Check the magic of boot image - * - * This checks the header of Android boot image and verifies the - * magic is "ANDROID!" - * - * @hdr: Pointer to image header - * Return: 0 if the magic is correct, non-zero if there is a magic mismatch - */ -int android_image_check_header(const struct andr_boot_img_hdr_v0 *hdr); - /** * android_image_get_kernel() - Processes kernel part of Android boot images * @@ -1838,6 +1827,17 @@ 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); +/** + * is_android_boot_image_header() - Check the magic of boot image + * + * This checks the header of Android boot image and verifies the + * magic is "ANDROID!" + * + * @hdr: Pointer to boot image + * Return: non-zero if the magic is correct, zero otherwise + */ +bool is_android_boot_image_header(const struct andr_boot_img_hdr_v0 *hdr); + /** * board_fit_config_name_match() - Check for a matching board name * -- cgit v1.2.3