mtd: add support for bad blocks in NAND flash
author nbd
()
committer nbd
()
commit 3296c14614211043dd2d2757c784bfc7b192accb
tree 8b5e673dcb2d98876d031a93934705a34c3336b6
parent 0875235a7dc0bbf9972380c553586b071e586fcc
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
comments