How to stop mtd char device generating ECC on writes?
matthieu.castet at parrot.com
Wed Aug 11 05:43:05 EDT 2010
Jon Povey a écrit :
> But I can't seem to write it back properly using nandwrite.
> Testing on another partition mtd6, If I do this:
> nandwrite -r -s 0x20000 /dev/mtd6 ubl0.dump
> then it seems my 64 bytes of "OOB" are skipped and I get a generated 24 bytes of 0xFF spare and 40 bytes of generated ECC.
> If I use --noecc --oob instead of -r, it looks like my 64 bytes of "OOB" does get written, but then hardware ECC is getting written OVER THE TOP, i.e. the last 40 bytes have various bits 0 that should be 1 (but no 1s that should be 0)
> I am looking through the nandwrite and drivers/mtd sources at the moment, but would love to get a clue if someone can tell me
> - Does MTD support what I'm trying to do from userland?
yes write in raw mode + MEMWRITEOOB. But you will need 2 number of program.
> - If yes, could this be a bug in the DaVinci NAND driver?
> - Or, is nandwrite supposed to support this? or do I need to modify it?
I don't know nandwrite
More information about the linux-mtd