diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2016-05-06 14:37:05 +0200 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2016-05-09 20:10:58 +0200 |
commit | df8ca9a5c4d87903ddca15d1a6c60f43b15656fe (patch) | |
tree | db5d218c753ecf0742bdb961ce27939f39e7aa19 /package/system/mtd/src/mtd.h | |
parent | 2dd125048dedbae3fbad6ae4b89f4b9b6e44b9b1 (diff) | |
download | upstream-df8ca9a5c4d87903ddca15d1a6c60f43b15656fe.tar.gz upstream-df8ca9a5c4d87903ddca15d1a6c60f43b15656fe.tar.bz2 upstream-df8ca9a5c4d87903ddca15d1a6c60f43b15656fe.zip |
mtd: add -c option for specifying amount of data to be used for checksum
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 <zajec5@gmail.com>
Diffstat (limited to 'package/system/mtd/src/mtd.h')
-rw-r--r-- | package/system/mtd/src/mtd.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |