Set Up the Cross Compiler

From IGEP - ISEE Wiki

Revision as of 10:44, 18 May 2018 by Francesc Megias (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Information.jpg The following steps has been tested using Ubuntu 16.04 and the 4.9 version of the arm-linux-gnueabihf compiler

In order to compile the Linux Kernel it is necessary to prepare a suitable work environment by checking the compiler and its version are the corresponding.

If we want to install a particular compiler, for example the 4.9 we can use the following commands to install it:

sudo apt-get install g++-4.9-arm-linux-gnueabihf
sudo apt-get install cpp-4.9-arm-linux-gnueabihf
sudo apt-get install gcc-4.9-arm-linux-gnueabihf
sudo apt-get install gcc-4.9-arm-linux-gnueabihf-base

We can change between compilers using the following commands:

sudo update-alternatives --set arm-linux-gnueabihf-g++ "/usr/bin/arm-linux-gnueabihf-g++-4.9"
sudo update-alternatives --set arm-linux-gnueabihf-cpp "/usr/bin/arm-linux-gnueabihf-cpp-4.9"
sudo update-alternatives --set arm-linux-gnueabihf-gcc-ar "/usr/bin/arm-linux-gnueabihf-gcc-ar-4.9"
sudo update-alternatives --set arm-linux-gnueabihf-gcc-nm "/usr/bin/arm-linux-gnueabihf-gcc-nm-4.9"
sudo update-alternatives --set arm-linux-gnueabihf-gcc-ranlib "/usr/bin/arm-linux-gnueabihf-gcc-ranlib-4.9"
sudo update-alternatives --set arm-linux-gnueabihf-gcov "/usr/bin/arm-linux-gnueabihf-gcov-4.9"

Another files you may need to install:

sudo apt-get update
sudo apt-get install lzop