This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

unable to boot from NFS with static ip on am335x evm (sdk6)

Hi.

I'm using am335x gp evm, sdk6

With default uboot environment variable, it can boot from NFS.

It's default setting for netboot is supposed to use dhcp as follows

U-Boot# pri netargs
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp

And It should work with static ip. I did it successfully with freescale i.mx6 platform before.

So, I configured some u-boot environment variable as follows

set serverip 10.175.93.15     !! tftp & nfs server ip

set ipaddr 10.175.93.16        !! am335x gpevm ip

set netargs "setenv bootargs console=${console} ${optargs} root=/dev/nfs fsroot=${serverip}:${rootpath},${nfsopts} rw ip=${ipaddr}"                      !! dhcp --> ${ipaddr}

then, run the following commands

tftp ${loadaddr} uImage

run netargs

bootm ${loadaddr}

But kernel still try to get dynamic ip before loading nfs. 

here's kernel log

[ 1.886352] mmc0: new SDHC card at address e624
[ 1.891784] mmcblk0: mmc0:e624 SD04G 3.69 GiB
[ 1.900878] mmcblk0: p1 p2
[ 3.851257] PHY: 0:00 - Link is Up - 100/Full
[ 3.870300] Sending DHCP and RARP requests ....                                   !!! it tries to get dynamic ip. why????
[ 24.023956] DHCP/BOOTP: Reply not for us, op[2] xid[4f312349]
[ 24.030181] DHCP/BOOTP: Reply not for us, op[2] xid[4f312349]
[ 31.520294] ..
[ 60.061492] DHCP/BOOTP: Reply not for us, op[2] xid[58ed13ec]
[ 60.070129] DHCP/BOOTP: Reply not for us, op[2] xid[58ed13ec]
[ 84.040313] timed out!
[ 84.047790] IP-Config: Retrying forever (NFS root)...
[ 84.057403] net eth0: CPSW phy found : id is : 0x4dd074
[ 84.070068] PHY 0:01 not found
[ 86.051269] PHY: 0:00 - Link is Up - 100/Full
[ 86.070343] Sending DHCP and RARP requests ., OK                  !!! After several trials, it manages to get dynamic ip
[ 86.110778] IP-Config: Got DHCP answer from 0.0.0.0, my address is 10.175.91.142
[ 86.121185] IP-Config: Complete:
[ 86.124572] device=eth0, addr=10.175.91.142, mask=255.255.255.0, gw=10.175.91.254,  !!! and load nfs with that dynamic ip
[ 86.132751] host=10.175.91.142, domain=LGE.NET, nis-domain=(none),
[ 86.139648] bootserver=0.0.0.0, rootserver=10.175.93.15, rootpath=
[ 86.245056] VFS: Mounted root (nfs filesystem) on device 0:14.
[ 86.251678] Freeing init memory: 236K

What's the problem?

How can I make netboot to work with static ip?

I did it successfully on other CPU board with the same u-boot environment variables.