Configure arm-Linux-GCC on the basis of the installation on the Linux platform to make it work normally.
I. Preparations before installation
1. Download and install arm-Linux-gcc
The version of the arm-linux-gcc-4.2.1 IN THE RELEASE.
The following is the download link officially provided by arm: http://www.codesourcery.com/gnu_toolchains/arm/download.html. After that, select host32 GNU/Linux and click Download. But the prefix is arm-2010.09-51-arm-none-eabi-i686-pc-linux-gnu instead of arm-Linux -...
Download arm-linux-gcc4.4.3from the official website http://www.arm9.net/download.asp.
2. Delete the old version installed before, and run
[Root @ localhost ~] # Rm-RF/opt/ARM
3, extract the new version of the arm-linux-gcc-4.4.3 (note, if we add-C, it will automatically decompress to the/usr/local/ARM/directory ), however, the friendly arm is unzipped to the/usr/local/ARM/directory according to the following methods, this is because the friendly arm changes the/usr/local/ARM/directory to/opt/friendlyarm/toolschain/unless it is being modified.
[Root @ localhost ~] # Tar-ivxzf/smbroot/arm-linux-gcc-4.4.3.tar.gz-C/
4. modify the configuration file and add arm-Linux-GCC to the environment variable, because the command of arm-Linux-GCC is under/usr/local/ARM/4.4.3/bin, the purpose is to bind global variables so that the command can be executed in any directory.
Open the setting file
[Root @ localhost opt] # vi/etc/profile
In
# Path manipulation
If ["$ EUID" = "0"]; then
Pathmunge/sbin
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
Pathmunge/usr/local/ARM/4.4.3/bin
Fi
Or add
Export Path = $ path:/usr/local/ARM/4.4.3/bin
Save and exit
5. Make the new environment variable effective immediately without restarting the computer
[Root @ localhost opt] # source/etc/profile
[Root @ localhost opt] #
6. Check whether the path is added to the path:
[Root @ localhost opt] # echo $ path
/Usr/local/ARM/4.4.3/bin is displayed, indicating that the path of the cross compiler has been added to path. So far, the cross-compilation environment installation is complete.
7. test whether the installation is successful.
First, run the find command to query the location of arm-Linux-GCC.
[Root @ localhost ~] # Find/-name arm-Linux-gcc
/Opt/ARM/toolschain/4.4.3/bin/ARM-Linux-gcc
[Root @ localhost ~] #
We can see that the location of arm-Linux-GCC is consistent with the path set in environment variables.
Next, query the arm-Linux-GCC version.
[Root @ localhost bin] # arm-Linux-gcc-V
Using built-in specs.
Target: Arm-None-Linux-gnueabi
Configured: /opt/friendlyarm/mini2440/build-toolschain/working/src/gcc-4.4.3/configure -- Build = i386-build_redhat-linux-gnu -- Host = i386-build_redhat-linux-gnu -- target = arm-None-Linux-gnueabi -- prefix =/ OPT/friendlyarm/toolschain/4.4.3 -- With-sysroot =/opt/friendlyarm/toolschain/4.4.3/ARM-None-Linux-gnueabi // sys-Root
-- Enable-languages ages = C, c ++ -- disable-multilib -- With-arch = armv4t -- With-CPU = ARM920T -- With-tune = ARM920T -- With-float = soft -- With-pkgversion = ctng-1.6.1 -- disable- sjlj-exceptions -- enable-_ cxa_atexit -- With-GMP =/opt/friendlyarm/toolschain/4.4.3 -- With-mpfr =/opt/friendlyarm/toolschain/4.4.3
-- With-PPL =/opt/friendlyarm/toolschain/4.4.3 -- With-cloog =/opt/friendlyarm/toolschain/4.4.3 -- With-MPC =/opt/friendlyarm/toolschain/4.4.3 -- with-local-Prefix =/opt/friendlyarm/toolschain/4.4.3/ARM-None-Linux-gnueabi // sys-root -- disable-NLS -- enable-threads = POSIX
-- Enable-symvers = GNU -- enable-c99 -- enable-long -- enable-target-optspace
Thread model: POSIX
GCC version 4.4.3 (ctng-1.6.1)
[Root @ localhost bin] #
You can see the version number of arm-Linux-GCC. At this point, arm-linu-GCC has been successfully installed.