* [U-Boot-Users] copy to flash ... outside available flash
@ 2006-11-13 11:56 Thomas Ruschival
2006-11-13 12:15 ` Martin Krause
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Thomas Ruschival @ 2006-11-13 11:56 UTC (permalink / raw)
To: u-boot
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
Sector Start Addresses:
40000000 (RO) 40008000 (RO) 4000C000 (RO) 40010000 (RO) 40020000 (RO)
40040000 40060000 40080000 400A0000 400C0000
400E0000 40100000 40120000 40140000 40160000
40180000 401A0000 401C0000 401E0000 40200000
40220000 40240000 40260000 40280000 402A0000
402C0000 402E0000 40300000 40320000 40340000
40360000 40380000 403A0000 403C0000 403E0000
Bank # 2: AMD AM29LV160B (16 Mbit, bottom boot sect)
Size: 4 MB in 35 Sectors
Sector Start Addresses:
40400000 40408000 4040C000 40410000 40420000
40440000 40460000 40480000 404A0000 404C0000
404E0000 40500000 40520000 40540000 40560000
40580000 405A0000 405C0000 405E0000 40600000
40620000 40640000 40660000 40680000 406A0000
406C0000 406E0000 40700000 40720000 40740000
40760000 40780000 407A0000 407C0000 407E0000
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.
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?
BTW I use U-Boot 1.1.4 (Sep 18 2006 - 13:38:13) on a PPC823 with 16MB RAM
and 8 MB Flash.
Thanks for any input!
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot-Users] copy to flash ... outside available flash
2006-11-13 11:56 [U-Boot-Users] copy to flash ... outside available flash Thomas Ruschival
@ 2006-11-13 12:15 ` Martin Krause
2006-11-13 16:45 ` Tolunay Orkun
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Martin Krause @ 2006-11-13 12:15 UTC (permalink / raw)
To: u-boot
Hi Thomas,
u-boot-users-bounces at lists.sourceforge.net wrote on :
[...]
> 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.
> 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?
Could you please post the commands you used to load the image and copy
it to flash, including the returned error message?
Regards,
Martin
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot-Users] copy to flash ... outside available flash
2006-11-13 11:56 [U-Boot-Users] copy to flash ... outside available flash Thomas Ruschival
2006-11-13 12:15 ` Martin Krause
@ 2006-11-13 16:45 ` Tolunay Orkun
2006-11-13 19:38 ` Wolfgang Denk
2006-11-13 19:36 ` Wolfgang Denk
2006-11-14 10:48 ` Thomas Ruschival
3 siblings, 1 reply; 8+ messages in thread
From: Tolunay Orkun @ 2006-11-13 16:45 UTC (permalink / raw)
To: u-boot
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
(snip)
> 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
cfi_flash.c
> 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,
Tolunay
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] copy to flash ... outside available flash
2006-11-13 16:45 ` Tolunay Orkun
@ 2006-11-13 19:38 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-11-13 19:38 UTC (permalink / raw)
To: u-boot
In message <4558A10C.8090207@orkun.us> you wrote:
>
> What flash driver are you using? This is not the output from standard
> cfi_flash.c
That's an old custom flash driver. IIRC, the very first one ever in
U-Boot resp. PPCBoot.
> What is your exact cp command. Are you using cp.b or just cp? If you are
That's muy guess, too.
> 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.
No, this should NOT be necessary.
[And if it was, I'd consider it a bug.]
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When properly administered, vacations do not diminish productivity:
for every week you're away and get nothing done, there's another when
your boss is away and you get twice as much done. -- Daniel B. Luten
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] copy to flash ... outside available flash
2006-11-13 11:56 [U-Boot-Users] copy to flash ... outside available flash Thomas Ruschival
2006-11-13 12:15 ` Martin Krause
2006-11-13 16:45 ` Tolunay Orkun
@ 2006-11-13 19:36 ` Wolfgang Denk
2006-11-14 10:48 ` Thomas Ruschival
3 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-11-13 19:36 UTC (permalink / raw)
To: u-boot
In message <20061113115625.6c0d99ca@localhost> you wrote:
>
> 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:
No, it does not. At least not here.
> 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.
Right.
> 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.
> 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 must be doing something awfully wrong, like using "cp" instead of
"cp.b". Unfortunately you don't provide the exact command you used,
so I can only guess. But I bet a case of beer that it's a PEBKAC.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
panic: can't find /
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] copy to flash ... outside available flash
2006-11-13 11:56 [U-Boot-Users] copy to flash ... outside available flash Thomas Ruschival
` (2 preceding siblings ...)
2006-11-13 19:36 ` Wolfgang Denk
@ 2006-11-14 10:48 ` Thomas Ruschival
2006-11-14 10:36 ` Demke Torsten-atd012
2006-11-14 21:14 ` Wolfgang Denk
3 siblings, 2 replies; 8+ messages in thread
From: Thomas Ruschival @ 2006-11-14 10:48 UTC (permalink / raw)
To: u-boot
Here are the commands I loaded the image with:
now I got a different error. It claim the flash wasn't erased?
1.) load image
loadb 100000
// here I am sending the image
## Total Size = 0x0018cfc9 = 1626057 Bytes
## Start Addr = 0x00100000
2.) Verify The Image
=> imi
## Checking Image at 00100000 ...
Image Name: Simple Embedded Linux Framework
Created: 2005-06-07 12:59:15 UTC
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 1625993 Bytes = 1.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
3.) erase the flash
=> erase 40100000 403FFFFF
.............. done
Erased 24 sectors
4.) Copying the image
=> cp 100000 40100000 18cfc9
Copy to Flash... Flash not Erased
What is this?? Now I can't even copy things into flash. After copying for
a while it brings this error.
Second attempt: istead of erasing 40100000 to 403FFFFF I erase what is
needed :
=> erase 4010000 +18CFC9
...... done
Erased 13 sectors
=> cp 100000 40100000 18CFC9
Copy to Flash... Flash not Erased
I have no clue what is going on here?
Any input for me?
thanks in advance
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot-Users] copy to flash ... outside available flash
2006-11-14 10:48 ` Thomas Ruschival
@ 2006-11-14 10:36 ` Demke Torsten-atd012
2006-11-14 21:14 ` Wolfgang Denk
1 sibling, 0 replies; 8+ messages in thread
From: Demke Torsten-atd012 @ 2006-11-14 10:36 UTC (permalink / raw)
To: u-boot
Hi,
did you read the answers from Wolfgang and others carefully?
> 4.) Copying the image
> => cp 100000 40100000 18cfc9
This will copy 6504228(633f24 = 4*18cfc9) bytes!
Please try:
=> cp.b 100000 40100000 18cfc9
Regards,
Torsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] copy to flash ... outside available flash
2006-11-14 10:48 ` Thomas Ruschival
2006-11-14 10:36 ` Demke Torsten-atd012
@ 2006-11-14 21:14 ` Wolfgang Denk
1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-11-14 21:14 UTC (permalink / raw)
To: u-boot
In message <20061114104800.6dfba789@localhost> you wrote:
> Here are the commands I loaded the image with:
> now I got a different error. It claim the flash wasn't erased?
Correct error message.
> => cp 100000 40100000 18cfc9
> Copy to Flash... Flash not Erased
Please RTFM about the correct use of the cp (resp. the cp.b) command.
> I have no clue what is going on here?
> Any input for me?
There were already two postings on this list which pointed out that
you are using hte "cp" command with wrong length parameter.
Please RTFM!!!! (ideally *before* posting)
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The alternative to genuflecting before the god of code-bumming is
finding a better algorithm. It should be clear that none such was
available. If your code is too slow, you must make it faster. If no
better algorithm is available, you must trim cycles.
- td at alice.UUCP (Tom Duff) 29 Aug 88
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-11-14 21:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-13 11:56 [U-Boot-Users] copy to flash ... outside available flash Thomas Ruschival
2006-11-13 12:15 ` Martin Krause
2006-11-13 16:45 ` Tolunay Orkun
2006-11-13 19:38 ` Wolfgang Denk
2006-11-13 19:36 ` Wolfgang Denk
2006-11-14 10:48 ` Thomas Ruschival
2006-11-14 10:36 ` Demke Torsten-atd012
2006-11-14 21:14 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.