Author: rmilecki
Date: 2016-02-23 15:40:40 +0100 (Tue, 23 Feb 2016)
New Revision: 48754

Modified:
   trunk/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c
Log:
kernel: mtdsplit: add missing digest field to Seama header

Seama format has 2 similar headers: container (seal) header and entity
header. The first one has size always set to 0 and doesn't contain MD5
digest.

When dealing with Seama on a flash we deal directly with an entity. You
can see mtdsplit_parse_seama reads from offset 0 and expects entity to
be there. Seama container is used by bootloader / interface only which
extract entity out of it and flash it.

That said we should fix our header struct. This is important as we
calculate possible rootfs offset assuming it may be placed right after
Seama entity. So far calculate offset was always 16B too low.

Signed-off-by: Rafa?\197?\130 Mi?\197?\130ecki <[email protected]>

Modified: trunk/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c
===================================================================
--- trunk/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c      
2016-02-22 15:11:23 UTC (rev 48753)
+++ trunk/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c      
2016-02-23 14:40:40 UTC (rev 48754)
@@ -26,6 +26,7 @@
        __be16  reserved;       /* reserved for  */
        __be16  metasize;       /* size of the META data */
        __be32  size;           /* size of the image */
+       u8      md5[16];        /* digest */
 };
 
 static int mtdsplit_parse_seama(struct mtd_info *master,
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to