Hi,all:
in uboot I can use tftp. But got some problem when booting Kernel.
1、bootargs(Static IP) as follow:
setenv bootargs mem=54M console=ttyS0,115200n8 root=/dev/nfs noinitrd rw nfsroot=192.168.98.251:/tftpboot/fsbb,nolock ip=192.168.138.169:192.168.98.251:192.168.98.1:255.255.255.0:::off eth=08:00:3e:26:0a:8c
Kernel output:
eth0: attached PHY driver [RTL8201 Gigabit Ethernet] (mii_bus:phy_addr=1:1f, id=8201)
IP-Config: Gateway not on directly connected network.
Looking up port of RPC 100003/2 on 192.168.98.251
PHY: 1:1f - Link is Up - 100/Full
Finally Kernel cannot mount the NFS.
2、bootargs(DHCP) as follow:
setenv bootargs mem=54M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=192.168.98.251:/tftpboot/fsbb eth=08:00:3e:26:0a:cc ip=dhcp
Kernel output:
eth0: attached PHY driver [RTL8201 Gigabit Ethernet] (mii_bus:phy_addr=1:1f, id=8201)
Sending DHCP requests .
PHY: 1:1f - Link is Up - 100/Full
., OK
IP-Config: Got DHCP answer from 192.168.98.1, my address is 192.168.98.3
IP-Config: Complete:
device=eth0, addr=192.168.98.3, mask=255.255.255.0, gw=192.168.98.1,
host=192.168.98.3, domain=, nis-domain=(none),
bootserver=192.168.98.1, rootserver=192.168.98.251, rootpath=
Looking up port of RPC 100003/2 on 192.168.98.251
Looking up port of RPC 100005/1 on 192.168.98.251
VFS: Mounted root (nfs filesystem) on device 0:12.
Kernel Mount NFS OK.
So it seems Kernel cannot parse the ip address and mac address from bootargs which is set in Uboot.
However , I have been using static IP for many ARM device , and never meet this situation before.
From board-dm365evm.c I can find out it gets mac address from SPI flash, or in davinci_emac.c the driver cannot find a valid mac address and it will use random one.
Here I have set the mac address to default values.
So , should I only use the DHCP method? How to change to static IP?
Thanks.