Installing the Cross tool chain ARM-LINUX-GCC

Source: Internet
Author: User

The basic steps are as follows:

(1) Create a directory

$ sudo mkdir/usr/local/arm

(2) Copying files

File arm-linux-gcc-4.4.3.tar.gz, put in/var/ftp, enter ftp,$ CD ~/ftp,

Copy,$ sudo cp arm-linux-gcc-4.4.3.tar.gz/usr/local/arm

(3) Unzip the file

Go to directory: $ cd/usr/local/arm

Unzip:$ sudo tar-xzvf arm-linux-gcc-4.4.3.tar.gz

You do not need to add-c/, we are directly in the current directory to store the pressurized file.

(4) Adding environment variables

Open With VI. BASHRC, execute $vi ~/.BASHRC

Last line Add "Export Path=/usr/local/arm/opt/friendlyarm/toolschain/4.4.3/bin: $PATH" to save the file

(5) Registering environment variables

$source/ROOT/.BASHRC

Expand: Modify path Path under Linux

For example, to add the/etc/apache/bin directory to path, there are three methods:

1, #PATH = $PATH:/etc/apache/bin

With this method, only the current session is valid, that is, the PATH setting is invalidated whenever the system is logged out or logged off (not recommended in the actual application).

2, #vi/etc/profile

Add Path= $PATH in place:/etc/apache/bin (Note:= is not allowed to have any spaces on either side of the equals sign ) This method is best, unless you manually force the value of PATH to change, otherwise it will not be changed.

3, #vi ~/.bash_profile

Modify the path line, add/etc/apache/bin to this method is for the user to work

Attention:

To change path, you must re-login to take effect, the following methods can simplify the work: if/etc/profile is modified, then the edit ends with the source profile or the Execute Point command. The value of/profile,path takes effect immediately. The principle of this method is to execute the/etc/profile shell script again, note that if the use of sh/etc/profile is not possible, because SH is executed in the child shell process, even if the path changes will not be reflected in the current environment, but the source is in the current Shell process, so we can see the change in path.

In general, the bin directory under the user's working directory will be included in the path, so just put the user's own shell script in the user's Bin directory, do not need to modify the configuration file.

Installing the Cross tool chain ARM-LINUX-GCC

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.