59
edits
Changes
From IGEP - ISEE Wiki
→No summary
<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 has been compiled 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"><span class="mw-headline">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><span class="mw-headline"><br></span></pre>
<span class="mw-headline">We can change between compilers using the following commands:</span>
<pre class="minicom"><span class="mw-headline">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></pre>
<span class="mw-headline">In addition we can install this extra packages that could be necessaries: </span>
=<span id="How_to_cross_compile_the_linux_kernel" class="mw-headline">How to cross compile the linux kernel</span>=
<span style="color: #000000;"> </span>