diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-20 17:43:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-08-20 17:46:54 +0200 |
commit | 7163d8fd2dfe656baf68f2a94d633073c979b45c (patch) | |
tree | 049c19f4e015f7b83600be46655cdda864ad53ae | |
parent | 0004d78381a7477f2e05fd2ab49ac9f8978a5aa6 (diff) | |
download | barebox-7163d8fd2dfe656baf68f2a94d633073c979b45c.tar.gz barebox-7163d8fd2dfe656baf68f2a94d633073c979b45c.tar.xz |
pcm038 defenv: Do not hardcode ip addresses, ask to set MAC address
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | board/pcm038/env/bin/init | 7 | ||||
-rw-r--r-- | board/pcm038/env/config | 16 |
2 files changed, 15 insertions, 8 deletions
diff --git a/board/pcm038/env/bin/init b/board/pcm038/env/bin/init index 33dabc2678..b698dd574d 100644 --- a/board/pcm038/env/bin/init +++ b/board/pcm038/env/bin/init @@ -16,6 +16,13 @@ if [ -e /dev/nand0 ]; then source /env/bin/hush_hack fi +if [ -z $eth0.ethaddr ]; then + while [ -z $eth0.ethaddr ]; do + readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr + done + echo -a /env/config "eth0.ethaddr=$eth0.ethaddr" +fi + echo echo -n "Hit any key to stop autoboot: " timeout -a $autoboot_timeout diff --git a/board/pcm038/env/config b/board/pcm038/env/config index e91cb0fb14..d6afdfbeba 100644 --- a/board/pcm038/env/config +++ b/board/pcm038/env/config @@ -4,14 +4,6 @@ kernel=net root=net -# use 'dhcp' todo dhcp in uboot and in kernel -ip=dhcp - -eth0.ipaddr=192.168.23.164 -eth0.netmask=255.255.255.0 -eth0.gateway=192.168.23.2 -eth0.serverip=192.168.23.2 - uimage=uImage-pcm038 jffs2=root-pcm038.jffs2 @@ -26,3 +18,11 @@ rootpart_nor="/dev/mtdblock3" nand_parts="256k(uboot)ro,128k(ubootenv),1536k(kernel),-(root)" rootpart_nand="/dev/mtdblock7" +# use 'dhcp' to do dhcp in uboot and in kernel +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d |