Hi
We have got our BSP up and running but I am looking for a way to set the MAC
and IP addresses
dynamically instead of fixing them in the start up script.
Currently I have the two lines:
io-net -c1 -ptcpip cache=1 -dmpc5200 mac=004042012580
ifconfig en0 192.168.1.62
In my startup-script.bsh.
We have the MAC and IP addresses stored at a certain address in the FLASH
and I have written a tool to get them from there. I can call the tool
supplying the address I am interested in as a command line parameter and the
tool will then output the value of the variable:
getaddr ipaddr
10.20.0.210
getaddr ethaddr
0040420125D1
In the normal shell I can use back-apostrophes (or whatever they are
properly called) to use the output of the command as parameter for another
command.
So I can use
ifconfig en0 getaddr ipaddr
to set the ip address to the address stored in FLASH.
I have included my tool in the BSP image that I am building and replaced the
two lines from the script shown above with
io-net -c1 -ptcpip cache=1 -dmpc5200 mac=getaddr ethaddr
ifconfig en0 getaddr ipaddr
but apparently the trick of using back-apostrophes does not work in the
startup script.
I am sure that there is a solution to this problem, can anyone give me a
hin`t?
Thanks
/urs