From df8ca9a5c4d87903ddca15d1a6c60f43b15656fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 6 May 2016 14:37:05 +0200 Subject: mtd: add -c option for specifying amount of data to be used for checksum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So far fixtrx was calculating checksum over amount of data matching partition erase size. It was mostly a workaround of checksum problem after changing anything in initial TRX content (e.g. formatting JFFS2). Its main purpose was to make bootloader accept modified TRX. This didn't provide much protection of flash data against corruption. This new option lets caller request calculating checksum over a bigger amount of data. It may be used e.g. to include whole kernel data for checksum and hopefully make bootloader go info failsafe mode if something goes wrong. Signed-off-by: Rafał Miłecki --- package/system/mtd/src/mtd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/system/mtd/src/mtd.h') diff --git a/package/system/mtd/src/mtd.h b/package/system/mtd/src/mtd.h index 751b0d09f6..0a8b1ae0fd 100644 --- a/package/system/mtd/src/mtd.h +++ b/package/system/mtd/src/mtd.h @@ -25,7 +25,7 @@ extern void mtd_parse_jffs2data(const char *buf, const char *dir); /* target specific functions */ extern int trx_fixup(int fd, const char *name) __attribute__ ((weak)); extern int trx_check(int imagefd, const char *mtd, char *buf, int *len) __attribute__ ((weak)); -extern int mtd_fixtrx(const char *mtd, size_t offset) __attribute__ ((weak)); +extern int mtd_fixtrx(const char *mtd, size_t offset, size_t data_size) __attribute__ ((weak)); extern int mtd_fixseama(const char *mtd, size_t offset) __attribute__ ((weak)); extern int mtd_resetbc(const char *mtd) __attribute__ ((weak)); #endif /* __mtd_h */ -- cgit v1.2.3