Install the cross-compilation tool chain Yourself

Source: Internet
Author: User

First, installation steps:

Step 1: Open the virtual machine and create the/usr/local/arm folder under/usr/local/

Step 2: First get the installation package from Windows to Linux. You can use shared folders, or you can use Samba or cuteftp.

Step 3: Unpack. TAR-JXVF arm-2009q3.tar.bz2

This is equivalent to the installation of the program, the real application is installed in the/usr/local/arm/arm-2009q3/bin directory

This is equivalent to the installation of the program, the real application is installed in the/usr/local/arm/arm-2009q3/bin directory

Note: The directory management approach in Linux. Technically, all of the directory properties in Linux are the same, so technically we can install the software anywhere. But because if you put it in a muddle, future programs may not be easy to find. So over time, we have summed up a general definition of file placement, such as the/bin directory to put some of the users of the system to use the application, the/sbin directory is stored in the system with the system management of the application.

So where do we put the software? are generally in the/usr directory. When we install ARM-LINUX-GCC, we create an arm folder underneath the/usr/local/and load it inside.

Second, after the installation of the test

To the actual application's installation directory (i.e./usr/local/arm/arm-2009q3/bin), to execute the ARM-LINUX-GCC-V

The method of execution is:./arm-none-linux-gnueabi-gcc-v

After execution, a long string of outputs, with the words "GCC version 4.4.1", indicate a successful installation.


I have a problem: when I perform./arm-none-linux-gnueabi-gcc-v, I am prompted to bush:./arm-none-linux-gnueabi-gcc-v that there is no file or directory

Reason: Because 62-bit machine is incompatible with 32-bit

Workaround: Enter sudo apt-get install lib32bz2-1.0

Re-execute./arm-none-linux-gnueabi-gcc-v

After execution, a long string of outputs, with the words "GCC version 4.4.1", indicate a successful installation.


Third, environment variables

The above tests can only be done in the/usr/local/arm/arm-2009q3/bin directory, to perform arm-none-linux-gnueabi-gcc-v if you do it in a different directory.


It's OK to do it in a different directory.

In the terminal input echo $PATH

Re-enter export Path=/usr/local/arm/arm-2009q3/bin: $PATH

We can achieve the goal.

(Input echo $PATH can see, more the first one).

But just turn off the terminal and open another one immediately. The reason is that our operation at the end of this terminal is only for this terminal, and then opened the terminal has not been executed this command so did not export.

How to turn off the terminal and open another Terminal page line.

Solution: Vi. BASHRC

After you go in, add a sentence to the last line.

Export Path=/usr/local/arm/arm-2009q3/bin: $PATH save exit.

Note: We export this environment variable to the current user, and if you log in it is useless under other users



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.