Download the execution file to the Development Board through the Network File System NFS in ubuntu, and run tunfs

Source: Internet
Author: User

Download the execution file to the Development Board through the Network File System NFS in ubuntu, and run tunfs

Thanks for the hard work, we finally finished the NFS network.

First, the computer and the Development Board need to be connected to the router to form a LAN (I ignored this ...)

PC: Ubuntu 12.04

Development Board: linux 2.6.32.2 click to view ubuntu to burn linux TO THE DEVELOPMENT BOARD


I. PC terminal's friendly arm. How convenient is it to use NFS network files? I just gave a rough introduction to it, and there are also Chapter labeling issues in the article. Okay, this is the first time

1. Install NFS

#Sudo apt-get install nfs-kernel-server portmap

2. Configure the exports sharing path

#Mkdir/NFSroot// Create the NFSroot directory

#Chown lianghuiyong/NFSroot// Lianghuiyong is a common user of mine (chown in ubuntu and chmod in others)

#Sudo vim/etc/exports// Configure the shared path

Added:

<span style="font-family:Microsoft YaHei;">/NFSboot 192.168.1.102(insecure,rw,sync,no_root_squash)</span>


/NFSboot is a shared folder on the PC. to mount a file to the Development Board, you only need to copy the file to/NFSboot, and the development board can access the file through NFS.


3. pc-side IP settings

The default ip address of the Development Board System is 192.168.1.230.

On the pc end, I set it to a static IP address.



4. Restart NFS

#Sudo/etc/init. d/portmap restart
#Sudo/etc/init. d/nfs-kernel-server restart

5. I don't know if the firewall has any influence, but I disabled it before.

#Ufw disable

6. I encountered some problems before, and I didn't have to make these changes.

#Vim/etc/hosts. deny

Add the last six rows, as shown in figure



#Vim/etc/hosts. allow

Modify the image as shown in the following figure:


This is the pc end.


Ii. Development Board 1. Open minicom // view ubuntu to install minicom
2. The Development Board nandflash is powered on (ensure that the Development Board, computer and router form a LAN)
3. Input [root @ FriendlyARM/] In minicom on the nfs network file Development Board. # Mount-t nfs-o nolock 192.168.1.102:/NFSboot/mnt


(I added several files to NFSboot for verification.) There should be no errors. If there are any errors, let's look at the typical quote of the class teacher: Haha... Note:-O nolock cannot be less, but I cannot mount it if I miss it. The command is to mount the/NFSboot directory of 192.168.1.102 (PC end) to the/mnt directory under the Development Board to access the/mnt directory of the Development Board to access the/NFSboot directory on the PC end.
Detach an nfs network file # Umount/mntError records:
<span style="font-family:Microsoft YaHei;">[root@FriendlyARM /]# mount -t nfs -o nolock 192.168.1.102:/NFSboot /mnt        mount: 192.168.1.102:/NFSboot failed, reason given by server: Permission denied </span>
Solution: On a PC# Exportfs-r

3. Run hello and FriendlyARM on the sample Development Board! Everything starts with hard PC # Cd/opt/FriendlyARM/mini2440/examples/hello/// Open the sample source file # Arm-linux-gcc-g hello. c-o hello// Compile and generate a hello File

Error records (in the Development Board ):
<span style="font-family:Microsoft YaHei;">./hello: line 1: syntax error: "(" unexpected</span>
Add the-g parameter when using arm-linux-gcc.

# Cp hello/NFSboot/// Copy to the NFS network folder



NFS network files must be mounted on the Development Board # Mount-t nfs-o nolock 192.168.1.102:/NFSboot/mnt# Cd/mnt
# Chmod + x hello// Add executable permissions # ./Hello
Done!

Reference: http://bbs.ednchina.com/BLOG_ARTICLE_376105.HTM
Embedded ARM: How can I mount a program file to a sub-board through NFS to put the program on the Development Board, usually under which folder?

Mount command # mount-t nfs 10.1.103.25:/home/tj/mnt-o noclock
The ip address is the ip address of the VM,
:/Home/tj is the host directory
/Mnt is the directory on the Development Board

Share linux system folders on the arm Development Board through nfs mounting

Write the Development Board driver on a PC
Download the same kernel source code as the kernel version on the Development Board
Use the kernel source code on a PC to compile the driver
The compiled driver is placed under the shared NFS directory.
Install ON THE DEVELOPMENT BOARD


Related Article

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.