560
edits
Changes
From IGEP - ISEE Wiki
no edit summary
[[File:245px-Tux.svg.png|right|167x197px]]
=What is Linux?=
It has all the features you would expect in a modern fully-fledged Unix, including true multitasking, virtual memory, shared libraries, demand loading, shared copy-on-write executables, proper memory management, and multistack networking including IPv4 and IPv6.
Although originally developed first for 32-bit x86-based PCs (386 or higher), today Linux also runs on a multitude of other processor architectures, in both 32- and 64-bit variants.
=<span id="Introduction" class="mw-headline">Introduction</span>=
<span style="color: #000000;">In order to build the Linux Kernel for IGEP PROCESSOR BOARDS it is recommended to cross-compile the kernel, that means to build the kernel in your HOST machine for a target architecture.</span>
To [index[Ubuntu 16.php/04 LTS Toolchain|Ubuntu_16.04_LTS_Toolchain setup the cross-compiling04]] there are two fundamental variables that the kernel uses to select the target architecture. Normally these values are guessed based on your build environment, but of course that environment here does not match our target embedded system, so we'll need to override them. The variables in question are:
* <u>''' ARCH'''</u>''':''' The ARCH variable is the architecture you're targeting as the kernel knows it. For IGEP PROCESSOR BOARDS you'll set to "arm" architecture.
# Compile the Kernel Image, Device Tree and Modules of that configuration.
=<span id="How_to_cross_compile_the_linux_kernel" class="mw-headline">Prepare the environment<br /></span>={{Message/Information Message|message=The following steps has been tested using '''Ubuntu 16.04''' and the '''4.9 version''' of the '''arm-linux-'''<span class="mw-headline">In order to compile the Linux Kernel it is necessary to prepare a suitable work environment by checking the '''gnueabihf''' compiler and its version are the corresponding. </span>}}
First we have to set up the Cross Compiler correctly if it is necessary. In this [[Set Up the Cross Compiler|post]] there are some steps that can be followed in order to do it.
<span class="mw-headline">{{Message/Information Message|message=The following steps has been tested using '''''Ubuntu 16.04''''' and the compiler '''''gcc version 4.9.3 (Ubuntu/Linaro 4.9.3-13ubuntu2)'''''}}If it is necessary we can install this extra packages that could be necessaries: </span>
<span class="mw-headline">If we want sudo apt-get install libc6-armel-cross libc6-armhf-cross libc6-dev-armel-cross libncurses5-dev<br><br>sudo apt-get install lzop<br></span><span class="mw-headline">The next step is to install a particular compiler, for example clone the 4corresponding git repository.9 we can use There are different git repositories depending on the model of the processor of the board. The following commands to install ittable shows the steps for each of the <span style="color:#000000;">IGEP PROCESSOR BOARDS<code/span>:<br data-attributes="%20/code"></span>
|-
| classstyle="codewidth: 97px;"|<div class="container" titleDM3730| style="Hintwidth: double-click to select code324.217px;"><div class="line number1 index0 alt2"><code class="java plain">imx6_igep0046_defconfig</code> </div></div>|}<https:/div></div><git.isee.biz/div>Para que el linux-kernel compile la dtb es necesario tener una dts con la configuración de los periféricos y los drivers que los gestionan,ademas de una anidación al dtsi del procesador correspondiente ( en este caso imx6 ya sea quad, dual, solo /linux-omap-2.6..)git En el caso de igep con procesadores imx <div class| style="code panel pdl conf-macro output-blockwidth: 275.783px;" data|isee-hasbody="true" datalinux-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_265765" class="syntaxhighlighter sh-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"v.4.9.y
|-
| classstyle="codewidth: 97px;"|<div classAM335X| style="container" title="Hintwidth: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">DUAL</code> <div class="line number2 index1 alt1"><code class="java plain">imx6dl-igep-base0040ra1324.dts</code></div><div class=217px;"line number3 index2 alt2"><code class="java plain">imx6dl-igep-base0040rc2.dts<|https:/code></div><div class="line number4 index3 alt1"><code class="java plain">imx6dl-igep-base0040rd102git.dts</code></div><div class="line number5 index4 alt2"> </div><div class="line number6 index5 alt1"><code class="java plain">QUAD</code></div><div class="line number7 index6 alt2"><code class="java plain">imx6q-igep-base0040ra1isee.dts<biz/code></div><div class="line number8 index7 alt1"><code class="java plain">imx6qlinux-igep-base0040rc2.dts<kernel/code></div><div class="line number9 index8 alt2"><code class="java plain">imx6qlinux-igepomap-base0040rd1022.dts</code></div><div class="line number10 index9 alt1"> </div><div class="line number11 index10 alt2"><code class="java plain">GENERICA</code></div><div class="line number12 index11 alt1"><code class="java plain">imx6qdl-igep-base0040ra6.dtsi</code></div>git<div class| style="line number13 index12 alt2"><code class="java plain">imx6qdl-igep-base0040rbwidth: 275.dtsi</code></div><div class=783px;"line number14 index13 alt1"><code class="java plain">imx6qdl|isee-igeplinux-igep0046rav.dtsi</code></div><div class="line number15 index14 alt2"><code class="java plain">imx6qdl-igep-igep0046rc4.dtsi</code></div></div></div>|}</div></div></div>Las DTS están anidadas, esto quiere decir que se cogerá la dtb generada a partir de la 9.dts dependiendo del procesador que monte igep en este caso. Para que el kernel compile las .dts en dtb se ha de añadir en el Makefile de arch/arm/boot/dts/ <div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_599857" class="syntaxhighlighter sh-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"y
|-
| classstyle="codewidth: 97px;"|<div classiMX6| style="containerwidth: 324.217px;" title="Hint|https: double//git.isee.biz/linux-kernel/linux-click to select code"><div classimx.git| style="line number1 index0 alt2width: 275.783px;"><code class="java plain">(dentro de dtb|isee-$(CONFIG_SOC_IMX6Q) += \)</code>imx_4.9.11_1.0.0_ga
|}
|-
|-
||<span style="colorwidth: #808080160px;">IGEP00x0<|IGEP SMARC iMX6UL/span>ULL||<span style="color: #808080;">[httphttps://downloadsgit.isee.biz/pub/releases/linux_kernel/v2.6.37-12/linux-omap-2.6.37-12.tar.gz 2.6.37-12]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12kernel/linux-omap-2.6.37-12.tar.gz.md5 md5sum])</span>||<span style="color: #808080;">[http:imx/blob/downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/zImage-2imx_4.69.37-1211_1.bin zImage-20.6.37-12.bin] ([http:0_ga/arch/downloads.isee.biz/pub/releasesarm/linux_kernelconfigs/v2.6.37-12/zImage-2.6.37-12.bin.md5 md5sumimx6_igep0146_defconfig imx6_igep0146_defconfig])</span>||<span style="colorwidth: #808080527px;">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/modules-2.6.37-12.tar.gz modules-2.6.37-12]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/modules-2.6.37-12.tar.gz.md5 md5sum)]</span>||<span style="color: #808080000000;">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/zImage-2.6.37-12-wilink8.bin zImage-2.6.37-12-wilink8.bin]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/zImage-2.6.37-12-wilink8.bin.md5 md5sum])</span>||<span stylecode class="color: #808080;java plain">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/modules-2.6.37-12-wilink8.tar.gz modules-2.6.37-12-wilink8]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/modules-2.6.37-12-wilink8.tar.gz.md5 md5sum)]</span>||<span stylemake ARCH=arm CROSS_COMPILE="color: #808080;">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37arm-12/compat-wireless-wilink8-0.tar.gz compat-wirelesslinux-wilink8gnueabihf-0]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/compat-wireless-wilink8-0.tar.gz.md5 md5sum]) imx6_igep0146_defconfig</spancode>||<span style="color: #808080;">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/ti-connectivity-wilink8-0.tar.gz ti-connectivity-wilink8-0]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/ti-connectivity-wilink8-0.tar.gz.md5 md5sum)]</span>
|}
|-
! style="width: 281.467px;"| classBOARD! style="codewidth: 588.533px;"|<div classDTB NAME|-| style="containerwidth: 281.467px;" title|IGEPv2 DM3730| style="Hintwidth: 588.533px;"|[https: double//git.isee.biz/linux-click to select code"><div classkernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/boot/dts/omap3-igep0020-rev-f.dts omap3-igep0020-rev-f.dts]|-| style="line number1 index0 alt2width: 281.467px;"><code class|IGEP COM MODULE DM3730/AM3703| style="java plainwidth: 588.533px;">make ARCH=arm CROSS_COMPILE=arm|[https://git.isee.biz/linux-kernel/linux-gnueabihfomap- menuconfig<2.6/code> <blob/isee-linux-v.4.9.y/div><arch/div>|}<arm/div><boot/div><dts/div>Guardar la configuracion del menuconfig en omap3-igep0030-rev-g.dts omap3-igep0030-rev-g.configdts] 4|- Compilar la imagen los modulos y las dtb| style="width: 281.467px;"|IGEP COM AQUILA AM335x<div class| style="code panel pdl confwidth: 588.533px;"|[https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-macro outputlinux-block" datav.4.9.y/arch/arm/boot/dts/am335x-hasbody="true" database0033.dts am335x-macrobase0033.dts]|-name| style="codewidth: 281.467px;"><div class|IGEPv5 OMAP5432| style="codeContent panelContent pdlwidth: 588.533px;"><div id|[https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/boot/dts/omap5-igep0050.dts omap5-igep0050.dts]|-| style="highlighter_56426width: 281.467px;" class|IGEP SMARC AM335x| style="syntaxhighlighter shwidth: 588.533px;"|[https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/boot/dts/am335x-igep-base0040.dts am335x-igep-base0040.dts]|-confluence nogutter java">{| cellspacingstyle="0width: 281.467px;" cellpadding|IGEP SMARC iMX6 Quad| style="0" border=width: 588.533px;"|[https://git.isee.biz/linux-kernel/linux-imx/blob/isee-imx_4.9.11_1.0".0_ga/arch/arm/boot/dts/imx6q-igep-base0040rd102.dts imx6q-igep-base0040rd102.dts]
|-
| classstyle="codewidth: 281.467px;"|<div classIGEP SMARC iMX6 Dual Lite| style="containerwidth: 588.533px;" title="Hint|[https: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm//git.isee.biz/linux-kernel/linux-gnueabihfimx/blob/isee- zImage modules dtbs<imx_4.9.11_1.0.0_ga/code> <arch/div><arm/div>|}<boot/div><dts/div></div>5imx6dl- Instalar en el rootfs los modulos del kernel que son cargables ( es decir que no estan builtigep-in) <div class="code panel pdl conf-macro output-block" database0040rd102.dts imx6dl-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_785157" class="syntaxhighlighter shigep-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"base0040rd102.dts]
|-
| classstyle="codewidth: 281.467px;"|<div class="container" title="Hint: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/opt/nfs-server/rootfs/ubuntu-xenial-armhf-base</code> </div></div>IGEP SMARC iMX6 Ultra Lite|}</div></div></div>'''Nota: Es muy importante que el INSTALL_MOD_PATH sea el correcto y de lugar justo al contenido que se esperaría en un sistema linux (usr, bin, etc, home, opt), este comando ademas se ha de ejecutar con sudo.''' '''Si éste comando falla, es muy probable que instale los modulos en el Host PC pudiendo dejar inservible el actual SO.''' ==<span id="Scenarios" class="mw-headline" style="color|[https: #000000;">Scenarios</span>==<span style="color: #000000;">Consider the following situations:</span> <span style="color: #000000;">'''Scenario Agit.''' You have and IGEP0020 board plus IGEP0022 expansion board, then you should add in your [indexisee.phpbiz/How_do_I_edit_my_kernel_command_line linux-kernel command line]</span> <pre><span style="color: #000000;">buddy=igep0022<linux-imx/span><blob/pre><span style="color: #000000;">Optionally, to enable the IGEP0022 modem which is disabled by default you should add in your [indexisee-imx_4.php/How_do_I_edit_my_kernel_command_line kernel command line]</span> <pre><span style="color: #000000;">buddy=igep0022 buddy9.modem=yes</span></pre><span style="color: #000000;">NOTE: UART2 can be used for bluetooth OR modem in expansion board but NOT at same time11_1. They are INCOMPATIBLE0.<0_ga/span> <span style="color: #000000;">'''Scenario B.''' You have and IGEP0030 board plus BASE0010 expansion board, then you should add in your [index.phparch/How_do_I_edit_my_kernel_command_line kernel command line]<arm/span> <pre><span style="color: #000000;">buddy=base0010<boot/span><dts/pre><span style="color: #000000;">'''Scenario Cimx6ul-igep-base0040rd102.''' You have and IGEP0030 board plus BASE0010 Rev. B expansion board, then you should add in your [indexdts imx6ul-igep-base0040rd102.php/How_do_I_edit_my_kernel_command_line kernel command linedts]</span> <pre><span style="color: #000000;">buddy=base0010 buddy.revision=B</span></pre><span style="color: #000000;">'''Scenario D.''' You have and IGEP0032 board plus BASE0010 Rev. B expansion board, then you should add in your [index.php/How_do_I_edit_my_kernel_command_line kernel command line]</span> <pre><span style="colorhttps: #000000;">buddy=base0010 buddy.revision=B</span></pre><span style="color: #000000;">'''Scenario Egit.''' You have and IGEP0030 board plus ILMS0015 expansion board, then you should add in your [indexisee.phpbiz/How_do_I_edit_my_kernel_command_line linux-kernel command line]</span> <pre><span style="color: #000000;">buddy=ilms0015</span></pre>=<span id="Layout" class="mwlinux-headline" style="color: #000000;">Layout</span>=<span style="color: #808080;">Machine specific files are located in '''arch/armimx/mach-omap2blob/''' directory with name '''boardisee-igep*imx_4.c''' :</span> * <span style="color: #808080;">'''board-igep00209.c''': For IGEP0020 machine</span>* <span style="color: #808080;">'''board-igep003011_1.c''': For IGEP0030 machine</span>* <span style="color: #808080;">'''board-igep00320.c''': For IGEP0032 machine<0_ga/span> <span style="color: #808080;">Expansion board files, also are located in '''arch/arm/mach-omap2boot/''' directory with name '''exp-*.c''' :<dts/span> * <span style="color: #808080;">'''expimx6ul-igep0022.c''': For IGEP0022 expansion board</span>* <span style="color: #808080;">'''expigep-base0010.c''': For BASE0010 expansion board</span>* <span style="color: #808080;">'''expbase0040rd102-ilms0015wifi.c''': For ILMS0015 expansion board</span> =<span id="Adding_New_Expansion_Boards" class="mwdts imx6ul-headline" style="color: #000000;">Adding New Expansion Boards</span>=<span style="color: #808080;">This chapter is meant to be a starting point for people to learn how to add your own expansion board in three steps.</span> ==<span id="Step_1:_Add_new_expansion_board_file" class="mw-headline" style="color: #808080;">Step 1: Add new expansion board file</span>==<span style="color: #808080;">As you can see in Layout chapter, an expansion board is called expigep-.c and should be located in arch/arm/machbase0040rd102-omap2 directory, so the first step will be add a new file for your new expansion boardwifi. Following example creates a new expansion board file called exp-dummy.c (arch/arm/mach-omap2/exp-dummy.c)</span>dts]|}