summaryrefslogtreecommitdiff
path: root/boot/image-board.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-03-05 17:25:09 -0700
committerTom Rini <trini@konsulko.com>2025-03-18 13:12:15 -0600
commit098407e67390ed0c369029bab0777a51e5a7bad2 (patch)
tree453851b96164f38ceb757278ffaaf83f8a9357a4 /boot/image-board.c
parent3c7b13b075488ebcff2923b0a7b46cc11f39285e (diff)
boot: arm: riscv: sandbox: Add a format for the booti file
Arm invented a new format for arm64 and something similar is also used with RISC-V. Add this to the list of supported formats and provide a way for the format to be detected on both architectures. Update the genimg_get_format() function to support this. Fix up switch() statements which don't currently mention this format. Booti does not support a ramdisk, so this can be ignored. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/image-board.c')
-rw-r--r--boot/image-board.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/boot/image-board.c b/boot/image-board.c
index addccf87c80..07931c64198 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -250,6 +250,9 @@ enum image_fmt_t genimg_get_format(const void *img_addr)
if (IS_ENABLED(CONFIG_ANDROID_BOOT_IMAGE) &&
is_android_boot_image_header(img_addr))
return IMAGE_FORMAT_ANDROID;
+ if (IS_ENABLED(CONFIG_CMD_BOOTI) &&
+ booti_is_valid(img_addr))
+ return IMAGE_FORMAT_BOOTI;
return IMAGE_FORMAT_INVALID;
}
@@ -420,6 +423,8 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a
done = true;
}
break;
+ case IMAGE_FORMAT_BOOTI:
+ break;
case IMAGE_FORMAT_INVALID:
break;
}