NFS System for Linux and arm Development Board in VMware environment [Image and text]

Source: Internet
Author: User

 

Finally, the arm_linux platform was ready under VMWare, and many detours were taken. It is actually very simple. Now I want to summarize it and hope it will help later scholars.

Basic Environment: Host OS: Windows XP

Virtual Machine: VMware Workstation 6.0

Virtual OS: Red Hat 9.0

Arm model: friendly arm qq2440

Procedure:

 

1. Virtual Machine Settings:

1: When installing VMWare, select "use bridged networking" as the network connection, for example:

 

Why do I need to select bridging? This method is to directly bridge the virtual network card to a physical network card. It is similar to binding two different addresses to the next network card in Linux. In fact, the network card is set to the hybrid mode, this allows you to listen on multiple IP addresses. In this mode, the network card (for example, eth0 in Linux) inside the virtual machine is directly connected to the network where the physical network card is located. It can be imagined that the virtual machine and the host machine are in the same status, the network relationship is equal, and no one is behind it. This method is easy to use, provided that you can get more than one address. It is not suitable for anyone who wants to conduct various network experiments, because you cannot control the network of the virtual machine and it goes out directly. The schematic diagram is as follows:

 

2: After installing VMware and Red Hat (remember to install the NFS installation package), configure the Linux network. Because the IP address of my Development Board is 192.168.1.230, to ensure that they are in the same network segment. Therefore, set the Linux network to 192.168.1.15 and mask to 255.255.255.0. Click "Activate. For example:

3: Set the IP address of the host to 192.168.1.110 and the subnet mask to 255.255.255.0. (In fact, this step can be omitted, but I still set it to use the network interface of the host ).

4: link the host network port with the development board network port, and open the terminal in Linux. Ping 192.168.1.110 or 192.168.1.230. If you cannot ping the host, check the network, especially the firewall settings. If the ping rule is general, the connection goes smoothly. (You can also create a Super Terminal and start it with NAND Flash. You can also ping it)

5: based on the information provided by the friendly arm. Install NFS. Paste the information as follows:

5.1 configure the Network File System NFS service

If you have fully installed Red Hat 9.0 according to the methods described above, the NFS-related software has

The NFS service is installed by default. Follow these steps to create and configure the NFS service.

(1) set the shared directory

Run commands

# Gedit/etc/exports

Edit the NFS service configuration file (Note: The file is empty when it is opened for the first time) and add the following content:

/Opt/friendlyarm/qq2440v3/root_nfs * (RW, sync, no_root_squash)

Where:

/Opt/friendlyarm/qq2440/root_nfs indicates the NFS shared directory, which can be used as the root file system of the Development Board.

Mounted through NFS;

* Indicates that all clients can mount the directory.

RW indicates that the Client Connected to this directory has the permission to read and write the directory.

No_root_squash indicates that the Client Connected to this directory is allowed to have the root identity of the host.

(2) create a shared directory

Copy the root_nfs.tgz file from the CD to a directory and run the following command:

# Tar xvzf root_nfs.tgz-C/opt/friendlyarm/qq2440/root_nfs

This command will decompress the root_nfs content and install it to the/opt/friendlyarm/qq2440/root_nfs directory.

(3) start and stop the NFS service

Run the following command line:

#/Etc/init. d/nfs start

This will start the NFS service. You can enter the following command to check whether the NFS service is started.

# Mount-t nfs localhost:/opt/friendlyarm/qq2440/root_nfs/mnt/

If no error message is displayed, you can view the content in the/mnt directory and

/Opt/friendlyarm/qq2440/root_nfs are consistent.

Use this command to stop the NFS service:

#/Etc/init. d/nfs stop

You can enter

# Red Hat-config-services

Open the system service configuration window, find the NFS service option box in the left column, select it, and click File-> Save

Changes Save settings ,.

Ii. Development Board settings

1: Start the system through NFS

After the NFS service is set and started, we can use NFS as the root file system to start the development board. By using NFS as the root file system, the "Hard Disk" of the Development Board can become very large, because you are using the hard disk of the host, which is frequently used in Linux development, set the target board Boot Mode jumper J1 to nand flash Boot, connect the power supply, serial line, network cable; open the serial port terminal, and quickly press the Space key of the PC when starting or resetting, in this way, we enter the VIVI mode and enter the following command:

Supervivi> param set linux_cmd_line "console = ttys0 root =/dev/nfs

Nfsroot = 192.168.1.15:/opt/friendlyarm/qq2440/root_nfs

IP = 192.168.1.230: 192.168.1.15: 192.168.1.15: 255.255.255.0: qq2440v3.arm9.net: eth0: off"

Enter boot and press enter to start the system through NFS.

2: Run Through Network File System NFS

The most common method in Linux is to use NFS to execute various programs, so that you do not have to spend a lot of time downloading the program. Although it may take a long time to download the hello program, once your application grows larger, you will find it easy to run with NFS. Set up the NFS server system as described earlier, and then enter the following command on the command line:

# Mount-T nfs-O nolock 192.168.1.15:/opt/friendlyarm/qq2440/root_nfs/mnt

After the connection is successfully mounted, you can access the/mnt directory and copy hello to your PC Linux terminal.

OPT/friendlyarm/qq2440/root_nfs directory, and then run

# Cd/mnt

# Ls

Then you can see that the files in root_nfs in Linux are the same as those in/mnt on the Development Board.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.