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

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

In message 6.2.0.14.1.20050525131123.03ce4e30@mail.int.acdstar.com you wrote:
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
Why didn't you simply use the existing tool/env/fw_env* code? Looks like it does the same, just in a more flexible way?
Best regards,
Wolfgang Denk
participants (3)
-
Bob Peterson
-
Jeff Angielski
-
Wolfgang Denk