Install the arm-Linux-GCC cross-compilation tool

Source: Internet
Author: User

Installing arm-Linux-GCC is still relatively simple. Let's take a look at the installation steps under Ubuntu.

1. decompress the arm-linux-gcccompressed arm-linux-gcc-4.3.2.tar.gz package;

Get a folder named arm-linux-gcc-4.3.2

2. Copy the arm-linux-gcc-4.3.2 folder to your own system/OPT;

3. Modify environment variables and add the path of the cross compiler to path.

Method 1: Modify the/etc/environment file (it seems that this cannot take effect immediately)
$ Sudo gedit/etc/environment

The original file should be Path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: /usr/games "change it to Path ="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin: /bin:/usr/games:/opt/arm-linux-gcc4.3.2/bin"
Save and exit.

Method 2: Modify the/etc/bash. bashrc file (this file is only applicable to the current user)

$ Sudo gedit/etc/bash. bashrc

Add export Path = $ path:/opt/arm-linux-gcc4.3.2/bin // Note at the end, you must enter in English mode, = special attention, otherwise there will be an unrecognized flag Error

Method 3: Modify the/etc/profile file (this file is a system-level environment variable. It applies to all users. I have used this method successfully ):
$ Sudo gedit/etc/profile
Add path settings and add the following at the end to save the/etc/profile file:
Export Path = $ path:/opt/arm-linux-gcc4.3.2/bin

4. Make the new environment variable take effect immediately without restarting the computer:
Method 1 takes effect immediately

Method 2: $ source/root/. bashrc
Method 3: $ source/etc/profile

5. Check whether the path is added to the path:
$ Echo $ path
Display/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /opt/arm-linux-gcc4.3.2/bin indicates that the path of the cross compiler has been added to path. So far, the cross-compilation environment installation is complete.

6. test:

$ Arm-Linux-gcc-V

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.