diff options
| author | Simon Glass <[email protected]> | 2021-03-15 18:11:12 +1300 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2021-03-27 15:04:31 +1300 |
| commit | e2734d647e9c86f46083b29224fc7b41a46e1858 (patch) | |
| tree | 40ed38640ea26eccd20a1a1a8483f26a9b43f687 /include | |
| parent | 1758551ec9526d56303a2b5cf1f58147e66945ed (diff) | |
sandbox: image: Allow sandbox to load any image
Sandbox is special in that it is used for testing and it does not match
any particular target architecture. Allow it to load an image from any
architecture, so that 'bootm' can be used as needed.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/image.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h index 138c83dd28d..bcd126d262d 100644 --- a/include/image.h +++ b/include/image.h @@ -886,6 +886,11 @@ static inline int image_check_type(const image_header_t *hdr, uint8_t type) } static inline int image_check_arch(const image_header_t *hdr, uint8_t arch) { +#ifndef USE_HOSTCC + /* Let's assume that sandbox can load any architecture */ + if (IS_ENABLED(CONFIG_SANDBOX)) + return true; +#endif return (image_get_arch(hdr) == arch) || (image_get_arch(hdr) == IH_ARCH_ARM && arch == IH_ARCH_ARM64); } |
