Use Uboot to start the kernel and mount the NFS root file system.
After the kernel is compiled, copy the generated Kernel File uImage to/tftpboot/, download the kernel to the Development Board through the tftp server, and run the command: tftp 31000000 uImage. after the download is complete, configure the bootargs environment variable: setenv bootargs noinitrd console = ttySAC0, 115200 init =/init root =/dev/nfs rw nfsroot = 192.168.1.118:/home/rootfs, proto = tcp, nfsvers = 3 ip = 192.168.1.119: 192.168.1.118: 192.168.1.1: 255.255.255.0: eth0: off
Because the udp protocol is used by default when an nfs file system is mounted, dm9000 frequently reports packet loss (packet loss rate is greater than 50%) and changes the network protocol to tcp to solve the problem.
Run bootm 31000000 After configuring the startup parameters to start the kernel and mount the nfs system.
However, the kernel file is burned to nand flash and the bootcmd command is configured: setenv bootcmd nand write 31000000 300000 \; bootm 300000
Restart the Development Board and find that the kernel is successfully started but the root file system fails to be mounted:
The error message indicates that the NIC cannot be found. The experiment found that if the tftp Command is run before the bootm command, the system can be mounted successfully. If the tftp command is not run, the bootm command fails. You can only use network commands to enable the NIC when the Development Board is running in uboot. The cause may be that the NIC Driver corresponding to the kernel does not enable the NIC.