[U-Boot] Copy environment variables to another board

Wolfgang Denk wd at denx.de
Tue Dec 30 11:52:05 CET 2008


Dear "Giuseppe Modugno",

In message <495A0644.29557.A6846B at g.modugno.elettronika.it> you wrote:
>
> I have a board running U-Boot/Linux. U-Boot program, two U-Boot 
> environments, Linux kernel and root filesystem for Linux are stored 
> in a NOR Flash.
> 
> I finished my developing process and now I want to copy the entire U-
> Boot environment to a new board. Of course, I don't want to manually 
> copy all the variables in the environment.
> 
> Is there a simple way to dump the full environment in a file and copy 
> it in the new board?

Assuming both boards have the same configuration (or, more precisely,
at least the same size of environment and environment sectors),  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.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The great question... which I have not been able  to  answer...  is,
`What does woman want?'"                              - Sigmund Freud


More information about the U-Boot mailing list