Installing the cross-compilation tool arm-linux-gcc-4.3.2
2011-07-08 00:55:28| Category: Embedded | Report | Font size Subscription
Environment: Fedora 9
STEP 1: Download arm-linux-gcc-4.3.2.tgz.Put arm-linux-gcc-4.3.2.tgz in a directory, I put it in/opt。
download Site 1: http://www.arm123.com.cn/linux/arm-linux-gcc-4.3.2.tgz
Download website 2:http://www.arm9.net/download-arm-linux-gcc-4.3.2.asp
STEP 2: Enter into the/opt and unzip the arm-linux-gcc-4.3.2.tgz. This package has an unpacked default path, the decompression file on the. usr/local/arm/4.3.2. And now I put the file in the/opt inside, then the location of the decompression should be,/opt/usr/local/arm/4.3.2. For convenience, we unzip the./change to the root directory. Can man tar look at the meaning of the-c option. After the decompression can be/usr/local/arm/inside to see if OK.
cd /opt/ tar xvzf arm-linux-gcc-4.3.2.tgz –C /
|
Step 3: After the step 2,ARM-LINUX-GCC has been installed into the system, can be used, but, in the specific use of time, very inconvenient, you must add/USR/LOCAL/ARM/4.3.2/BIN/ARM-LINUX-GCC. Fortunately, there is a kind of Linux inside called environment variables. Can let us execute the program, when only input ARM-LINUX-GCC, the system automatically to/usr/local/arm/4.3.2/bin/inside to look for this command execution. Modify the environment variables as follows:
In the last line of this file, add:
export PATH=$PATH:/usr/local/arm/4.3.2/bin
|
Or
3. Modify the environment variables to add the path of the cross-compiler to path.
Method One: Modify the/ETC/BASH.BASHRC file (this file applies only to the current user)
$sudo GEDIT/ETC/BASH.BASHRC
At the end of the add export path= $PATH:/usr/local/arm/4.3.2/bin
Method Two: Modify the/etc/profile file (this file belongs to the system level environment variable, the thing that is set inside is applicable to all users):
$sudo Gedit/etc/profile
Add the path settings, at the end of the following, save the/etc/profile file:
Export path= $PATH:/usr/local/arm/4.3.2/bin
Method Three: Modify the/etc/environment file
$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:/usr/local/arm/4.3.2/bin "Save to exit
STEP 4: Restart or logout. Check to see if it's all OK. Enter the command:
4. Immediately make the new environment variable effective without restarting the computer:
Corresponding method one: $ SOURCE/ROOT/.BASHRC
Corresponding method two: $ source/etc/profile
The above root privileges are not enough to command
chmod 775 file name has execute permission.
Method three takes effect immediately
5. Check if the path is joined to path:
$ echo $PATH
Display Content/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/arm/4.3.2/bin Indicates that the path to the cross-compiler has been added. At this point, the cross-compilation environment is installed.
6. Test whether the installation is successful
$ arm-linux-gcc-v
The version of ARM-LINUX-GCC is displayed.
Reference blog:
http://blog.chinaunix.net/u3/92408/showart_1949975.html
Build an embedded Linux environment
Http://blog.chinaunix.net/u1/38994/showart_2023807.html
using the ARM-LINUX-GCC 4.3.2 compilation must enable the use of the ARM eabi option in the kernel
Http://www.arm9.net/download-arm-linux-gcc-4.3.2.asp
compliant with EABI standard cross compiler: arm-linux-gcc-4.3.2 with EABIFrom: http://hi.baidu.com/jhdsky/blog/item/3ad2bc0f83d147e0ab6457d1.html