diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2015-01-15 09:42:40 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2015-01-15 09:42:40 +0100 |
commit | 289d2f22b237e901853566c8588800ac9f189847 (patch) | |
tree | 55673bfd52fda9b4084a30c78d032612e1908f70 /src/image.c | |
parent | f965980e2b309921e0b869c05177f1ee3937a845 (diff) | |
download | 0xFFFF-289d2f22b237e901853566c8588800ac9f189847.tar.bz2 |
image: Fix detecting new ARM U-Boot images
Diffstat (limited to 'src/image.c')
-rw-r--r-- | src/image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c index 48d80d8..5424f9a 100644 --- a/src/image.c +++ b/src/image.c @@ -502,7 +502,7 @@ enum image_type image_type_from_data(struct image * image) { return IMAGE_2ND; else if ( memcmp(buf+36, "\x18\x28\x6f\x01", 4) == 0 ) /* ARM Linux kernel magic number */ return IMAGE_KERNEL; - else if ( memcmp(buf, "\x14\x00\x00\xea", 4) == 0 ) /* ARM U-Boot - instruction branch +0x50 */ + else if ( memcmp(buf+1, "\x00\x00\xea", 3) == 0 ) /* ARM U-Boot - instruction branch */ return IMAGE_KERNEL; else if ( memcmp(buf, "UBI#", 4) == 0 ) /* UBI EC header */ return IMAGE_ROOTFS; |