Linux Cross-build Environment Setup and NFS file system mounts

Source: Internet
Author: User

Cross-compilation environment construction

1. Prepare the cross-compiler toolchain arm-linux-gcc-4.3.2.tgz and put it on Ubuntu Linux system

I shared it with a linux system in a virtual machine by creating a shared file on Windows

First create a shared folder under Windows (do not understand Baidu), and then set up on the virtual machine

Virtual Machine -"Settings -" option -"Share folder, then turn on the checkmark and select the path as just in windows

After you start the Ubuntu System,cd/mnt/hgfc/ can see the shared directory and content

2. Unzip, install the cross-compilation tool chain

Mkdir/usr/local/arm Create a directory, and then move the toolchain arm-linux-gcc-4.3.2.tgz to that directory,

TAR-ZXVF arm-linux-gcc-4.3.2.tgz with the command in the current directory decompression, there will be a new directory 4.3.2 , write down its path

3. Setting Environment variables

Sudo vi/etc/profile enters the file and adds a sentence at the end of the export path= $PATH:/usr/local/arm/4.3.2 ( This is the path that was just unzipped, Write to the path according to the Truth ), and then save the exit, then you can.

4. Restart the /etc/profile file

Source/etc/profile Restart the script with this command

arm-linux-gcc -v  ubuntu Span style= "FONT-FAMILY:CALIBRI;" >64  ****not  found,   you need to install it yourself 32 :arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2 HELLO WORLD  program, with ARM-LINUX-GCC  compile to verify that the installation was successful.

6. Migrate the executable files compiled with ARM-LINUX-GCC to the Development Board to run. (Here are a number of methods,FTP transmission, serial port transmission,SD card copy, etc., I used to put the ubuntu System in the /Home mount to the developed / tmp directory, and then copy the executable file directly past it .

1". in the Ubuntu installed on NFS Network File system:

Sudo apt-get Install Nfs-kernel-server Nfs-common

Sudo vi/etc/exports Add a sentence at the end of the file /* (Rw,sync,no_root_squash)

Sudo Service Nfs-kernel-server Restart Restart Services effective

2. set the IP address of the Ubuntu system and the Development Board network card respectively , let them in the same network segment, for example

In the unbuntu System, set up the NIC eth0

Ifconfig eth0 10.1.1.3 netmask 255.255.255.0

On the arm Development Board, set up the NIC eth0 ( These two network cards are connected directly through the network cable )

Ifconfig eth0 10.1.1.2 netmask 255.255.255.0

Then Ping each other to see if you have figured it out.

3. mount the ubuntu system in /home on the arm Development Board

Mount-o nolock 10.1.1.3 (ubuntu IP address ):/home/tmp

Then into the Development Board's/ tmp directory is equivalent to enter the ubuntu System's /Home (contrast, whether the same,)

4. use the CP Operation on the Development Board to ARM-LINUX-GCC the Linux ubuntu system The compiled executable file is copied to

On the Development Board, you can run it.

Reference URL: http://www.linuxidc.com/linux/2013-06/85902.htm

Linux Cross-build Environment Setup and NFS file system mounts

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.