From: Safae Ouajih Date: Sun, 5 Feb 2023 23:50:10 +0000 (+0100) Subject: android: boot: boot image header v3, v4 do not support recovery DTBO X-Git-Tag: baikal/mips/sdk6.2~4^2~3^2~207^2~11 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=e4b3a1782601cb550b6472d8af3ae60a6265eb36;p=uboot.git android: boot: boot image header v3, v4 do not support recovery DTBO android_image_get_dtbo() is used to get recovery DTBO via abootimg cmd. This is not supported in boot image header v3 and v4. Thus, print an error message when v1,v2 header version are not used. Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek Tested-by: Mattijs Korpershoek --- diff --git a/boot/image-android.c b/boot/image-android.c index 31a5d30162..748fd212ae 100644 --- a/boot/image-android.c +++ b/boot/image-android.c @@ -316,8 +316,8 @@ bool android_image_get_dtbo(ulong hdr_addr, ulong *addr, u32 *size) goto exit; } - if (hdr->header_version < 1) { - printf("Error: header_version must be >= 1 to get dtbo\n"); + if (hdr->header_version != 1 && hdr->header_version != 2) { + printf("Error: header version must be >= 1 and <= 2 to get dtbo\n"); ret = false; goto exit; }