aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-02-10 11:35:50 +0000
committerRafał Miłecki <zajec5@gmail.com>2016-02-10 11:35:50 +0000
commit358ae42152224bd9c0379ee56b793aebd2555369 (patch)
treeaac32fabd8292cddbbd9b9226a7fd993a300b4cb
parent39852286e9b95df37c6f7fc79114de247008484e (diff)
downloadupstream-358ae42152224bd9c0379ee56b793aebd2555369.tar.gz
upstream-358ae42152224bd9c0379ee56b793aebd2555369.tar.bz2
upstream-358ae42152224bd9c0379ee56b793aebd2555369.zip
mtd: fix Seama format after replacing EOF with sysupgrade data
Seama header has MD5 similarly to TRX and its CRC32. We need to update it after replacing anything in Seama entity content to make bootloader accept it. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48688
-rw-r--r--package/system/mtd/src/mtd.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/package/system/mtd/src/mtd.c b/package/system/mtd/src/mtd.c
index 03ee5671d5..eda001e1d8 100644
--- a/package/system/mtd/src/mtd.c
+++ b/package/system/mtd/src/mtd.c
@@ -659,8 +659,19 @@ resume:
offset = 0;
}
- if (jffs2_replaced && trx_fixup) {
- trx_fixup(fd, mtd);
+ if (jffs2_replaced) {
+ switch (imageformat) {
+ case MTD_IMAGE_FORMAT_TRX:
+ if (trx_fixup)
+ trx_fixup(fd, mtd);
+ break;
+ case MTD_IMAGE_FORMAT_SEAMA:
+ if (mtd_fixseama)
+ mtd_fixseama(mtd, 0);
+ break;
+ default:
+ break;
+ }
}
if (!quiet)