mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
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 <sjg@chromium.org>
This commit is contained in:
parent
1758551ec9
commit
e2734d647e
2 changed files with 9 additions and 0 deletions
|
@ -1512,6 +1512,10 @@ int fit_image_check_arch(const void *fit, int noffset, uint8_t arch)
|
|||
uint8_t image_arch;
|
||||
int aarch32_support = 0;
|
||||
|
||||
/* Let's assume that sandbox can load any architecture */
|
||||
if (IS_ENABLED(CONFIG_SANDBOX))
|
||||
return true;
|
||||
|
||||
if (IS_ENABLED(CONFIG_ARM64_SUPPORT_AARCH32))
|
||||
aarch32_support = 1;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue