aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorChristoph Fritz <chf.fritz@googlemail.com>2019-05-03 13:19:49 +0200
committerTom Rini <trini@konsulko.com>2019-05-09 20:21:59 -0400
commit02c038ddb30fa52bb3f9fc9c80ad0776398b70a7 (patch)
treecca3357f3a835b6bf30095b32ca0c68c620a9ae9 /arch
parent89a5317ae274991507931cb08f5142584561ec41 (diff)
downloadu-boot-02c038ddb30fa52bb3f9fc9c80ad0776398b70a7.zip
u-boot-02c038ddb30fa52bb3f9fc9c80ad0776398b70a7.tar.gz
u-boot-02c038ddb30fa52bb3f9fc9c80ad0776398b70a7.tar.bz2
arm: zimage: add barebox image magic number
For chainboot configurations or test environments, this patch allows booting barebox images by using command bootz. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/zimage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c
index 09ab331..4930529 100644
--- a/arch/arm/lib/zimage.c
+++ b/arch/arm/lib/zimage.c
@@ -9,6 +9,7 @@
#include <common.h>
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
+#define BAREBOX_IMAGE_MAGIC 0x00786f62
struct arm_z_header {
uint32_t code[9];
@@ -21,9 +22,10 @@ int bootz_setup(ulong image, ulong *start, ulong *end)
{
struct arm_z_header *zi = (struct arm_z_header *)image;
- if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC) {
+ if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC &&
+ zi->zi_magic != BAREBOX_IMAGE_MAGIC) {
#ifndef CONFIG_SPL_FRAMEWORK
- puts("Bad Linux ARM zImage magic!\n");
+ puts("zimage: Bad magic!\n");
#endif
return 1;
}