Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Linux Kernel 4.9.y

186 bytes removed, 17:22, 7 May 2018
Prepare the environment
=<span id="How_to_cross_compile_the_linux_kernel" class="mw-headline">Prepare the environment<br /></span>=
<span class="mw-headline">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. </span> <span class="mw-headline">In this case the Linux Kernel {{Message/Information Message|message=The following steps has been compiled tested using an '''''Ubuntu 16.04'''''   and the compiler '''''gcc version 4.9.3 (Ubuntu/Linaro 4.9.3-13ubuntu2)'''''.}}</span>
<span class="mw-headline">If we want to install a particular compiler, for example the 4.9 we can use the following commands to install it:<br /></span>
<pre class="minicom"><code> <span class="mw-headline"><code>g++-4.9-arm-linux-gnueabihf<br data-attributes="%20/">cpp-4.9-arm-linux-gnueabihf<br data-attributes="%20/">gcc-4.9-arm-linux-gnueabihf<br data-attributes="%20/">gcc-4.9-arm-linux-gnueabihf-base</span></code><span class="mw-headline"><br></span></pre>
<span class="mw-headline">We can change between compilers using the following commands:</span>
<pre class="minicom"><code> <span class="mw-headline"><code>sudo update-alternatives --set arm-linux-gnueabihf-g++ "/usr/bin/arm-linux-gnueabihf-g++-4.9"<br data-attributes="%20/">sudo update-alternatives --set arm-linux-gnueabihf-cpp "/usr/bin/arm-linux-gnueabihf-cpp-4.9"<br data-attributes="%20/">sudo update-alternatives --set arm-linux-gnueabihf-gcc-ar "/usr/bin/arm-linux-gnueabihf-gcc-ar-4.9"<br data-attributes="%20/">sudo update-alternatives --set arm-linux-gnueabihf-gcc-nm "/usr/bin/arm-linux-gnueabihf-gcc-nm-4.9"<br data-attributes="%20/">sudo update-alternatives --set arm-linux-gnueabihf-gcc-ranlib "/usr/bin/arm-linux-gnueabihf-gcc-ranlib-4.9"<br data-attributes="%20/">sudo update-alternatives --set arm-linux-gnueabihf-gcov "/usr/bin/arm-linux-gnueabihf-gcov-4.9"</span></code></prespan>
<span class="mw-headline">In addition we can install this extra packages that could be necessaries: </span>
<pre class="minicom"> <span class="mw-headline">sudo apt-get install libc6-armel-cross libc6-armhf-cross libc6-dev-armel-cross</span><span class="mw-headline"> libc6-dev-</span><span class="mw-headline">armhf-cross</span><span class="mw-headline">binutilscrossbinutils-arm-linux-gnueabihf libncurses5-dev</span></pre>
=<span id="How_to_cross_compile_the_linux_kernel" class="mw-headline">How to cross compile the linux kernel</span>=
59
edits