summaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-09-23 11:51:18 +0200
committerPali Rohár <pali.rohar@gmail.com>2012-09-23 11:51:18 +0200
commitada683ed9bfa68edd14f75331646da60be1313da (patch)
tree4466936292cd99780bad37c4ca9691d950719427 /src/image.c
parent5efa0d96b856589dcf84edbc7a06220216ae6c93 (diff)
download0xFFFF-ada683ed9bfa68edd14f75331646da60be1313da.tar.bz2
image: Added mmc detection
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index f8e9c93..c13e247 100644
--- a/src/image.c
+++ b/src/image.c
@@ -497,6 +497,8 @@ enum image_type image_type_from_data(struct image * image) {
return IMAGE_KERNEL;
else if ( memcmp(buf, "UBI#", 4) == 0 ) /* UBI EC header */
return IMAGE_ROOTFS;
+ else if ( memcmp(buf+510, "\x55\xaa", 2) == 0 ) /* FAT boot sector signature */
+ return IMAGE_MMC;
else if ( memcmp(buf, "\xb0\x00\x01\x03\x9d\x00\x00\x00", 8) == 0 )
return IMAGE_CMT_2ND;
else if ( memcmp(buf, "\xb1\x00\x00\x00\x82\x00\x00\x00", 8) == 0 )
@@ -569,6 +571,9 @@ void image_print_info(struct image * image) {
if ( image->version )
printf(" Image version: %s\n", image->version);
+ if ( image->layout )
+ printf(" Image layout: included\n");
+
while ( device ) {
char * str2 = NULL;