I've seen this mentioned before, but never saw a solution. With
2.0.36 (and for all I know in older versions) any access to /mnt/flash0
(i.e., the writable internal flash file system) generates scores of
error logs of the form:
**>>ecc error unfixed on chunk 33:1
**>>Block 1 marked for retirement
Of course, you might not notice these because of all the usb debug
messages filling the log buffer. At first I thought these messages
might relate to a flash part that is actually going bad, but they show
up on multiple machines.
It appears that both YAFFS (the flash file system driver) and mtd
(the linux memory driver over which the file system driver runs)
are trying to manage the NAND flash's OOB data. Each of YAFFS
and mtd has an option to leave the OOB ecc data alone, but I think
in the current kernel neither module has that option enabled. As
a result they disagree and YAFFS thinks there are errors in every
block. I assume that if there were ever any real errors they could
not be ecc-corrected.
I think it would be fairly easy to rebuild the kernel with appropriate
options set, but unfortunately the GPL sources for the 2.x Roku
releases do not seem to be available. That leaves a patching
strategy. The mtd driver is built into the kernel while YAFFS is
a loadable module. The patches to mtd would be to disable some
code while the changes to YAFFS would be more complicated (it
has to use the mtd ecc support). But it might be possible to build
the YAFFS module from sources rather than patching the binary.
All this assuming I'm correctly interpreting the problem...
Is anyone else working on (interested in working on) this problem?