mtd: add support for bad blocks in NAND flash
authorFelix Fietkau <nbd@openwrt.org>
Wed, 26 Mar 2014 10:50:09 +0000 (10:50 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 26 Mar 2014 10:50:09 +0000 (10:50 +0000)
commit608f4fe3b040089b30a019f1a28efeda1ca5809f
tree501b30c771418fcffdb4d9d7867552f7ab021d11
parent0555ebf66d415045b176181cde25ba2ed063c09d
mtd: add support for bad blocks in NAND flash

NAND flash is very likely to contain bad blocks.

Currently, mtd and therefore sysupgrade fails when it encounters a single bad block, potentially leaving an unbootable system.

This patch allows the mtd utility to skip bad blocks in NAND flash and complete sysupgrade successfully.

Patch by: Matthew Redfearn <matt.redfearn@nxp.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40021
package/system/mtd/src/jffs2.c
package/system/mtd/src/mtd.c
package/system/mtd/src/mtd.h