Add --skip-all-ffs option to mtd-utils nandwrite

Kees Trommel ctrommel at aimvalley.nl
Mon Dec 5 08:14:02 PST 2016


All,

Would it be possible to add an option --skip-all-ffs option to mtd-utils 
nandwrite?

With this option pages that contain only 0xFF bytes will be skipped and 
not written to flash.

This option is useful when you want to write using nandwrite an UBI 
image to NAND devices with a HW ECC. Without this option the OOB of a 
page that is written with all 0xFFs is no longer erased because the HW 
adds an non 0xFFs ECC to the OOB. If the data of the page contains only 
0xFFs then UBI/UBIFS assumes that the page is erased and writes to it 
without erasing the page first. This causes that a read of this page 
fails with unrecoverable ECC errors and a subsequent corruption of the 
UBIFS.

Attached is a patch file that adds the --skip-all-ffs option. A 
nandwrite of UBI image with this option will be successful while it 
fails without this option.

Regards,

Kees Trommel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-skip-all-ff-pages-option.patch
Type: text/x-patch
Size: 3222 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20161205/abe7c0aa/attachment-0001.bin>


More information about the linux-mtd mailing list