Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Linux Kernel 4.9.y

104 bytes added, 17:42, 7 May 2018
no edit summary
[[File:245px-Tux.svg.png]] 
=What is Linux?=
Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance.
# 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 data-attributes="%20/"></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">{{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)'''''}}</span></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:<code></code></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;"> &nbsp;</span>
Para dar soporte a una nueva board basada en imx en el kernel es necesario tener un fichero de configuracion defconfig (.config) y&nbsp; una dtb.
Por defecto empezaremos con un defconfig ya creado por igep para procesadores imx
<div class="line number3 index2 alt2"><code class="java plain">imx6dl-igep-base0040rc2.dts</code></div>
<div class="line number4 index3 alt1"><code class="java plain">imx6dl-igep-base0040rd102.dts</code></div>
<div class="line number5 index4 alt2"> &nbsp;</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-base0040ra1.dts</code></div>
<div class="line number8 index7 alt1"><code class="java plain">imx6q-igep-base0040rc2.dts</code></div>
<div class="line number9 index8 alt2"><code class="java plain">imx6q-igep-base0040rd102.dts</code></div>
<div class="line number10 index9 alt1"> &nbsp;</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-base0040ra.dtsi</code></div>
<div class="line number2 index1 alt1"><code class="java spaces">   &nbsp;&nbsp;&nbsp;</code><code class="java plain">imx6dl-igep-base0040rc2.dtb \</code></div><div class="line number3 index2 alt2"><code class="java spaces">    &nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">imx6dl-igep-base0040rd102.dtb \</code></div><div class="line number4 index3 alt1"><code class="java spaces">    &nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">imx6q-igep-base0040rc2.dtb \</code></div><div class="line number5 index4 alt2"><code class="java spaces">    &nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">imx6q-igep-base0040rd102.dtb \</code></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="color: #808080;"> Yocto Toolchain 1.2.2-3</span>=
==<span id="Install" class="mw-headline">Install</span>==
<span style="color: #000000;">Download - &nbsp;[http://www.isee.biz/support/downloads/item/igep-sdk-yocto-toolchain-1-2-2-3 isee.biz]</span>
<span style="color: #000000;">follow the next steps:</span>
<pre><span style="color: #000000;"> export PATH=/opt/poky/1.2/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-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: &nbsp;'''2.6.37-12 (20161206)'''</span>
{| border="1"
||<span style="color: #808080;">IGEP00x0</span>
||<span style="color: #808080;">[http://downloads.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-12/linux-omap-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.bin zImage-2.6.37-12.bin] &nbsp;([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>
||<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.37-12/zImage-2.6.37-12-wilink8.bin.md5 md5sum])</span>
|}
=<span id="Build_kernel_from_sources" class="mw-headline" style="color: #000000;">Build kernel from sources</span>=
<span style="color: #000000;">'''Download''' the &nbsp;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://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/linux-omap-2.6.37-12.tar.gz</a>
cd linux-omap-2.6.37-12
</span></pre>
<span style="color: #000000;">Also, it could download from GIT Repositories ([http://git.isee.biz/ http://git.isee.biz/]) and test the last unstable version at your own risk (see "''Linux mainline tree (development)''" chapter in in&nbsp;[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: #000000;">Consider the following situations:</span>
<span style="color: #000000;">'''Scenario A.''' You &nbsp;You have and IGEP0020 board plus IGEP0022 expansion board, then you should add in your your&nbsp;[index.php/How_do_I_edit_my_kernel_command_line kernel command line]</span>
<pre><span style="color: #000000;">buddy=igep0022
</span></pre>
<span style="color: #000000;">Optionally, to enable the IGEP0022 modem which is disabled by default you should add in your your&nbsp;[index.php/How_do_I_edit_my_kernel_command_line kernel command line]</span>
<pre><span style="color: #000000;">buddy=igep0022 buddy.modem=yes
<span style="color: #000000;">NOTE: UART2 can be used for bluetooth OR modem in expansion board but NOT at same time. They are INCOMPATIBLE.</span>
<span style="color: #000000;">'''Scenario B.''' You &nbsp;You have and IGEP0030 board plus BASE0010 expansion board, then you should add in your your&nbsp;[index.php/How_do_I_edit_my_kernel_command_line kernel command line]</span>
<pre><span style="color: #000000;">buddy=base0010
</span></pre>
<span style="color: #000000;">'''Scenario C.''' You &nbsp;You have and IGEP0030 board plus BASE0010 Rev. B expansion board, then you should add in your your&nbsp;[index.php/How_do_I_edit_my_kernel_command_line kernel command line]</span>
<pre><span style="color: #000000;">buddy=base0010 buddy.revision=B
</span></pre>
<span style="color: #000000;">'''Scenario D.''' You &nbsp;You have and IGEP0032 board plus BASE0010 Rev. B expansion board, then you should add in your your&nbsp;[index.php/How_do_I_edit_my_kernel_command_line kernel command line]</span>
<pre><span style="color: #000000;">buddy=base0010 buddy.revision=B
</span></pre>
<span style="color: #000000;">'''Scenario E.''' You &nbsp;You have and IGEP0030 board plus ILMS0015 expansion board, then you should add in your your&nbsp;[index.php/How_do_I_edit_my_kernel_command_line kernel command line]</span>
<pre><span style="color: #000000;">buddy=ilms0015
</span></pre>
=<span id="Layout" class="mw-headline" style="color: #000000;">Layout</span>=
<span style="color: #808080;">Machine specific files are located in in&nbsp;'''arch/arm/mach-omap2/''' directory &nbsp;directory with name name&nbsp;'''board-igep*.c''' &nbsp;:</span>
* <span style="color: #808080;">'''board-igep0020.c''': For IGEP0020 machine</span>
* <span style="color: #808080;">'''board-igep0032.c''': For IGEP0032 machine</span>
<span style="color: #808080;">Expansion board files, also are located in in&nbsp;'''arch/arm/mach-omap2/''' directory &nbsp;directory with name name&nbsp;'''exp-*.c''' &nbsp;:</span>
* <span style="color: #808080;">'''exp-igep0022.c''': For IGEP0022 expansion board</span>
<span style="color: #808080;">As you can see in Layout chapter, an expansion board is called exp-.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>
<pre><span style="color: #808080;"> #include <&lt;linux/kernel.h>&gt; #include <&lt;linux/init.h>&gt;
void __init dummy_init(void)
+#define IGEP00X0_BUDDY_DUMMY 0x03
#define IGEP00X0_BUDDY_HWREV_A (1 << &lt;&lt; 0) #define IGEP00X0_BUDDY_HWREV_B (1 << &lt;&lt; 1)
</span></pre>
<span style="color: #808080;">also, edit in board-igep00x0.c the buddy_early_param to add the new expansion board,</span>
/* - BASE0010 (adds twl4030_pdata) */
if (igep00x0_buddy_pdata.model == IGEP00X0_BUDDY_BASE0010)
base0010_init(&amp;twl4030_pdata);
+ /* - DUMMY */
+ if (igep00x0_buddy_pdata.model == IGEP00X0_BUDDY_DUMMY)
/* Add twl4030 common data */
omap3_pmic_get_config(&amp;twl4030_pdata, TWL_COMMON_PDATA_USB |
</span></pre>
=<span id="Known_issues" class="mw-headline" style="color: #808080;">Known issues</span>=
<span style="color: #808080;">See See&nbsp;[http://processors.wiki.ti.com/index.php/AM35x-OMAP35x-PSP_04.02.00.07_Release_Notes#Known_Issues_-_AM.2FDM37x http://processors.wiki.ti.com/index.php/AM35x-OMAP35x-PSP_04.02.00.07_Release_Notes#Known_Issues_-_AM.2FDM37x]</span>
==<span id="modules_are_not_installed_correctly" class="mw-headline" style="color: #808080;">modules are not installed correctly</span>==
59
edits