1 , development platform
Virtual machines: VMware 12
Operating system: Ubuntu 14.04
2. Prepare the Cross-compilation kit (arm-linux-gcc-4.5.1)
Both the Uboot and Linux kernel need to be supported by the GNU Cross Toolchain, which uses the arm-linux-gcc-4.5.1-v6-vfp-20120301 version of the cross-compilation tool provided by the friendly arm. There are many advantages to using the Eabi version, you can search online, this document to install arm-linux-gcc-4.5.1-v6-vfp-20120301 in Ubuntu as the main content.
3. Installation Steps
3.1 installing a 32-bit library
sudo apt-get install libc6:i386
sudo apt-get install lib32z1
Note: To install the arm-linux-gcc-4.5.1 Cross compiler on 64-bit Linux, install the 32-bit library first (arm-linux-gcc-4.5.1-v6-vfp-20120301 is compiled under 32-bit Linux)
3.2 , Ubuntu14.04 64bit system installation standard C development environment
sudo apt-get install gcc g++ libgcc1 libg++ make GDB
or sudo apt-get install build-essential
3.3 , installation arm-linux-gcc-4.5.1-v6-vfp-20120301
Under the/usr/local/folder, create a folder named Armtools:
$ sudo mkdir/usr/local/armtools
Copy the arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz to the/usr/local/armtools/directory via a shared folder or samba; in/usr/local/armtools/ Directory Decompression arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz:
sudo tar–xvf arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz
3.4 , modify the environment variables, and add the path of the cross compiler to path
Modify the/ETC/BASH.BASHRC file (this file applies only to the current user)
$sudo GEDIT/ETC/BASH.BASHRC
Then add a bit of code at the end of the file:
# ADD ARM toolschain Path if [-d/usr/local/armtools/friendlyarm/toolschain/4.5.1]; Then Path=/usr/local/armtools/friendlyarm/toolschain/4.5.1/bin: "${path}" Fi |
3.5 to make the new environment variable effective (without restarting the computer)
$ SOURCE/ETC/BASH.BASHRC
3.6. Check to see if the path is joined to path:
$ echo $PATH
If the display contains:/usr/local/armtools/friendlyarm/toolschain/4.5.1/bin The path of the cross-compiler has been added.
At this point, the cross-compilation environment is installed.
3.7. test whether the installation was successful
$ arm-linux-gcc-v
Execute the above command to display the ARM-LINUX-GCC information and version:
Installing the ARM-LINUX-GCC Cross compiler