[U-Boot-Users] tool to create environment on host?

Bob Peterson bob at acdstar.com
Wed May 25 20:28:56 CEST 2005


Hi All U-Booters,

I have written a simple u-boot environment modifying tool that you guys may 
find
useful.  (Attached).  The tool is essential for our company since our devices
often get to me all packaged up and the console serial port assigned to 
u-boot is
physically inaccessible.  The flash chips are pre-burned with our initial 
values,
defining the device as host ppc1 with a fixed mac address and ip address, but
we're often called upon to change those values after the fact.

Therefore, my tool is designed to switch a device's hostname, mac address,
and ip address in several places in the u-boot environment.  For example, to
change a device called ppc1 to ppc4, I can simply do something like this:

ssh ppc1
envtool 4

To print your current values for hostname, ip and mac address, I do:

envtool -print

To print all u-boot variables, I do:

envtool -printenv

I'm not claiming this tool is perfect, nor even elegant.  It is simple and 
effective,
and I'm stilling making tweaks here and there.

WARNING: The tool relies heavily upon the assumption that the u-boot
environment variables are being stored in /dev/mtdblock1.  That's how I have
the kernel for my icecube-based board set up.

To compile for icecube, do this:

ppc_6xx-gcc -o envtool envtool.c

Regards,

Bob Peterson
Advanced Communication Design
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: envtool.c
Url: http://lists.denx.de/pipermail/u-boot/attachments/20050525/1c3fa812/attachment.txt 
-------------- next part --------------



More information about the U-Boot mailing list