Tricky advice needed: copy value of an environment variable into ram
Hi,
I need an idea on how to copy the value of an environment variable into RAM.
Let's say serial#=ABC1234, then I want to get ABC1234 into RAM at address 0x100000. Is this possible with some tricky u-boot commands?
It the PMC405 target where I want to do this and hopefully without modification to the u-boot configuration.
Matthias
Quoted 2 lines · In message <[email protected]> you wrote:
I need an idea on how to copy the value of an environment variable into RAM.
All environment ariables are already stored in RAM when U-Boot is running.
Quoted 2 lines
Let's say serial#=ABC1234, then I want to get ABC1234 into RAM at address
0x100000. Is this possible with some tricky u-boot commands?
Ah! you mean, you want to have the copy on a specific address :-)
I'm afraid there is no way to do this. We don;t have a comand that takes a strin on input and stores it to a specific address, and we don't have enough of shell tools to split and convert to hex either.
You probaly will have to to implement the "mw.s" (memory write string) command...
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de No one may kill a man. Not for any purpose. It cannot be condoned. -- Kirk, "Spock's Brain", stardate 5431.6