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)
commitd7a9700570eb6d3e55777cda1ae1503000692bb9
tree8b5e673dcb2d98876d031a93934705a34c3336b6
parent58ca40c218871497e81d4cffacea10bef2c265bf
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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40021 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/system/mtd/src/jffs2.c
package/system/mtd/src/mtd.c
package/system/mtd/src/mtd.h