Hi3536 Mount NFS root filesystem tips

This is my first time to write blog article.If there is something wrong with it,please tell me,thanks.


Recently,we have one project that will uses Hi3536 and do some labs on the demo board with the newest Hisilicon SDK.

In order to debug the demo board,we want to mount the kernel to network filesystem and we run into problem with mounting NFS.


we find the followings should be enabled in linux kernel:

1.The network driver should be built in to the kernel;


2.Enable the root file system on NFS


Finally, recompile the kernel

make -j8 LOADADDR=0x40008000 uImage

and download the kernel to ram and run:

tftp 42000000 uImage

bootm

after these we get  "IP-Config: Incomplete network configuration information" message and kernel panic.

We try to find where the information is printed,and get the following information:

net/ipv4/ipconfig.c

1166         /*
1167          * If none of DHCP/BOOTP/RARP was selected, return with an error.
1168          * This routine gets only called when some pieces of information
1169          * are missing, and without DHCP/BOOTP/RARP we are unable to get it.
1170          */


and enable the DHCP/bootp/RARP in kernel.


redo make and download,the kernel can't get the IP info configured by using DHCP and very slowly(why this happen?Now I have no idea about this.)


So try to use static ip address and adjust the boot cmd:

setenv bootargs mem=128M console=ttyAMA0,115200 root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:none init=/linuxrc

saveenv

and reset, redo download and run,the kernel mount to NFS root.


Download the kernel to flash and set up the bootcmd and reset,we get it worked.


Expect this will help you to a certain extend.


Thanks.