[U-Boot] Variable content dump to memory

Hello,
I'm trying to write the contents of a variable to a file using ext4write but it requires a memory address as input. Is there an easy way to get the contents of a variable to a particular mem address?
Best regards, Nicolae

On 03/24/2016 03:30 AM, Nicolae Rosia wrote:
Hello,
I'm trying to write the contents of a variable to a file using ext4write but it requires a memory address as input. Is there an easy way to get the contents of a variable to a particular mem address?
You weren't completely specific about your needs, but assuming you are wanting to write a U-Boot environment variable to memory, try something like
=> # set up a test value => setenv var 12345678 => printenv var var=12345678 => => # do the actual write => mw.l 80020000 $var 1 => => # observe memory was set => md.l 8001fff0 c 8001fff0: 67ffedc4 dbc98df5 8e71cdd4 628fcacd ...g......q....b 80020000: 12345678 a2fe8db5 df34c767 636dbd37 xV4.....g.4.7.mc 80020010: 375dfdcb fde86ca2 3f273cdf 1fe951f9 ..]7.l...<'?.Q..
Also, "help mw".
This was done on something similar to beaglebone x15. You will need to use memory addresses that are valid for your target system.
Jim
Best regards, Nicolae _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On Thu, Mar 24, 2016 at 7:51 PM, James Chargin jimccrown@gmail.com wrote: [...]
You weren't completely specific about your needs, but assuming you are wanting to write a U-Boot environment variable to memory, try something like
You're right. I'm trying to do the following: U-Boot# setenv mytext 'This is a long text' U-Boot# printenv mytext mytext=This is a long text and somehow write it to a memory address so I can use it with ext4write.
Best regards, Nicolae

Dear Nicolae,
On 03/25/2016 02:12 AM, Nicolae Rosia wrote:
On Thu, Mar 24, 2016 at 7:51 PM, James Chargin jimccrown@gmail.com wrote: [...]
You weren't completely specific about your needs, but assuming you are wanting to write a U-Boot environment variable to memory, try something like
You're right. I'm trying to do the following: U-Boot# setenv mytext 'This is a long text' U-Boot# printenv mytext mytext=This is a long text and somehow write it to a memory address so I can use it with ext4write.
I don't have a solution to your needs, unfortunately. I thought my solution might be for a problem more simple than you were asking about.
Perhaps someone else on the mailing list has an idea.
Jim
Best regards, Nicolae
participants (2)
-
James Chargin
-
Nicolae Rosia