Today, I spent some time installing an arm-Linux cross compiler on redhat5.0. Several problems occurred during the installation process. After querying online materials. Now let's summarize the correct installation methods.
First, I used the cross-Editor eabi-4.3.3_embedsky_20100610.tar.bz2,
1. First, create a directory for storing the cross compiler. The absolute path of the directory I created is/opt/TQ (TQ is the directory I created)
2.decompress eabi-4.3.3_embedsky_20100610.tar.bz2,
Tar xjvf EABI-4.3.3_EmbedSky_20100610.tar.bz2
After the file is decompressed, two directories will be generated in the TQ Directory: OPT, USR
3. Add environment variables to/etc/profile
# Path manipulation
If ["$ EUID" = "0"]; then
Pathmunge/sbin
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
Pathmunge/opt/TQ/opt/embedsky/4.3.3/bin/
Fi
Source/etc/profile takes effect after adding
4. Run the following command on the console:
CP/opt/TQ/opt/embedsky/4.3.3/bin/usr/local/ARM
Conclusion: The following error occurs when steps 1 and 2 are missing:
Arm-None-Linux-gnueabi-GCC: Error trying to Exec 'cc1': execvp: no such file or directory
Experience: Use the following command to decompress the package:
Tar xjvf EABI-4.3.3_EmbedSky_20100610.tar.bz2-C/
You can skip step 4.
-C/ : The idea is to decompress the package to a specified directory, which refers to the directory. Because the directory structure in the package itself contains Usr/local/arm, To decompress the package to the root directory, you actually need to decompress the package /Usr/local/ARM under the folder.