[U-Boot-Users] Using memory value in a hush shell script?

What is the best way to use a value in a memory location in a hush shell scritpt that gets run with autoscript?
For example, say a CRC value for area 20000000 -- 20001000 is stored in a flash, at location 12345678. If I wanted to verify a crc against this value, I'd like to pass the value at address 12345678 as a last argument.
crc32 -v 20000000 1000 (data @ 12345678)
or is it better to just read the value from flash, store it in a local variable and use it?

In message e0590900608170852ub7d7e9i43e58f997d98338@mail.gmail.com you wrote:
What is the best way to use a value in a memory location in a hush shell scritpt that gets run with autoscript?
Use the "itest" command.
For example, say a CRC value for area 20000000 -- 20001000 is stored in a flash, at location 12345678. If I wanted to verify a crc against this value, I'd like to pass the value at address 12345678 as a last argument.
"itest" can use a pointer and dereference it, so you can pass the address instead of the value.
or is it better to just read the value from flash, store it in a local variable and use it?
There is no easy way to read a value from memory and store it in a variable.
Best regards,
Wolfgang Denk

Great. Thank you Wolfgang.
On 8/17/06, Wolfgang Denk wd@denx.de wrote:
In message e0590900608170852ub7d7e9i43e58f997d98338@mail.gmail.com you wrote:
What is the best way to use a value in a memory location in a hush shell scritpt that gets run with autoscript?
Use the "itest" command.
For example, say a CRC value for area 20000000 -- 20001000 is stored in a flash, at location 12345678. If I wanted to verify a crc against this value, I'd like to pass the value at address 12345678 as a last argument.
"itest" can use a pointer and dereference it, so you can pass the address instead of the value.
or is it better to just read the value from flash, store it in a local variable and use it?
There is no easy way to read a value from memory and store it in a variable.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de You can observe a lot just by watchin'. - Yogi Berra
participants (2)
-
mitsy
-
Wolfgang Denk