aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-11-25 17:39:54 -0500
committerTom Rini <trini@konsulko.com>2016-11-25 17:39:54 -0500
commited77ccd014b4073c4d282028cfb22f8d1742fec1 (patch)
tree0d3cf0fd0e45bf10c7897a24f3560589f7740e20 /common
parent136179bec19f4bc84227cba138214ea392a723ea (diff)
parent020198b0c7d251cf6bde76024ecf0ee711860534 (diff)
downloadu-boot-ed77ccd014b4073c4d282028cfb22f8d1742fec1.zip
u-boot-ed77ccd014b4073c4d282028cfb22f8d1742fec1.tar.gz
u-boot-ed77ccd014b4073c4d282028cfb22f8d1742fec1.tar.bz2
Merge git://git.denx.de/u-boot-fsl-qoriq
Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: arch/arm/Kconfig
Diffstat (limited to 'common')
-rw-r--r--common/image-fit.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/common/image-fit.c b/common/image-fit.c
index 77dc011..9468e51 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -14,6 +14,7 @@
#include <time.h>
#else
#include <linux/compiler.h>
+#include <linux/kconfig.h>
#include <common.h>
#include <errno.h>
#include <mapmem.h>
@@ -1161,11 +1162,18 @@ int fit_image_check_os(const void *fit, int noffset, uint8_t os)
int fit_image_check_arch(const void *fit, int noffset, uint8_t arch)
{
uint8_t image_arch;
+ int aarch32_support = 0;
+
+#ifdef CONFIG_ARM64_SUPPORT_AARCH32
+ aarch32_support = 1;
+#endif
if (fit_image_get_arch(fit, noffset, &image_arch))
return 0;
return (arch == image_arch) ||
- (arch == IH_ARCH_I386 && image_arch == IH_ARCH_X86_64);
+ (arch == IH_ARCH_I386 && image_arch == IH_ARCH_X86_64) ||
+ (arch == IH_ARCH_ARM64 && image_arch == IH_ARCH_ARM &&
+ aarch32_support);
}
/**
@@ -1614,6 +1622,9 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
int type_ok, os_ok;
ulong load, data, len;
uint8_t os;
+#ifndef USE_HOSTCC
+ uint8_t os_arch;
+#endif
const char *prop_name;
int ret;
@@ -1697,6 +1708,12 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
return -ENOEXEC;
}
#endif
+
+#ifndef USE_HOSTCC
+ fit_image_get_arch(fit, noffset, &os_arch);
+ images->os.arch = os_arch;
+#endif
+
if (image_type == IH_TYPE_FLATDT &&
!fit_image_check_comp(fit, noffset, IH_COMP_NONE)) {
puts("FDT image is compressed");