(1)下載下傳arm-linux-gcc-4.4.3
下載下傳位址:http://download.csdn.net/download/cqflxyyyyyyy/3690145#comment
(2)解壓縮
将壓縮包儲存到了/home/user/Downloads檔案夾下,使用tar -zxvf arm-linux-gcc-4.4.3-20100728.tar.gz解壓,在目前目錄下生成一個opt檔案夾
(3) 建立arm檔案夾
在/usr/local/下建立一個名為arm的檔案夾,在終端中輸入指令:cd /usr/local/,回車,然後再輸入指令:mkdir arm,建立arm目錄,并修改該檔案夾的屬性為rwx,輸入指令:chmod 777 arm
(4)拷貝檔案内容到建立目錄下
[user@localhost Downloads]$ pwd
/home/user/Downloads
[user@localhost Downloads]$ cp -r /home/user/Downloads/opt/FriendlyARM/toolschain/. /usr/local/arm
(5)拷貝檔案内容到建立目錄下
修改一下環境變量PATH,避免每次使用arm-linux-gcc時都要輸入它所在的完整路徑。在終端中輸入:vi /etc/profile,打開profile檔案,在最後一行加上“export PATH=$PATH:/usr/local/arm/4.4.3/bin”然後儲存檔案。
unset i
unset -f pathmunge
export PATH=$PATH:/usr/local/arm/./bin
(6)使新的環境變量立即生效,輸入:source /etc/profile
(7)檢查是否安裝完成,輸入:arm-linux-gcc -v檢視版本資訊
[[email protected] bin]# arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /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=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-long --enable-target-optspace
Thread model: posix
gcc version 4.4.3 (ctng-1.6.1)