[U-Boot] Copy environment variables to another board

Giuseppe Modugno g.modugno at elettronika.it
Tue Dec 30 11:58:32 CET 2008


On 30 Dec 2008 at 11:52, Wolfgang Denk wrote:
> Assuming both boards have the same configuration (or, more precisely,
> at least the same size of environment and environment sectors),  

Yes, they are the same.


> then
> you can just read the sector(s) containing the environment from their
> corresponding  /dev/mtd*  devices  in  Linux and copy it to the other
> system.

So you're proposing to use Linux to copy U-Boot environment. But on a 
new board (picked from the shelf) I don't have Linux and I should set 
some U-Boot variables to run it.

I was thinking of a "U-Boot only" procedure, like md.b (to run on the 
source board) and cp.b (to run on the destination board). In this way 
I must copy&paste the md.b text result from the terminal to a file, 
process it (on the computer) to have a binary content of the 
environment, download (by TFTP) it on the destination board and run 
cp.b.
What do you think about this procedure?

Another possibility is to printenv on the source board, copy the text 
result from the terminal into a text file, append "setenv " at the 
top of each lines, substitute = character with space, insert the 
quotes where needed and paste the result in the terminal of the 
destination board.



More information about the U-Boot mailing list