560
edits
Changes
From IGEP - ISEE Wiki
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:
In order to compile this three elements we have to type:
<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImages zImage dtbs modules</code></span>
Finally we will find the resulting compiled Kernel in the '''''arch/arm/boot''''' folder:
* zImage: located in '''arch/arm/boot/zImage'''
* DTB: located in arch/arm/boot/dts/<target_board>.dtb. Depending of the board the dtb file will be different. In the following table it is detailed the corresponding dtb filename for each b''' <br />'''
{| class="contenttable sortable"|-!|BOARD!|DTB NAME|-|||||-|||||-||||style="width: 890px;"
|-
! style="width: 281.467px;"||BOARD! style="width: 588.533px;"||DTB NAME
|-
|style="width: 281.467px;"|IGEPv2 DM3730|style="width: 588.533px;"|[https://git.isee.biz/linux-kernel/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="width: 281.467px;"|IGEP COM MODULE DM3730/AM3703|style="width: 588.533px;"|[https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/boot/dts/omap3-igep0030-rev-g.dts omap3-igep0030-rev-g.dts]
|-
|style="width: 281.467px;"|IGEP COM AQUILA AM335x|style="width: 588.533px;"||}''' ''' Finally, the last step is to install the modules inside the desired rootfs[https://git.isee. It can be done by typing: sudo make ARCH=arm CROSS_COMPILE=armbiz/linux-kernel/linux-gnueabihfomap- INSTALL_MOD_PATH= modules_installFor example, if the rootfs is located in a external storage device mounted on the 2.6/blob/media folder: sudo make ARCH=arm CROSS_COMPILE=armisee-linux-gnueabihf- INSTALL_MOD_PATH=v.4.9.y/arch/arm/mediaboot/rootfsdts/ modules_installPara dar soporte a una nueva board basada en imx en el kernel es necesario tener un fichero de configuracion defconfig (am335x-base0033.config) y una dtbdts am335x-base0033. Por defecto empezaremos con un defconfig ya creado por igep para procesadores imx <div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_162759" class="syntaxhighlighter sh-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"dts]
|-
| classstyle="codewidth: 281.467px;"|<div classIGEPv5 OMAP5432| style="containerwidth: 588.533px;" title="Hint|[https: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">imx6_igep0046_defconfig</code> </div><git.isee.biz/div>|}<linux-kernel/div><linux-omap-2.6/div><blob/div>Para que el 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 isee-linux-v.4.9.) En el caso de igep con procesadores imx <div class="code panel pdl confy/arch/arm/boot/dts/omap5-macro outputigep0050.dts omap5-block" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_265765" class="syntaxhighlighter sh-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"igep0050.dts]
|-
| classstyle="code"|<div class="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-base0040ra1281.dts</code></div><div class=467px;"line number3 index2 alt2"><code class="java plain">imx6dl-igep-base0040rc2.dts</code></div>|IGEP SMARC AM335x<div class| style="line number4 index3 alt1"><code class="java plain">imx6dl-igep-base0040rd102width: 588.dts</code></div><div class="line number5 index4 alt2"> 533px;</div><div class="line number6 index5 alt1"><code class="java plain">QUAD<|[https:/code></div><div class="line number7 index6 alt2"><code class="java plain">imx6q-igep-base0040ra1git.dts</code></div><div class="line number8 index7 alt1"><code class="java plain">imx6q-igep-base0040rc2isee.dts<biz/code></div><div class="line number9 index8 alt2"><code class="java plain">imx6qlinux-igep-base0040rd102.dts</code><kernel/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">imx6qdllinux-igepomap-base0040ra2.dtsi<6/code><blob/div><div class="line number13 index12 alt2"><code class="java plain">imx6qdlisee-igeplinux-base0040rbv.dtsi</code></div><div class="line number14 index13 alt1"><code class="java plain">imx6qdl-igep-igep0046ra4.dtsi</code></div><div class="line number15 index14 alt2"><code class="java plain">imx6qdl-igep-igep0046rc9.dtsi</code></div></div></div>|}</div></div><y/div>Las DTS están anidadas, esto quiere decir que se cogerá la dtb generada a partir de la .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 confam335x-macro outputigep-block" database0040.dts am335x-hasbody="true" dataigep-macro-name="code"><div class="codeContent panelContent pdl"><div id="highlighter_599857" class="syntaxhighlighter sh-confluence nogutter java">{| cellspacing="0" cellpadding="0" border="0"base0040.dts]
|-
| 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></div>|IGEP SMARC iMX6 Quad|}</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/downloadslinux-imx/itemblob/igep-sdk-yocto-toolchain-1-2-2-3 isee.biz]</span> <span style="color: #000000;">follow the next steps:</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 igep-sdk-yocto-toolchain-*.tar.bz2 -C /</span></pre>* <span style="color: #000000;">Make sure that binaries are installed correctlyimx_4.</span> <pre><span style="color: #808080;"><span style="color: #000000;">jdoe@ubuntu ~/Downloads $ ls /opt/poky/19.2 111_1.20.1<0_ga/span> <arch/span><arm/pre>==<span id="Configure" class="mw-headline" style="color: #000000;">Configure<boot/span>==<span style="color: #000000;">Open a terminal and type:<dts/span> <pre><span style="color: #000000;"> export PATH=/opt/poky/1.2/sysroots/i686imx6q-pokysdkigep-linux/usr/bin/armv7abase0040rd102.dts imx6q-vfpigep-neon-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: '''2base0040rd102.6.37-12 (20161206)'''</span> {| border="1"dts]
|-
|-
||<span style="colorwidth: #808080281.467px;">IGEP00x0</span>|IGEP SMARC iMX6 Ultra Lite||<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-2.6.37-120.bin] ([http:0_ga/arch/downloads.isee.biz/pubarm/releasesboot/linux_kerneldts/v2.6.37imx6ul-12/zImageigep-2base0040rd102.6.37dts imx6ul-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 modulesigep-2base0040rd102.6.37-12dts](, [httphttps://downloadsgit.isee.biz/pub/releases/linux_kernel/v2.6.37linux-12kernel/modules-2.6.37-12.tar.gz.md5 md5sum)]</span>||<span style="color: #808080;">[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.37linux-12imx/zImage-2.6.37-12-wilink8.bin.md5 md5sum])<blob/span>||<span style="color: #808080;">[http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/modules-2imx_4.69.37-12-wilink811_1.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: #808080;">[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;">[http://downloads.isee.biz0_ga/pubarch/releasesarm/linux_kernelboot/v2.6.37-12dts/ti-connectivity-wilink8-0.tar.gz tiimx6ul-connectivityigep-wilink8base0040rd102-0]([http://downloads.iseewifi.biz/pub/releases/linux_kernel/v2.6.37dts imx6ul-12/tiigep-connectivitybase0040rd102-wilink8-0wifi.tar.gz.md5 md5sum)dts]</span>
|}