[uClinux-dev] bootloader environment

Richard Klingler richard.klingler at violasystems.com
Sat Mar 8 06:04:04 EST 2003


Good afternoon...(o;


Someone needs to access bootloader environment in uClinux?


Wrote some really small proc handler which gives
dynamically all environments defined in ppcboot
and u-boot as individual files under /proc:

# ls -l proc/viola
-rw-r--r--    1 0        0               0 Jan  1 00:31 baudrate
-rw-r--r--    1 0        0               0 Jan  1 00:31 bootcmd
-rw-r--r--    1 0        0               0 Jan  1 00:31 bootdelay
-rw-r--r--    1 0        0               0 Jan  1 00:31 ethaddr
-rw-r--r--    1 0        0               0 Jan  1 00:31 filesize
-rw-r--r--    1 0        0               0 Jan  1 00:31 gatewayip
-rw-r--r--    1 0        0               0 Jan  1 00:31 hostname
-rw-r--r--    1 0        0               0 Jan  1 00:31 ipaddr
-rw-r--r--    1 0        0               0 Jan  1 00:31 loadaddr
-rw-r--r--    1 0        0               0 Jan  1 00:31 netmask
-rw-r--r--    1 0        0               0 Jan  1 00:31 serverip
-rw-r--r--    1 0        0               0 Jan  1 00:31 stderr
-rw-r--r--    1 0        0               0 Jan  1 00:31 stdin
-rw-r--r--    1 0        0               0 Jan  1 00:31 stdout


So configuring ethernet is just like:

ifconfig eth0 `cat /proc/viola/ipaddr` netmask `cat /proc/viola/netmask` up


Rick
(maybe time to submit an article, but it's so easy to do ;o)

Richard Klingler             mail: richard.klingler at violasystems.com
Viola Systems Ltd.           http://www.violasystems.com/
Lemminkäisenkatu 32          phon: +358 (0)201 226 226
20520 Turku, Finland         mobile: +358 (0)40 748 4711



More information about the uClinux-dev mailing list