mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-25 16:12:05 +00:00
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>
This commit is contained in:
parent
89a5317ae2
commit
02c038ddb3
1 changed files with 4 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
|
||||||
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
|
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
|
||||||
|
#define BAREBOX_IMAGE_MAGIC 0x00786f62
|
||||||
|
|
||||||
struct arm_z_header {
|
struct arm_z_header {
|
||||||
uint32_t code[9];
|
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;
|
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
|
#ifndef CONFIG_SPL_FRAMEWORK
|
||||||
puts("Bad Linux ARM zImage magic!\n");
|
puts("zimage: Bad magic!\n");
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue