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 <firstname.lastname@example.org>
Signed-off-by: Felix Fietkau <email@example.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40021 3c298f89-4303-0410-b956-a3cf2f4a3e73