From 75831d168720aabd80da31c24677bf75c35bb1a9 Mon Sep 17 00:00:00 2001 From: Jan Weitzel Date: Thu, 6 Sep 2012 14:41:11 +0200 Subject: 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 Signed-off-by: Sascha Hauer --- common/filetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/filetype.c') 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; -- cgit v1.2.3