For many embedded driver developers, to do many debugging, if NFS is not set up, then the development is very inconvenient. After three days, I finally downloaded my own kernel to the Development Board, and implemented the NFS file system mount. Write down the process today.
Ideas
A compiled arm kernel
#make menuconfig arch=arm//Compile Kernel configuration menu
(1) Put the general-> under the
[]initial.//Remove the item. Press N.
(2) Enter the file system
Find Network FileSystem
[*]root filesystem//Select this
Two Configuration Development Board Uboot environment variables
#setenv Bootargs noinitrd console=ttysac0,115200 init=/init root=/dev/nfs rw nfsroot=192.168.1.108:/home/s5-driver/ Lesson8/rootfs Ip=192.168.1.107:192.168.1.108:192.168.1.1:255.255.255.0::eth0:off
Root=/dev/nfs root file system, set to NFS.
NFSROOT=192.168.1.108:/home/s5-driver/lesson8/rootfs This is the file location for NFS mounts. Everyone is different, see where your file system is installed.
ip=192.168.1.107 This is the IP address of the development Board, followed by the virtual machine address, gateway, DNS.
Et0 this is assigning the address to the first NIC.
Off off dynamic IP assignment
Three-host terminal operation
#vim/etc/exports
Add a line/home/s5-driver/lesson8/rootfs * (Rw,sync,no_root_squash)
#/etc/init.d/nfs Restart Restart NFS
Four TFTP cores on the Development Board.
#tftp 20000000 Uimage
#bootm Uimage
The kernel can be seen to boot up. LS to see, you can mkdir a folder on the virtual machine to see if the Development Board can be synchronized. There is no problem with the description, of course, the kernel does not have a root file system and is not successfully started.
Mounting Methods for NFS