hi,all.
I have a switch (dip16,up to 255 devices) on my board. So I can decide the
ipaddr when boot.
The ipaddr is set in misc_initr() function, use method:
setenv("ipaddr",xxx).
when I use tftp, it displays the correct ipaddr i set. for example:

TFTP from server 192.168.98.138; our IP address is 192.168.98.35 ( old ip is
:#define CONFIG_IPADDR 192.168.98.69)
.....
I use the bootcmd env to boot linux, like this:

#define CONFIG_BOOTCOMMAND "setenv bootargs mem=96M console=ttyS0,115200n8
root=/dev/nfs nfsroot=$(serverip):/tftpboot/mvfsnew
ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask) eth=08:00:3e:26:0a:5b;tftp
80700000 uImage;bootm 80700000"

however , when the kernel is booting , it change the old ip back as the
kernel ip:

IP-Config: Complete:
      device=eth0, addr=192.168.98.69, mask=255.255.255.0, gw=192.168.98.1,
     host=192.168.98.35, domain=, nis-domain=(none),
     bootserver=192.168.98.138, rootserver=192.168.98.138, rootpath=
Looking up port of RPC 100003/2 on 192.168.98.138
.....
finally I found that : IF I don't save env, the IP i config externally is
correct. But when I save env, the IP will use the env in flash.
How should i change this?
thanks.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to