1
0
Fork 0
forked from mirror/openwrt
openwrt/package/system/mtd/src
Rafał Miłecki 5dca299fab mtd: support bad blocks within the mtd_fixtrx()
Reading MTD data with (p)read doesn't return any error when accessing
bad block. As the result, with current code, CRC32 covers "data" stored
in bad blocks.

That behavior doesn't match CFE's one (bootloader simply skips bad
blocks) and may result in:
1) Invalid CRC32
2) CFE refusing to boot firmware with a following error:
Boot program checksum is invalid

Fix that problem by checking every block before reading its content.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 0f54489f75)
2018-07-16 23:18:45 +02:00
..
crc32.c packages: clean up the package folder 2013-06-21 16:54:37 +00:00
crc32.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
fis.c treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
fis.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
imagetag.c treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
jffs2.c treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
jffs2.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
linksys_bootcount.c mtd: fix building with glibc 2016-08-18 09:49:18 +02:00
Makefile ramips: add support for D-Link DAP-1522 A1 2018-02-13 11:18:07 +01:00
md5.c packages: clean up the package folder 2013-06-21 16:54:37 +00:00
md5.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
mtd.c mtd: fix erase handling with partition offset on write 2018-04-20 10:03:38 +02:00
mtd.h mtd: add fixwrg command 2018-02-13 11:16:49 +01:00
seama.c mtd: fix endianness detection on musl 2016-10-27 01:50:42 +03:00
seama.h mtd: seama: add md5 to header struct 2016-05-09 18:53:11 +02:00
trx.c mtd: support bad blocks within the mtd_fixtrx() 2018-07-16 23:18:45 +02:00
wrg.c mtd: add fixwrg command 2018-02-13 11:16:49 +01:00
wrgg.c mtd: add fixwrgg command 2016-10-27 01:50:42 +03:00
wrgg.h mtd: add fixwrgg command 2016-10-27 01:50:42 +03:00