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