[U-Boot-Users] Updating u-boot environment

Wolfgang Denk wd at denx.de
Tue Jan 25 21:58:18 CET 2005


In message <41F69395.3070003 at sun.com> you wrote:
> I need to write a program or shell script that can update u-boot 
environment (e.g. MAC address).
> Any pointers in how this may be done ?

A program or shell script  in  U-Boot?  No  program  needed,  as  the
"setenv"  command  is a builtin. Youc an put calls to the "setenv" or
"askenv" in a text file (= shell script), use the  mkimage  tool  (-T
script)  to  make script image from it,. load it and run it using the
"autoscr" command.

Under Linux, you can use the fw_setenv tool provided in tools/env/

Note that ithe MAC address is normally  write  protected,  i.  e.  it
cannot be changed once set. This is *intentional*.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Send lawyers, guns and money..."  - Lyrics from a Warren Zevon song




More information about the U-Boot mailing list