Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Linux Kernel 4.9.y

6,974 bytes removed, 16:34, 12 October 2023
Prepare the environment
=<span id="Introduction" class="mw-headline" style="color: #808080;">Introduction</span>=<span style="color: #808080;">This article is for specific 2.6.37.y Linux kernel branch series. All the steps has been tested with [http[File://releases.ubuntu.com/12.04/ubuntu245px-12Tux.04svg.5-desktop-amd64.iso Ubuntu 12.04 64bpng|right|167x197px] and [http://labs.isee.biz/index.php/How_to_setup_a_cross_compiler#IGEP_OMAP3 IGEP SDK Yocto Toolchain 1.2.2-3].</span>&nbsp;
<span style="color: #808080;">All configurations support What is Linux?=Linux is the result of merging the computational Kernel made by Linux Torval and the scheme present in any Unix operative system, Kernel was written from scratch by Linus and a loosely-knit team of hackers across the following IGEP Expansions Boards:</span>Net. It aims towards POSIX standard and Single UNIX Specification compliance.
* <span style="color: #808080;">IGEP v2 EXPANSION (IGEP0022)</span>* <span style="color: #808080;">IGEP PARIS / BERLIN (BASE0010)</span>* <span style="color: #808080;">IGEP NEW YORK (ILMS0015)</span>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: #808080;">Depending the Kernel configuration usedAlthough originally developed first for 32-bit x86-based PCs (386 or higher), 2.6.37today Linux also runs on a multitude of other processor architectures, in both 32- and 64-bit variants.y series support the following IGEP OMAP3 Processor Boards:</span>
==<span id="igep00x0_defconfigIntroduction" class="mw-headline" style="color: #808080;">igep00x0_defconfigIntroduction</span>==* <span style="color: #808080000000;">In order to build the Linux Kernel for IGEP v2 '''(WIFI/no WIFI)''' (IGEP0020'''RC''')</span>* <span style="color: #808080;">IGEP COM MODULE / ELECTRON '''(WIFI/no WIFI)''' (IGEP0030'''RE''')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>
==<span id="igep00x0_wilink8_defconfig" class="mw-headline" style="color: #808080;">igep00x0_wilink8_defconfig</span>==* <span style="color: #808080;">IGEP v2 'To [[Ubuntu 16.04 LTS Toolchain|Ubuntu_16.04]] 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''(WIFI/no WIFI)''' (IGEP0020'''RF''')</span>* <span style="colorll need to override them. The variables in question are: #808080;">IGEP COM MODULE / ELECTRON '''(WIFI/no WIFI)''' (IGEP0030'''RG''')</span>
==* <span id="igep00x0_nowifi_defconfig" class="mw-headline" style="color: #808080;"u>igep00x0_nowifi_defconfig''' ARCH'''</spanu>==<span style=''':''' The ARCH variable is the architecture you're targeting as the kernel knows it. For IGEP PROCESSOR BOARDS you'll set to "color: #808080;arm">Alternative configuration:</span>architecture.
* <span style="color: #808080;"u>IGEP v2 '''(no WIFI)CROSS_COMPILE'''</spanu>* <span style="color''': #808080;">IGEP COM MODULE / ELECTRON '''Hopefully the CROSS_COMPILE variable is pretty self-explanatory. Set this to the prefix of your toolchain (no WIFIincluding the trailing dash "-"). So if your toolchain is invoked as say arm-linux-gnueabihf-gcc, just chop off that trailing gcc and that's what you use: '''arm-linux-gnueabihf-'''</span>
=<span id="Setup_IGEP_SDK_Yocto_Toolchain_1.2.2-3" class="mw-headline" style="color: #808080;">Setup IGEP SDK Yocto Toolchain 1.2.2-3<There is an additional variable, '''INSTALL_MOD_PATH''', which defines where the /span>===<span id="Install" class="mw-headline" style="color: #808080;">Install</span>==<span style="color: #808080;">Download - [http://wwwlib directory will be created, and all the modules stored.iseeWhile you don't have to transfer the kernel sources to your target device, if you build any modules, you'll want this directory.biz/support/downloads/item/igep-sdk-yocto-toolchain-1-2-2-3 isee.biz]</span>
<span style="color: #808080;">follow The general process that it has to be followed in order to compile your Linux Kernel is usually the next stepssame:</span>
* <span style="color: #808080;">Open a terminal</span>Clone the git from ISEE git with the latest stable version of the corresponding Linux Kernel.* <span style="color: #808080;">Located your downloaded fileSelect the corresponding branch inside the git repository.# Select the correct default configuration (defconfig)# Compile the Kernel Image, in my case is inside /home/jdoe/Downloads:</span>Device Tree and Modules of that configuration.
<pre>=<span styleid="How_to_cross_compile_the_linux_kernel" class="color: #808080;mw-headline">jdoe@ubuntu ~ $ cd Downloads/Prepare the environment<br/span></prespan>=* {{Message/Information Message|message=The following steps has been tested using '''Ubuntu 16.04''' and the '''4.9 version''' of the '''arm-linux-'''<span styleclass="color: #808080;mw-headline">Extract binaries in root directory with root privileges'''gnueabihf''' compiler</span>}}
<pre><span style="color: #808080;">jdoe@ubuntu ~/Downloads $ sudo tar jxf igep-sdk-yocto-toolchain-*First we have to set up the Cross Compiler correctly if it is necessary.tar.bz2 -C /</span></pre>* <span style="color: #808080;">Make sure In this [[Set Up the Cross Compiler|post]] there are some steps that binaries are installed correctlycan be followed in order to do it.</span>
<pre><span style="color: #808080;">jdoe@ubuntu ~/Downloads $ ls /opt/poky/1.2 1.2.1 </span></pre>==<span id="Configure" class="mw-headline" style="color: #808080;">Configure</span>==<span style="color: #808080;">Open a terminal and typeIf it is necessary we can install this extra packages that could be necessaries:</span>
<pre> <span styleclass="color: #808080;mw-headline"> export PATH=/opt/poky/1.2/sysroots/i686sudo apt-get install libc6-armel-cross libc6-pokysdkarmhf-linux/usr/bin/armv7across libc6-vfpdev-neonarmel-pokycross libncurses5-linuxdev<br><br>sudo apt-gnueabi:$PATH get install lzop</spanbr></prespan>=<span id="Compiled_binaries" 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: #808080000000;">Compiled binariesIGEP PROCESSOR BOARDS</span>=:<span class="mwbr data-headline" styleattributes="color: #808080;%20/">Binaries: latest stable kernel version IGEP OMAP3 devices is: '''2.6.37-12 (20161206)'''</span>
{| borderclass="1contenttable sortable" style="width: 890px;"
|-
!|<span style="colorwidth: #80808097px;">'''Platform'''</span>!|<span style="color: #808080;">'''Kernel source'''</span>PROCESSOR!|<span style="colorwidth: #808080324.217px;">'''zImage binary (igep00x0_defconfig)'''</span>!|<span style="color: #808080;">'''Modules binaries (igep00x0_defconfig)'''</span>GIT REPOSITORY!|<span style="colorwidth: #808080275.783px;">'''zImage binary (igep00x0_wilink8_defconfig)'''</span>!|<span style="color: #808080;">'''Modules binaries (igep00x0_wilink8_defconfig)'''</span>!|<span style="color: #808080;">'''Compat Wireless source (only for igep00x0_wilink8_defconfig)'''</span>!|<span style="color: #808080;">'''Firmware binaries (only for igep00x0_wilink8_defconfig)'''</span>BRANCH
|-
||<span style="colorwidth: #80808097px;">IGEP00x0</span>|DM3730||<span style="colorwidth: #808080324.217px;">[http|https://downloadsgit.isee.biz/pub/releases/linux_kernel/v2.6.37-12cgit/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])<git/span>||<span style="colorwidth: #808080275.783px;">[http://downloads.|isee.biz/pub/releases/linux_kernel/v2.6.37-12/zImage-2.6.37linux-12v.bin zImage-24.69.37-12.bin] ([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/zImage-2.6.37y|-12.bin.md5 md5sum])</span>||<span style="colorwidth: #80808097px;">[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>|AM335X||<span style="colorwidth: #808080324.217px;">[http|https://downloadsgit.isee.biz/pubcgit/releases/linux_kernel/v2.6.37linux-12kernel/zImagelinux-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/zImageomap-2.6.37-12-wilink8.bin.md5 md5sum])<git/span>||<span style="colorwidth: #808080275.783px;">[http://downloads.|isee.biz/pub/releases/linux_kernel/v2.6.37-12/moduleslinux-2v.6.37-12-wilink84.tar9.gz modules-2.6.37-12-wilink8]([http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/modules-2.6.37y|-12-wilink8.tar.gz.md5 md5sum)]</span>||<span style="colorwidth: #80808097px;">[http|iMX6| style="width://downloads324.isee.biz/pub/releases/linux_kernel/v2.6.37-12/compat-wireless-wilink8-0.tar.gz compat-wireless-wilink8-0]([http217px;"|https://downloadsgit.isee.biz/pubcgit/releases/linux_kernel/v2.6.37linux-12kernel/compat-wireless-wilink8linux-0imx.tar.gz.md5 md5sum])<git/span>||<span style="colorwidth: #808080275.783px;">[http://downloads.|isee.biz/pub/releases/linux_kernel/v2.6.37-12/ti-connectivity-wilink8-0.tar.gz ti-connectivity-wilink8-0]([http://downloadsimx_4.isee.biz/pub/releases/linux_kernel/v29.611_1.37-12/ti-connectivity-wilink8-0.tar.gz.md5 md5sum)]</span>0_ga 
|}
=<span id="Build_kernel_from_sources" class="mw-headline" style="color: #808080;">Build kernel from sources</span>=
<span style="color: #808080;">'''Download''' the latest stable version sources and follow next steps:</span>
<pre><span style="colorTo get to desired branch we will use: #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>tar xzf linux-omap-2.6.37-12.tar.gzcd linux-omap-2.6.37-12</span></pre><span style="color: #808080;">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 [index.php/The_Linux_kernel The Linux kernel])</span>
==<span id="Important_procedures" class="mw-headline" style="color: #808080;">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> git checkout [your_branch]
==<span id="igep00x0_defconfig_2How_to_cross_compile_the_linux_kernel" class="mw-headline" style>Compile the Linux Kernel<br data-attributes="color: #808080;%20/">igep00x0_defconfig</span>==<span style="color: #808080000000;">'''Configure''' Linux kernel for IGEP OMAP3 old Marvell WIFI:Once the development environment has been correctly set up, the following steps can be followed in order to compile the Linux Kernel using a Cross Compiler.<br data-attributes="%20/"></span>
<pre><span style="color: #808080000000;">make ARCH=arm igep00x0_defconfig</span></pre><span style="color: #808080;">Then First of all, the default configuration ''(defconfig)'build''' the kernel and kernel moduleshas to be loaded. The result will It can be an ''zImage'' file in arch/arm/boot directory. Executedone by writing the following command:</span>
<pre> <span style="color: #808080000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- [your cross compileryour_defconfig] zImage modules</spancode></prespan><span style="color: #808080;">For example, if you are using In the following table it can be found the name of each default configuration associated to each IGEP SDK Yocto Toolchain then you should execute following cmdlinePROCESSORS BOARDS:</span>
{| class="contenttable sortable" style="width: 888px;"|-! style="width: 160px;"|BOARD! style="width: 163px;"|DEFCONFIG! style="width: 527px;"|EXAMPLE|-| style="width: 160px;"|IGEPv5 OMAP5432| style="width: 163px;"|[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: 527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- omap2plus_defconfig  <prebr /></code></span>|-| style="width: 160px;"|IGEPv2 DM3730| style="width: 163px;"|[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: 527px;"|<span style="color: #808080000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-pokylinux-gnueabihf- omap2plus_defconfig</code></span>|-| style="width: 160px;"|IGEP COM AQUILA AM335x| style="width: 163px;"|[https://git.isee.biz/linux-kernel/linux-gnueabiomap-2.6/blob/isee-linux- zImage modulesv.4.9.y/arch/arm/configs/am335x_igep0034_defconfig am335x_igep0034_defconfig]| style="width: 527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_igep0034_defconfig</code></span>|-| style="width: 160px;"|IGEP COM MODULE DM3730/AM3703| style="width: 163px;"|[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: 527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- omap2plus_defconfig</code></span>|-| style="width: 160px;"|IGEP SMARC AM335x| style="width: 163px;"|[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: 527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_igep0034_defconfig</code></prespan>|-| style="width: 160px;"|IGEP SMARC iMX6S/DL/Q| style="width: 163px;"|[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: 527px;"|<span style="color: #808080000000;">You can '''install''' the <code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx6_igep0046_defconfig</code></span>|-| style="width: 160px;"|IGEP SMARC iMX6UL/ULL||[https://git.isee.biz/linux-kernel image to your target boot/linux-imx/blob/isee-imx_4.9.11_1.0.0_ga/arch/arm/configs/imx6_igep0146_defconfig imx6_igep0146_defconfig]| style="width: 527px;"|<span style="color: #000000;"><code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 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:
<pre><span style="color* '''Image: #808080;">cp arch/arm/boot/zImage /media/boot/'''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.</span></pre>* '''DTBs: '''Device tree binary, a low level device description, specific to your device.<span style="color: #808080;">You can * '''installModules: ''' the Kernel Modules, pieces of code that can be loaded and unloaded into the kernel modules upon demand. They extend the functionality of the kernel without the need to your target rootfs</span>reboot the system. 
<pre><span style="color: #808080;">make ARCH=arm modules_install INSTALL_MOD_PATH=[path In order to compile this three elements we have to your target rootfs]</span></pre>=<span id="Kernel_Parameters" class="mw-headline" style="color: #808080;">Kernel Parameters</span>=<span style="colortype: #808080;">This chapter describes some [index.php/How_do_I_edit_my_kernel_command_line kernel command line] parameters you can pass to the kernel during system startup. They also depend on the presence of the hardware with which they are associated.</span>
<span style="color: #808080000000;">The '''board.ei485''' parameter allows to use UART1 as RS232 port instead of EI485<code class="java plain">make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage dtbs modules</code></span>
<pre><span style="color: #808080;"> board.ei485= [yes, no] Format: <string> no: disable ei485, use UART1 as RS232, supported by igep0020 default: yes<Finally we will find the resulting compiled Kernel in the '''''arch/span><arm/pre><span style="color: #808080;">The boot'''buddy''' parameter allows enable or disable expansion boards</span>folder:
<pre><span style="color* zImage: #808080;"> buddy= [igep0022, base0010] Format: <string> igep0022: enable expansion board, supported by igep0020 board base0010: enable expansion board, supported by igep0030 board and igep0032 (only rev. B) ilms0015: enable expansion board, supported by igep0030 board default: none<located in '''arch/arm/span><boot/pre><span style="color: #808080;">The zImage'''buddy* DTB: located in arch/arm/boot/dts/.revisiondtb. Depending of the board the dtb file will be different. In the following table it is detailed the corresponding dtb filename for each b''' parameter allows to pass hardware revision for buddy boards<br /span>'''
<pre><span style="color: #808080;"> buddy.revision= [A, B]
Format: <string>
A: enable hardware buddy revision A, only available for base0010
B: enable hardware buddy revision B, only available for base0010
default: A
</span></pre>
<span style="color: #808080;">The '''buddy.modem''' parameter allows enable or disable modem</span>
<pre><span style="color: #808080;"> buddy.modem= [yes] Format: <string> yes: enable modem on buddy board, supported by igep0022 expansion board. default: none</span></pre>==<span id="Scenarios" {| class="mw-headlinecontenttable sortable" style="colorwidth: #808080890px;">Scenarios</span>==<span |-! style="colorwidth: #808080281.467px;">Consider the following situations:</span>|BOARD<span ! style="colorwidth: #808080588.533px;">'''Scenario A.''' You have and IGEP0020 board plus IGEP0022 expansion board, then you should add in your [index.php/How_do_I_edit_my_kernel_command_line kernel command line]</span>|DTB NAME|-<pre><span | style="colorwidth: #808080281.467px;">buddy=igep0022</span></pre>|IGEPv2 DM3730<span | style="colorwidth: #808080588.533px;">Optionally, to enable the IGEP0022 modem which is disabled by default you should add in your |[indexhttps://git.phpisee.biz/How_do_I_edit_my_kernel_command_line linux-kernel command line/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]</span>|-<pre><span | style="colorwidth: #808080281.467px;">buddy=igep0022 buddy.modem=yes</span><|IGEP COM MODULE DM3730/pre>AM3703<span | style="colorwidth: #808080588.533px;">NOTE|[https: UART2 can be used for bluetooth OR modem in expansion board but NOT at same time//git.isee. They are INCOMPATIBLEbiz/linux-kernel/linux-omap-2.<6/blob/span> <span style="color: #808080;">'''Scenario Bisee-linux-v.4.''' You have and IGEP0030 board plus BASE0010 expansion board, then you should add in your [index9.phpy/How_do_I_edit_my_kernel_command_line kernel command linearch/arm/boot/dts/omap3-igep0030-rev-g.dts omap3-igep0030-rev-g.dts]</span>|-<pre><span | style="colorwidth: #808080281.467px;">buddy=base0010|IGEP COM AQUILA AM335x</span></pre><span | style="colorwidth: #808080588.533px;">'''Scenario C.''' You have and IGEP0030 board plus BASE0010 Rev|[https://git. B 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: #808080;">buddy=base0010 buddylinux-omap-2.revision=B<6/span><blob/pre><span style="color: #808080;">'''Scenario Disee-linux-v.''' You have and IGEP0032 board plus BASE0010 Rev4. B expansion board, then you should add in your [index9.phpy/How_do_I_edit_my_kernel_command_line kernel command linearch/arm/boot/dts/am335x-base0033.dts am335x-base0033.dts]</span>|-<pre><span | style="colorwidth: #808080281.467px;">buddy=base0010 buddy.revision=B</span></pre>|IGEPv5 OMAP5432<span | style="colorwidth: #808080588.533px;">'''Scenario E|[https://git.''' 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: #808080;">buddy=ilms0015<linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/boot/span><dts/pre>omap5-igep0050.dts omap5-igep0050.dts]=<span id="Layout" class="mw|-headline" | style="colorwidth: #808080281.467px;">Layout</span>=|IGEP SMARC AM335x<span | style="colorwidth: #808080588.533px;">Machine specific files are located in '''|[https://git.isee.biz/linux-kernel/linux-omap-2.6/blob/isee-linux-v.4.9.y/arch/arm/mach-omap2boot/dts/''' directory with name '''boardam335x-igep*-base0040.c''' :</span>dts am335x-igep-base0040.dts]|-* <span | style="colorwidth: #808080281.467px;">'''board-igep0020.c''': For IGEP0020 machine</span>|IGEP SMARC iMX6 Quad* <span | style="colorwidth: #808080588.533px;">'''board|[https://git.isee.biz/linux-kernel/linux-igep0030.c''': For IGEP0030 machine<imx/blob/span>* <span style="color: #808080;">'''boardisee-igep0032imx_4.c''': For IGEP0032 machine<9.11_1.0.0_ga/span> <span style="color: #808080;">Expansion board files, also are located in '''arch/arm/machboot/dts/imx6q-igep-base0040rd102.dts imx6q-omap2/''' directory with name '''expigep-*base0040rd102.c''' :</span>dts]|-* <span | style="colorwidth: #808080281.467px;">'''exp-igep0022.c''': For IGEP0022 expansion board</span>|IGEP SMARC iMX6 Dual Lite* <span | style="colorwidth: #808080588.533px;">'''exp|[https://git.isee.biz/linux-kernel/linux-base0010imx/blob/isee-imx_4.9.c''': For BASE0010 expansion board<11_1.0.0_ga/arch/arm/boot/dts/span>* <span style="color: #808080;">'''expimx6dl-igep-base0040rd102.dts imx6dl-igep-ilms0015base0040rd102.c''': For ILMS0015 expansion board</span>dts]|-=<span id="Adding_New_Expansion_Boards" class="mw-headline" | style="colorwidth: #808080281.467px;">Adding New Expansion Boards</span>=|IGEP SMARC iMX6 Ultra Lite<span style="color||[https: #808080;">This chapter is meant to be a starting point for people to learn how to add your own expansion board in three steps//git.isee.<biz/linux-kernel/span> ==<span id="Step_1:_Add_new_expansion_board_file" class="mwlinux-headline" style="color: #808080;">Step 1: Add new expansion board file<imx/blob/span>==<span style="color: #808080;">As you can see in Layout chapter, an expansion board is called expisee-<your board name>imx_4.9.11_1.0.c and should be located in 0_ga/arch/arm/machboot/dts/imx6ul-omap2 directoryigep-base0040rd102.dts imx6ul-igep-base0040rd102.dts], so the first step will be add a new file for your new expansion board[https://git.isee. Following example creates a new expansion board file called expbiz/linux-dummykernel/linux-imx/blob/isee-imx_4.c (9.11_1.0.0_ga/arch/arm/machboot/dts/imx6ul-igep-base0040rd102-wifi.dts imx6ul-igep-omap2/expbase0040rd102-dummywifi.c)</span>dts]|}
<pre><span style="color: #808080;"> #include <linuxOnce you have to compile the Kernel, you have to copy de Zimage and dtb in /media/user/kernelboot.h> #include '''<linuxbr /init.h>'''
void __init dummy_init(void) { pr_info("Initializing expansion board ... \n"); }</span></pre><span style="colorzImage example: #808080;">next, add the new file to be built</span>
<pre><span style="color: #808080000000;">diff --git a/<code class="java plain">cp arch/arm/mach-omap2boot/Makefile bzimage /archmedia/armuser/mach-omap2/Makefileindex 7505be9..a6572f2 100644--- a/arch/arm/mach-omap2/Makefile+++ b/arch/arm/mach-omap2/Makefile@@ -156,6 +156,7 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ obj-$(CONFIG_MACH_IGEP0030) += board-igep0030.o \ board-igep00x0.o \ exp-base0010.o \+ exp-dummy.o \ hsmmc.o obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ hsmmc.o</span></pre>==<span id="Step_2:_Register_new_expansion_board" class="mw-headline" style="color: #808080;">Step 2: Register new expansion boardboot</span>==<span style="color: #808080;"code>Now, edit board-igep00x0.h and add an identifier for the new expansion board, for example,</span>
<pre><span style="color: #808080;">diff --git a/arch/arm/mach-omap2/board-igep00x0.h b/arch/arm/mach-omap2/board-igep00x0.h
index 6b9b677..a2325d7 100644
--- a/arch/arm/mach-omap2/board-igep00x0.h
+++ b/arch/arm/mach-omap2/board-igep00x0.h
@@ -15,6 +15,7 @@
#define IGEP00X0_BUDDY_NONE 0x01
#define IGEP00X0_BUDDY_IGEP0022 0x01
#define IGEP00X0_BUDDY_BASE0010 0x02
+#define IGEP00X0_BUDDY_DUMMY 0x03
#define IGEP00X0_BUDDY_HWREV_A (1 << 0) #define IGEP00X0_BUDDY_HWREV_B (1 << 1)</span></pre><span style="color: #808080000000;">also, edit in board<code class="java plain">cp arch/arm/boot/dts/omap3-igep00x0igep0020-rev-f.c the buddy_early_param to add the new expansion board,dtb /media/user/boot</code></span>
<pre><span style="color: #808080;">diff --git a/arch/arm/mach-omap2/board-igep00x0.c b/arch/arm/mach-omap2/board-igep00x0.c
index 2a2d8eb..f2b5b27 100644
--- a/arch/arm/mach-omap2/board-igep00x0.c
+++ b/arch/arm/mach-omap2/board-igep00x0.c
@@ -192,6 +192,9 @@ static int __init buddy_early_param(char *str)
if (!strcmp(name, "base0010")) {
igep00x0_buddy_pdata.model = IGEP00X0_BUDDY_BASE0010;
pr_info("IGEP: IGEP0030 machine + BASE0010 (buddy)\n");
+ } else if (!strcmp(name, "dummy")) {
+ igep00x0_buddy_pdata.model = IGEP00X0_BUDDY_DUMMY;
+ pr_info("IGEP: IGEP0030 machine + DUMMY (buddy)\n");
} else
pr_err("IGEP: Unknown buddy for IGEP0030 machine\n");
}
</span></pre>
==<span id="Step_3:_Run_expansion_board_initialization" class="mw-headline" style="color: #808080;">Step 3: Run expansion board initialization</span>==
<span style="color: #808080;">Finally, modify the machine file and add support for the new expansion board, for example:</span>
<pre><span style="color: #808080;">diff --git '''Before to install the modules, you need to choose a/arch/arm/mach[[IGEP Firmware set-omap2/board-igep0030.c b/arch/armup|rootfs]] and copy in your SDCard or Nand/mach-omap2/board-igep0030MMC rootfs parition.cindex 2b97257..44b319d 100644--- a/arch/arm/mach-omap2/board-igep0030.c+++ b/arch/arm/mach-omap2/board-igep0030.c@@ -204,6 +204,8 @@ static struct omap_board_mux board_mux[] __initdata = {'''
/* Expansion board: BASE0010 */
extern void __init base0010_init(struct twl4030_platform_data *pdata);
+/* Expansion board: DUMMY */
+extern void __init dummy_init(void);
static void __init igep0030_init(void) {@@ -223'''Finally''',6 +225the last step is to''' install the modules inside the desired rootfs'''. For example,10 @@ static void __init igep0030_init(void) /* - BASE0010 (adds twl4030_pdata) */ if (igep00x0_buddy_pdata.model == IGEP00X0_BUDDY_BASE0010) base0010_init(&twl4030_pdata);+ the rootfs is located in a external storage device mounted on the /* - DUMMY */+ if (igep00x0_buddy_pdata.model == IGEP00X0_BUDDY_DUMMY)+ dummy_init();+media folder:
sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=/* Add twl4030 common data *media/ omap3_pmic_get_config(&twl4030_pdata, TWL_COMMON_PDATA_USB |<user/span><rootfs/pre>modules_install==<span id="Known_issuesLinux_kernels" class="mw-headline" style="color: #808080;">Known issuesLinux kernels</span>==<span style="color: #808080;">See [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>To get more information about our Kernel and their compatibilities
==<span id="modules_are_not_installed_correctly" class="mw-headline" style="color: #808080;">modules are not installed correctly</span>==* [[Linux Kernel 4.1.y|Linux Kernel 4.1]]<span style="color: #808080;">Try to change rootfs owner from root to your username* [[Linux Kernel 3.8.y|Linux Kernel 3.</span>8]]
<pre><span style="color: #808080;"> sudo chown <username> -R /media/rootfs</span></pre>
==<span id="wlcore:_Unknown_symbol" class="mw-headline" style="color: #808080;">wlcore: Unknown symbol</span>==
<span style="color: #808080;">Probably, you didn't erase old module binaries from rootfs. Open IGEP terminal and type:</span>
<pre><span style="color[[Category: #808080;">depmod -aLinux]]depmod -A </span></pre><span style="color[[Category: #808080;">Finally reboot the system</span>Linux_Kernel]]