Build a cross tool chain (successfully tested) and build a cross tool for testing
Previously, a rehat6 linux system was installed, and the cross-compilation mechanism was neglected. As a result, a problem occurred during uboot compilation, and the result showed that arm-linux-gcc could not be found. Therefore, you can build a cross-stack compiling environment. There are many errors. First,-C/is not added to the backend during decompression. Then, a directory is directly created and the decompressed bin directory is copied to the Created directory. There is still a problem. But I succeeded in the end and gave the operation process directly:
** Copy the arm-linux-gcc file to any directory in linux, for example, study. We recommend that you create a working directory so that you can delete the compressed package later.
# Cd study
# Ls
# Tar xvf arm-linux-gcc-4.5.1-C // you can use the tab to fill the compressed package name,-C/, C is capital plus-C/is to install to the root directory
** After decompression, your current directory will not have the unzipped directory. You can use # ls-a in the root directory, and you will find an additional Directory, which is your decompressed directory.
# Cd // go to the top-level directory,
# Vim/root/. bashrc
** Add export PATH = $ PATH:/opt/FriendlyARM/toolschain/4.1.5/bin at the end to save and exit.
# Source/root/. bashrc
** Restart is okay, which means the problem is not serious. Restart the Virtual Machine and start testing.
# Arm-linux-gcc-V // view the build result.
** If your cross tool chain information is interrupted on the last line, it indicates the build is successful. Otherwise, try again. There are many methods available on the Internet. You can combine them.