Bad block Frenzy

Kristoffer Ericson kristoffer.ericson at gmail.com
Thu Aug 5 03:47:21 EDT 2010


On Thu, Aug 05, 2010 at 06:03:56AM +0000, Wolfgang Spraul wrote:
> Kristoffer,
> 
> > Looking for suggestions on how to get this working. Currently usbboot reports 2 bad blocks inside the kernel area which I cannot seem to get going (log below).
> > All kernel flashes end with CRC error at bootup.
> > 
> > Ive had this issue last time I tried to flash, but it sorted itself out
> > after a couple of nerase. This time though it doesnt seem to.
> > 
> > So, I either want good ideas on howto fix it (nerase/order of actions/...)
> > or just an good way to see where the bad blocks are so I can work around them (adjusting u-boot kernel position / kernel size).
> 
> I saw you also discussed this in IRC, and were looking for me there...
> Do you have a solution now?

Wasnt the reason I was looking for you (more on that later), no havent found a solution yet. Booting from SD works though (seems like bootloader area is fine) which is great. So its still usable, and Im guessing that remapping kernel area somewhere else would work fine also (although it requires my own u-boot version).

> 
> One thing you could try is to boot from SD, and then write the kernel
> with proper Linux tools flash_eraseall and nandwrite.
> It's documented here:
> http://en.qi-hardware.com/wiki/Updating_Ben_with_an_SD

Now that SD is working I can give that a go. I tried 2 different cables when flashing the kernel area, the first one was the one that failed with "skip a bad block!" the other one had more issues giving package errors (which indicates that its a bad cable, which is not suprising).

> 
> What are those tools saying? If there is indeed a bad block in the kernel
> location, flash_eraseall and nandwrite should write the kernel around that
> bad block, and u-boot would need to read it correctly too then. Maybe this
> is a good chance to make things more robust. But definitely try using Linux
> tools for NAND work as much as possible, as opposed to usbboot.

Im guessing that it flashes around the area, but that u-boot when it calculates the crc somehow includes the bad blocks (instead of the remapped ones) which ends up with having unmatched crc. Its only an theory though. Havent looked at the actual code to see if its true or not.

> 
> Wolfgang




More information about the discussion mailing list


interactive