summaryrefslogtreecommitdiff
path: root/boot/image-android.c
diff options
context:
space:
mode:
authorSafae Ouajih <[email protected]>2023-02-06 00:50:10 +0100
committerTom Rini <[email protected]>2023-04-04 14:50:47 -0400
commit447240e27b892ab2ccc1ada03a260abbb562484e (patch)
tree5cba6c70d21dd6cf904cb06f7d3ea1db84ada558 /boot/image-android.c
parentbb5d692732ca02511f2f491af1e680c87373fd35 (diff)
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'boot/image-android.c')
-rw-r--r--boot/image-android.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/image-android.c b/boot/image-android.c
index 31a5d30162e..748fd212ae6 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;
}