HW ECC correction error on LB60.

Xiangfu Liu xiangfu at qi-hardware.com
Wed Sep 16 22:26:13 EDT 2009


Lars-Peter Clausen wrote:
> ZhangJieJing wrote:
>> Hi Everyone,
> 
>> I found that my board(LB60) have ECC error with NAND flash, kernel will
>> continue dumping message like [1] forever.
> 
> Hi
> 
> I did some investigation on the nand ecc issue today:
> The image is usually padded with 0xff bytes up to the eraseblock size.
> Depending on the image size this can fill whole pages. When flashing
> the image and writing a page usbboot will calculate the ecc data even
> for those pages filled 0xff and write it to the oob section of that page.
> 
> Now, when the linux kernel mounts the image it thinks that these pages
> containing only 0xff are empty and can be written to without being
> haved erased before.
> So if data is written to such a page the ecc data for that page will
> be written ontop of the ecc data, which was previously written while
> flashing the image. Due to the nature of nand chips this will result
> in wrong ecc data and on the next read from that page it will show ecc
> errors.
> 
> To fix it I wrote a simple patch[1] for usbboot which skips empty
> pages during write. So far I haven't seen a single ecc error.
> Xiangfu could you please apply that patch? (Or grant me commit access
> to usbboot)

thanks Lars. patch applied. also add your account to the usbboot.

> 
> - Lars
> 
> [1] http://metafoo.de/usbboot_dont_flash_empty_pages.patch




More information about the discussion mailing list


interactive