I've wanted for a while to have a userland means to get a precise
report on the number of bad blocks (as seen by the MTD driver, which
reads the NAND BBT). MTD has this info, but it's only accesible via an
ioctl(). Mitch added a similar trick to OFW -- in practice a
self-standing binary is a lot easier to use on suspect machines.

Here's a very rough-but-works patch, and a precompiled 'mtd_debug'
binary that has been tested to work on 656 and 802.

  http://dev.laptop.org/~martin/mtd_debug.patch

  http://dev.laptop.org/~martin/mtd_debug

How to use - as root:

  modprobe mtdchar
  /path/to/mtd_debug info /dev/mtd0

The output will include a line about "mtd.badblockscount".

Note: The number is over-reported by 4 when you compare it with OFW --
I am not sure why the accounting done by the MTD driver differs from
the accounting done by OFW.

Wiki is dead at the moment -- will add this info when the wiki is back.

cheers,



m
-- 
 [email protected]
 [email protected] -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
_______________________________________________
Devel mailing list
[email protected]
http://lists.laptop.org/listinfo/devel

Reply via email to