mtd: add -c option for specifying amount of data to be used for checksum
author rmilecki
()
committer rmilecki
()
commit a4953d94d3a5f86658dd8d210356ff35849a6e31
tree 5056455cc6e2353c35e4c450cbe04ced4a53c294
parent b93838898ed6218264f103a68d5a9a8e43b3055d
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>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49317 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/system/mtd/src/mtd.c
package/system/mtd/src/mtd.h
package/system/mtd/src/trx.c
comments