diff options
| author | Simon Glass <[email protected]> | 2025-03-05 17:25:09 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-03-18 13:12:15 -0600 |
| commit | 098407e67390ed0c369029bab0777a51e5a7bad2 (patch) | |
| tree | 453851b96164f38ceb757278ffaaf83f8a9357a4 /include/image.h | |
| parent | 3c7b13b075488ebcff2923b0a7b46cc11f39285e (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 <[email protected]>
Diffstat (limited to 'include/image.h')
| -rw-r--r-- | include/image.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h index dc1a7c307cc..f8f2c887a4b 100644 --- a/include/image.h +++ b/include/image.h @@ -603,6 +603,7 @@ enum image_fmt_t { IMAGE_FORMAT_LEGACY, /* legacy image_header based format */ IMAGE_FORMAT_FIT, /* new, libfdt based format */ IMAGE_FORMAT_ANDROID, /* Android boot image */ + IMAGE_FORMAT_BOOTI, /* Arm64/RISC-V boot image */ }; /** @@ -650,6 +651,14 @@ enum image_fmt_t genimg_get_format(const void *img_addr); int genimg_has_config(struct bootm_headers *images); /** + * booti_is_valid() - Check if an image appears to be an Arm64 image + * + * @img: Pointer to image + * Return: true if the image has the Arm64 magic + */ +bool booti_is_valid(const void *img); + +/** * boot_get_fpga() - Locate the FPGA image * * @images: Information about images being loaded |
