diff options
author | Jan Weitzel <j.weitzel@phytec.de> | 2012-09-06 14:41:11 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-07 10:31:54 +0200 |
commit | 75831d168720aabd80da31c24677bf75c35bb1a9 (patch) | |
tree | f342f5371cc5e212acdb0e0ff0a0dba888de9071 /common | |
parent | 33ac4ef69e0a0425a249ff028b59f5004f24f926 (diff) | |
download | barebox-75831d168720aabd80da31c24677bf75c35bb1a9.tar.gz barebox-75831d168720aabd80da31c24677bf75c35bb1a9.tar.xz |
xload: get barebox size from barebox_arm_head
Add functions to read the barebox_arm_head, check barebox magicword
and read out the barebox image size.
Create a inital partion of 1Mb to access the barebox image on nand.
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/filetype.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/filetype.c b/common/filetype.c index e736d43efe..6306fdcb74 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -75,7 +75,7 @@ enum filetype file_detect_type(void *_buf) if (strncmp(buf8, "#!/bin/sh", 9) == 0) return filetype_sh; - if (buf[8] == 0x65726162 && buf[9] == 0x00786f62) + if (is_barebox_arm_head(_buf)) return filetype_arm_barebox; if (buf[9] == 0x016f2818 || buf[9] == 0x18286f01) return filetype_arm_zimage; |