Development board mounts nfs to Linux

  • Flip the switch of the development board, start the development board, and wait a few seconds. Enter the root file system.
  • Insert image description here
    Press Enter before the countdown to enter the FS6818# interface.
    Insert image description here
    Insert image description here

1. Virtual machine settings

  1. Edit - Virtual network settings, VMnet0 is set to bridge mode, and the network cable is directly connected. In the picture, automatic is selected, don't be misled.
    Insert image description here

  2. Virtual machine-Settings-Network adapter-Bridged mode
    Insert image description here

  3. Add a new network for the development board and manually configure the IP
    Insert image description here
    4. Install nfs, modify the configuration file, set the root directory of the server, and restart nfs
    4.1 sudo apt-get install rpcbind nfs-kernel-server
    Insert image description here
    Insert image description here
    Insert image description here

  4. Mount nfs on the development board. First ping the virtual machine to see if the ping can succeed. Set the development board IP
    ifconfig eth0 192.168.100.200
    mount -t nfs -o nolock 192.168.100.200:/opt/rootfs /nfs

  5. After successful mounting, the contents of the newly created /opt/rootfs/ folder in the virtual machine can be shared.

  6. When compiling a program using a cross-compilation tool chain in a virtual machine, you need to specify -std=c99, because the cross-compilation tool chain defaults to c89 mode. arm-none-linux-gnueabi-gcc *.c -std=c99
    Insert image description here

kk 2023-06-08 18-22-35

The development board and the virtual machine must be on the same network segment, and the Windows firewall must be turned off.
There are many reasons for ping failure. It is strange and you need to find it yourself. It may be because the development board is broken or the line is not connected properly. Sometimes restarting works, but restarting again doesn't work.
Unable to mount error: Confusion connected, No route to host.

Another method is to use a router to set up a LAN.

  1. Virtual machine settings, create a new Ethernet network, and automatically obtain an IP. Virtual machine-edit-virtual network settings-bridge mode-automatic. Virtual machine-Settings-Network adapter-Bridged mode.
    ](https://img-blog.csdnimg.cn/bc84bf2da63f4b20b34f3ccc4a71026a.png)

Insert image description here

Insert image description here

The next steps are the same as before.

If the virtual machine and the development board cannot ping each other,
disable the network card first, then enable it.
Insert image description here
Click Ethernet-Properties-IPv4 Settings-Set the same network segment (DNS can be filled in or left blank)
Insert image description here

Guess you like

Origin blog.csdn.net/qq_52531759/article/details/131116455
Recommended