560
edits
Changes
no edit summary
[[File:245px-Tux.svg.png|right|331x391px167x197px]]
=What is Linux?=
Linux is a clone the result of merging the computational Kernel made by Linux Torval and the operating scheme present in any Unix operative system Unix, Kernel was written from scratch by Linus Torvalds with assistance from and a loosely-knit team of hackers across the Net. It aims towards POSIX standard and Single UNIX Specification compliance.
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.
<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.
{{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">'''gnueabihf''' compiler</span>}}
<span class="mw-headline">In order to compile the Linux Kernel If it is necessary to prepare a suitable work environment by checking the compiler and its version are the corresponding. we can install this extra packages that could be necessaries: </span>
<span class="mw-headline">The next step is to clone the corresponding git repository. There are different git repositories depending on the model of the processor of the board. The following table shows the steps for each of the <span style="color: #000000;">IGEP PROCESSOR BOARDS</span>:<br data-attributes="%20/"></span>
! style="width: 324.217px;"|GIT REPOSITORY
! style="width: 275.783px;"|BRANCH
|-
| style="width: 97px;"|DM3730
| style="width: 324.217px;"|git@https://git.isee.biz:/linux-kernel/linux-omap-2.6.git
| style="width: 275.783px;"|isee-linux-v.4.9.y
|-
| style="width: 97px;"|AM335X
| style="width: 324.217px;"|git@https://git.isee.biz:/linux-kernel/linux-omap-2.6.git
| style="width: 275.783px;"|isee-linux-v.4.9.y
|-
| style="width: 97px;"|iMX6
| style="width: 324.217px;"|git@https://git.isee.biz:/linux-kernel/linux-imx.git
| style="width: 275.783px;"|
isee-imx_4.9.11_1.0.0_ga
|}
To get to desired branch we will use:
git checkout [your_branch]
=<span id="How_to_cross_compile_the_linux_kernel" class="mw-headline">Compile the Linux Kernel<br data-attributes="%20/"></span>=
In the following table it can be found the name of each default configuration associated to each IGEP PROCESSORS BOARDS:
{| class="contenttable sortable" style="width: 890px888px;"|-! style="width: 160px;"|BOARD! style="width: 163px;"|DEFCONFIG! style="width: 527px;"|EXAMPLE
|-
|-
| style="width: 160.1px160px;"|IGEPv5 OMAP5432IGEPv2 DM3730| style="width: 124.9px163px;"| [https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/configs/omap2plus_defconfig omap2plus_defconfig]| style="width: 566px527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- <br /> omap2plus_defconfig</code></span>
|-
| style="width: 160.1px160px;"|IGEPv2 DM3730IGEP COM AQUILA AM335x| style="width: 124.9px163px;"| [https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/configs/am335x_igep0034_defconfig am335x_igep0034_defconfig]| style="width: 566px527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-am335x_igep0034_defconfig</code></span>
|-
| style="width: 160.1px160px;"|IGEP COM AQUILA AM335xMODULE DM3730/AM3703| style="width: 124.9px163px;"| [https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/configs/omap2plus_defconfig omap2plus_defconfig]| style="width: 566px527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-omap2plus_defconfig</code></span>
|-
| style="width: 160.1px160px;"|IGEP COM MODULE DM3730/AM3703SMARC AM335x| style="width: 124.9px163px;"| [https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/configs/am335x_igep0034_defconfig am335x_igep0034_defconfig]| style="width: 566px527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_igep0034_defconfig</code></span>
|-
| style="width: 160.1px160px;"|IGEP SMARC iMX6iMX6S/DL/Q| style="width: 124.9px163px;"|[https://git.isee.biz/linux-kernel/linux-imx/blob/isee-imx_4.9.11_1.0.0_ga/arch/arm/configs/imx6_igep0046_defconfig imx6_igep0046_defconfig]| style="width: 566px527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx6_igep0046_defconfig</code></span>
|-
| style="width: 160.1px160px;"|IGEP SMARC AM335xiMX6UL/ULL| style="width: 124.9px;"|[https://git.isee.biz/linux-kernel/linux-omap-2.6imx/blob/isee-linux-vimx_4.9.411_1.90.y0_ga/arch/arm/configs/am335x_igep0034_defconfig am335x_igep0034_defconfigimx6_igep0146_defconfig imx6_igep0146_defconfig]| style="width: 566px527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_igep0034_defconfig imx6_igep0146_defconfig</code></span>
|}
Once the default configuration has been loaded, it is time to compile the Linux Kernel. There are three important elements to compile:
* '''Image: '''The kernel image. There are three several formats. Generally we will use the '''zImage''': a compressed version of the Linux kernel image that is self-extracting.
* '''DTBs: '''Device tree binary, a low level device description, specific to your device.
* '''Modules: '''Kernel Modules, pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system.
|-
|-
| class="code"|<div class="container" titlestyle="Hintwidth: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">(dentro de dtb-$(CONFIG_SOC_IMX6Q) += \)</code> <div class="line number2 index1 alt1"><code class="java spaces"> </code><code class="java plain">imx6dl-igep-base0040rc2.dtb \</code></div><div class="line number3 index2 alt2"><code class="java spaces"> </code><code class="java plain">imx6dl-igep-base0040rd102281.dtb \</code></div><div class="line number4 index3 alt1"><code class="java spaces">  467px;</code><code class="java plain">imx6q-igep-base0040rc2.dtb \</code></div><div class="line number5 index4 alt2"><code class="java spaces"> </code><code class="java plain">imx6q-igep-base0040rd102.dtb \</code></div></div><|IGEP COM MODULE DM3730/div>AM3703|}</div></div></div>=<span id="Setup_IGEP_SDK_Yocto_Toolchain_1.2.2-3" class="mw-headline">Setup IGEP SDK</span><span id="Setup_IGEP_SDK_Yocto_Toolchain_1.2.2-3" class="mw-headline" style="colorwidth: #808080;"> Yocto Toolchain 1588.2.2-3</span>===<span id="Install" class="mw-headline">Install</span>==<span style="color: #000000533px;">Download - |[httphttps://wwwgit.isee.biz/supportlinux-kernel/downloads/item/igep-sdk-yocto-toolchain-1linux-2omap-2-3 isee.biz]<6/span> <span style="color: #000000;">follow the next steps:<blob/span> * <span style="color: #000000;">Open a terminal</span>* <span style="color: #000000;">Located your downloaded file, in my case is inside /home/jdoe/Downloads:</span> <pre><span style="color: #000000;">jdoe@ubuntu ~ $ cd Downloads/</span></pre>* <span style="color: #000000;">Extract binaries in root directory with root privileges</span> <pre><span style="color: #000000;">jdoe@ubuntu ~/Downloads $ sudo tar jxf igepisee-sdk-yocto-toolchainlinux-*v.tar4.bz2 -C /</span></pre>* <span style="color: #000000;">Make sure that binaries are installed correctly9.<y/span> <pre><span style="color: #808080;"><span style="color: #000000;">jdoe@ubuntu ~arch/Downloads $ ls arm/optboot/pokydts/1.2 1.2.1</span> </span></pre>==<span id="Configure" class="mwomap3-headline" style="color: #000000;">Configure</span>==<span style="color: #000000;">Open a terminal and type:</span> <pre><span style="color: #000000;"> export PATH=/opt/poky/1.2/sysroots/i686igep0030-pokysdkrev-linux/usr/bin/armv7ag.dts omap3-vfpigep0030-neonrev-poky-linux-gnueabi:$PATH </span></pre>=<span id="Compiled_binaries" class="mw-headline" style="color: #000000;">Compiled binaries</span>=<span class="mw-headline" style="color: #808080;">Binaries: latest stable kernel version IGEP OMAP3 devices is: '''2g.6.37-12 (20161206)'''</span> {| border="1"dts]
|-
|-
||<span style="color: #808080;">IGEP00x0</span>||<span style="color: #808080;">[httpwidth://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/linux-omap-2.6281.37-12.tar.gz 2.6.37-12]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/linux-omap-2.6.37-12.tar.gz.md5 md5sum])</span>||<span style="color: #808080467px;">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/zImage-2.6.37-12.bin zImage-2.6.37-12.bin] ([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/zImage-2.6.37-12.bin.md5 md5sum])</span>||<span style="color: #808080;">[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>IGEPv5 OMAP5432||<span style="colorwidth: #808080;">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/zImage-2588.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 style="color: #808080;">[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 style="color: #808080533px;">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/compat-wireless-wilink8-0.tar.gz compat-wireless-wilink8-0]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/compat-wireless-wilink8-0.tar.gz.md5 md5sum])</span>||<span style="color: #808080;">[httphttps://downloadsgit.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>|}=<span id="Build_kernel_from_sources" class="mwlinux-headline" style="color: #000000;">Build kernel from sources</span>=<span style="color: #000000;">'''Download''' the latest stable version sources and follow next steps:</span> <pre><span style="color: #808080;">wget <a class="external free" href="http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/linux-omap-2.6.37-12.tar.gz" target="_blank" rel="nofollow noreferrer noopener">http:/blob/downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/linux-omap-2v.6.37-124.tar9.gz<y/a>tar xzf linux-omap-2.6.37-12.tar.gzcd linux-omap-2.6.37-12<arch/span><arm/pre><span style="color: #000000;">Also, it could download from GIT Repositories ([http:boot/dts/gitomap5-igep0050.iseedts omap5-igep0050.biz/ http://git.isee.biz/dts]) and test the last unstable version at your own risk (see "''Linux mainline tree (development)''" chapter in [index.php/The_Linux_kernel The Linux kernel])</span> ==<span id="Important_procedures" class="mw-headline" style="color: #000000;">Important procedures</span>==* <span style="color: #808080;">Remove rootfs modules binaries from any previous Kernel</span>* <span style="color: #808080;">If you switch to another configuration, clean kernel sources with command: make mrproper</span> <pre><span style="color: #000000;">Para compilar el kernel se ha de seguir los siguientes pasos:</span></pre>1- Descargar la rama correspondiente con git 2- Configurar el kernel con la minima configuracion que nos ofrece <div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_902183" class="syntaxhighlighter sh-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"
|-
| classstyle="codewidth: 281.467px;"|<div classIGEP SMARC AM335x| 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-gnueabihfomap- imx6_igep0046_defconfi<2.6/code> <blob/isee-linux-v.4.9.y/div><arch/div>|}<arm/div><boot/div><dts/div>3am335x-igep- Ejecutar el menuconfig para optimizar la configuracion a traves del menúbase0040. <div class="code panel pdl confdts am335x-macro outputigep-block" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_965738" class="syntaxhighlighter sh-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"base0040.dts]
|-
| classstyle="codewidth: 281.467px;"|<div classIGEP SMARC iMX6 Quad| 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- menuconfig<imx_4.9.11_1.0.0_ga/code> <arch/div><arm/div>|}<boot/div><dts/div></div>Guardar la configuracion del menuconfig en .config 4imx6q- Compilar la imagen los modulos y las dtb <div class="code panel pdl configep-macro outputbase0040rd102.dts imx6q-block" dataigep-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_56426" class="syntaxhighlighter sh-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"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|[https: 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: #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<imx/span>=<span style="color: #808080;">Machine specific files are located in '''arch/armblob/machisee-omap2/''' directory with name '''board-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="mwigep-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 expbase0040rd102-wifi.c and should be located in arch/arm/mach-omap2 directory, so the first step will be add a new file for your new expansion board. Following example creates a new expansion board file called exp-dummy.c (arch/arm/mach-omap2/exp-dummy.c)</span>dts]|}