[U-Boot-Users] copy to flash ... outside available flash

Tolunay Orkun listmember at orkun.us
Mon Nov 13 17:45:00 CET 2006

Hi Thomas,

Thomas Ruschival wrote:
> Hi Group,
> I am trying to install a Ramdiskimage into the flash of a TQM823L Board.
> Somehow it seems uboot has problems to copy a image lager than 0x100000
> Bytes into flash. Here is my flashinfo:
> Bank # 1: AMD AM29LV160B (16 Mbit, bottom boot sect)
>   Size: 4 MB in 35 Sectors
 > Bank # 2: AMD AM29LV160B (16 Mbit, bottom boot sect)
 >   Size: 4 MB in 35 Sectors
 >   Sector Start Addresses:

What flash driver are you using? This is not the output from standard 

> This means I have 8 MB o flash. I can copy a Block of 0xFFFFF Bytes from
> the RAM for example to 0x40100000. and I can copy the same Block to
> 0x40200000 or to 0x40300000.
> But if I copy a block that is larger than 0xFFFFF to any location it claims
> that I copy outside available Flash. This is stupid and wrong.

What is your exact cp command. Are you using cp.b or just cp? If you are 
using just cp your length is in multiples of dwords (4 bytes). Did you 
scale your size accordingly?

Also, I did not verify this but the cp command as it is implemented now 
probably requires the start and end address to reside in a single flash 
bank. Even if your two flashes have contiguous addresses assigned they 
are still two banks. If you need to copy to flash that spans over two 
banks you will probably need to split that into two operations.

> Ramdisk image size was 0x18CFC9
> Baseaddress:	0x40100000
> ramdisk size: +	0x0018CFC9
> ------------------------------
> end address     0x4028CFC9
> And this adress is surely not outside my flash. What is going on here?

You are crossing flash banks and your write is not ending in the bank 
you started with.

Best regards,

More information about the U-Boot mailing list