Bad block inside kernel nand mapping

Kristoffer Ericson kristoffer.ericson at
Thu May 13 04:23:13 EDT 2010

On Thu, May 13, 2010 at 10:01:13AM +0800, Xiangfu Liu wrote:
> Hi  Kristoffer
> On 05/12/2010 01:56 AM, Kristoffer Ericson wrote:
> >Greetings,
> >
> >Thought that I would give the debian release a try and tried
> >to reflash my device.
> >
> >I ended up having great difficulty getting this to work. First off
> >the bootloader flashing didnt work so I redid it about 7-8 times
> >before it seemed to work.
> >When I try to flash the kernel It gives me at the end
> >"Skip a old bad block!" and while the bootloader loads the
> >kernel it reacts at the bad CRC.
> >
> >Ive made sure to erase the nand before writing, both by myself
> >and using scripts. Ive tried several kernels without success and
> >I always get exact same error.
> >
> >So, as far as I can understand I would need to :
> >1) change u-boot to ignore bad CRC
> maybe it's not good. u-boot use CRC to check the kernel image.

Im having my doubts concerning the bad sectors. I had 440bad sectors at last
check, but after erasing and reflashing a couple of times they have suddenly

> >2) map kernel area somewhere else
> yes. we can map the kernel to offset 1M ~ 6M, but we need change the u-boot source code.
> for example change the kernel to 1M offset:
> change u-boot:/include/configs/qi_lb60.h
> 	#define CONFIG_BOOTCOMMAND	"nand read 0x80600000 0x400000 0x200000;bootm"
> to
> 	#define CONFIG_BOOTCOMMAND	"nand read 0x80600000 0x100000 0x200000;bootm"
> change the flash command to:
> 	sudo usbboot -c "boot;nprog 256 openwrt-xburst-uImage.bin 0 0 -n"

I think it would be a good idea to supply different bootloaders with seperate
adresses. For the cases where users for some reason have bad sectors in bad places.
> >
> >Any ideas on what I might have missed? Ive done all the
> if there is bad block. bootloader and usbboot will take care of it.
> we need find out if there is a bug in u-boot or usbboot.

Im betting usbboot since they dissapeared. Is there some sort of timing
issue? Ive found that doing stuff manually has greater tendency to giving
bad sector output rather than doing same operations in an script.

> make sure the "NAND_FORCEERASE" is "1" in /etc/xburst-tools/usbboot.cfg
> is there any bad block message when you flash the bootloader?
> can you send the all flash output to me.

Will do if they appear again.Thx

> >change cable, change usb port, restart and so on.
> >
> >Best wishes
> >Kristoffer
> -- 
> Best Regards
> Xiangfu Liu

More information about the discussion mailing list