Linux Kernel 2.6.37.y

From IGEP Community Wiki

Jump to: navigation, search

Contents


Introduction

This article is for specific 2.6.37.y Linux kernel branch series. All the steps has been tested with Ubuntu 12.04 64b and IGEP SDK Yocto Toolchain 1.2.2-3.

All configurations support the following IGEP Expansions Boards:

  • IGEP v2 EXPANSION (IGEP0022)
  • IGEP PARIS / BERLIN (BASE0010)
  • IGEP NEW YORK (ILMS0015)

Depending the Kernel configuration used, 2.6.37.y series support the following IGEP OMAP3 Processor Boards:

igep00x0_defconfig

  • IGEP v2 (WIFI/no WIFI) (IGEP0020RC)
  • IGEP COM MODULE / ELECTRON (WIFI/no WIFI) (IGEP0030RE)

igep00x0_wilink8_defconfig

  • IGEP v2 (WIFI/no WIFI) (IGEP0020RF)
  • IGEP COM MODULE / ELECTRON (WIFI/no WIFI) (IGEP0030RG)

igep00x0_nowifi_defconfig

Alternative configuration:

  • IGEP v2 (no WIFI)
  • IGEP COM MODULE / ELECTRON (no WIFI)

Setup IGEP SDK Yocto Toolchain 1.2.2-3

Install

Download - isee.biz

follow the next steps:

  • Open a terminal
  • Located your downloaded file, in my case is inside /home/jdoe/Downloads:
jdoe@ubuntu ~ $ cd Downloads/
  • Extract binaries in root directory with root privileges
jdoe@ubuntu ~/Downloads $ sudo tar jxf igep-sdk-yocto-toolchain-*.tar.bz2 -C /
  • Make sure that binaries are installed correctly.
jdoe@ubuntu ~/Downloads $ ls /opt/poky/
1.2  1.2.1 

Configure

Open a terminal and type:

 export PATH=/opt/poky/1.2/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi:$PATH  

Compiled binaries

Binaries: latest stable kernel version IGEP OMAP3 devices is: 2.6.37-12 (20161206)

Platform Kernel source zImage binary (igep00x0_defconfig) Modules binaries (igep00x0_defconfig) zImage binary (igep00x0_wilink8_defconfig) Modules binaries (igep00x0_wilink8_defconfig) Compat Wireless source (only for igep00x0_wilink8_defconfig) Firmware binaries (only for igep00x0_wilink8_defconfig)
IGEP00x0 2.6.37-12 (md5sum) zImage-2.6.37-12.bin (md5sum) modules-2.6.37-12 (md5sum) zImage-2.6.37-12-wilink8.bin (md5sum) modules-2.6.37-12-wilink8 (md5sum) compat-wireless-wilink8-0 (md5sum) ti-connectivity-wilink8-0 (md5sum)

Build kernel from sources

Download the latest stable version sources and follow next steps:

wget http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/linux-omap-2.6.37-12.tar.gz
tar xzf linux-omap-2.6.37-12.tar.gz
cd linux-omap-2.6.37-12

Also, it could download from GIT Repositories (http://git.isee.biz/) and test the last unstable version at your own risk (see "Linux mainline tree (development)" chapter in The Linux kernel)

Important procedures

  • Remove rootfs modules binaries from any previous Kernel
  • If you switch to another configuration, clean kernel sources with command: make mrproper

igep00x0_defconfig

Configure Linux kernel for IGEP OMAP3 old Marvell WIFI:

make ARCH=arm igep00x0_defconfig

Then build the kernel and kernel modules. The result will be an zImage file in arch/arm/boot directory. Execute:

make ARCH=arm CROSS_COMPILE=[your cross compiler] zImage modules

For example, if you are using IGEP SDK Yocto Toolchain then you should execute following cmdline:

make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-  zImage modules

You can install the kernel image to your target boot

cp arch/arm/boot/zImage /media/boot/zImage

You can install the kernel modules to your target rootfs

make ARCH=arm modules_install INSTALL_MOD_PATH=[path to your target rootfs]

igep00x0_wilink8_defconfig

Configure Linux kernel for IGEP OMAP3 new WiLink 8 WIFI:

make ARCH=arm igep00x0_wilink8_defconfig

Then build the kernel and kernel modules. The result will be an zImage file in arch/arm/boot directory. Execute:

make ARCH=arm CROSS_COMPILE=[your cross compiler] zImage modules

For example, if you are using IGEP SDK Yocto Toolchain then you should execute following cmdline:

make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-  zImage modules

You can install the kernel image to your target boot

cp arch/arm/boot/zImage /media/boot/zImage

You can install the kernel modules to your target rootfs

make ARCH=arm modules_install INSTALL_MOD_PATH=[path to your target rootfs]

Download and extract Compat Wireless source:

cd ..
wget http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/compat-wireless-wilink8-0.tar.gz
tar -xvf compat-wireless-wilink8-0.tar.gz

Modify the environment file (setup-env-wl18xx-rmd). Change KLIB_BUILD variable

export KLIB_BUILD="Linux directory linux-omap-2.6.37-12"

Load the environment file (setup-env-wl18xx-rmd):

source setup-env-wl18xx-rmd

Compile the Compat-Wireless modules:

cd compat-wireless-wilink8-0
make KLIB_BUILD=${KLIB_BUILD} modules

Remove old mac80211.ko and cfg80211.ko modules:

rm ${ROOTFS}/lib/modules/2.6.37-wilink8/kernel/net/mac80211/mac80211.ko
rm ${ROOTFS}/lib/modules/2.6.37-wilink8/kernel/net/wireless/cfg80211.ko

Install the compat-wireless modules to your target rootfs. Change KLIB and ROOTFS variables

make KLIB_BUILD=${KLIB_BUILD} KLIB=${ROOTFS} install-modules

Download Wilink 8 binaries:

wget http://downloads.isee.biz/pub/releases/linux_kernel/v2.6.37-12/ti-connectivity-wilink8-0.tar.gz

Copy WiLink 8 binaries to rootfs/lib/firmware:

sudo tar -xvf ti-connectivity-wilink8-0.tar.gz -C /media/rootfs/lib/firmware


igep00x0_nowifi_defconfig

Configure Linux kernel for IGEP OMAP3 without WIFI:

make ARCH=arm igep00x0_nowifi_defconfig

Then build the kernel and kernel modules. The result will be an zImage file in arch/arm/boot directory. Execute:

make ARCH=arm CROSS_COMPILE=[your cross compiler] zImage modules

For example, if you are using IGEP SDK Yocto Toolchain then you should execute following cmdline:

make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-  zImage modules

You can install the kernel image to your target boot

cp arch/arm/boot/zImage /media/boot/zImage

You can install the kernel modules to your target rootfs

make ARCH=arm modules_install INSTALL_MOD_PATH=[path to your target rootfs]

Kernel Parameters

This chapter describes some 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.

The board.ei485 parameter allows to use UART1 as RS232 port instead of EI485

 board.ei485=  [yes, no]
               Format: <string>
               no: disable ei485, use UART1 as RS232, supported by igep0020
               default: yes

The buddy parameter allows enable or disable expansion boards

 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

The buddy.revision parameter allows to pass hardware revision for buddy boards

 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

The buddy.modem parameter allows enable or disable modem

 buddy.modem=  [yes]
               Format: <string>
               yes: enable modem on buddy board, supported by igep0022 expansion board.
               default: none

Scenarios

Consider the following situations:

Scenario A. You have and IGEP0020 board plus IGEP0022 expansion board, then you should add in your kernel command line

buddy=igep0022

Optionally, to enable the IGEP0022 modem which is disabled by default you should add in your kernel command line

buddy=igep0022 buddy.modem=yes

NOTE: UART2 can be used for bluetooth OR modem in expansion board but NOT at same time. They are INCOMPATIBLE.

Scenario B. You have and IGEP0030 board plus BASE0010 expansion board, then you should add in your kernel command line

buddy=base0010

Scenario C. You have and IGEP0030 board plus BASE0010 Rev. B expansion board, then you should add in your kernel command line

buddy=base0010 buddy.revision=B

Scenario D. You have and IGEP0032 board plus BASE0010 Rev. B expansion board, then you should add in your kernel command line

buddy=base0010 buddy.revision=B

Scenario E. You have and IGEP0030 board plus ILMS0015 expansion board, then you should add in your kernel command line

buddy=ilms0015

Layout

Machine specific files are located in arch/arm/mach-omap2/ directory with name board-igep*.c :

  • board-igep0020.c: For IGEP0020 machine
  • board-igep0030.c: For IGEP0030 machine
  • board-igep0032.c: For IGEP0032 machine

Expansion board files, also are located in arch/arm/mach-omap2/ directory with name exp-*.c :

  • exp-igep0022.c: For IGEP0022 expansion board
  • exp-base0010.c: For BASE0010 expansion board
  • exp-ilms0015.c: For ILMS0015 expansion board

Adding New Expansion Boards

This chapter is meant to be a starting point for people to learn how to add your own expansion board in three steps.

Step 1: Add new expansion board file

As you can see in Layout chapter, an expansion board is called exp-<your board name>.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)

 #include <linux/kernel.h>
 #include <linux/init.h>

 void __init dummy_init(void)
 {
 	pr_info("Initializing expansion board ... \n");
 }

next, add the new file to be built

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 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

Step 2: Register new expansion board

Now, edit board-igep00x0.h and add an identifier for the new expansion board, for example,

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)

also, edit in board-igep00x0.c the buddy_early_param to add the new expansion board,

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");
        }

Step 3: Run expansion board initialization

Finally, modify the machine file and add support for the new expansion board, for example:

diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c
index 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,6 +225,10 @@ static void __init igep0030_init(void)
        /* - BASE0010 (adds twl4030_pdata)  */
        if (igep00x0_buddy_pdata.model == IGEP00X0_BUDDY_BASE0010)
                base0010_init(&twl4030_pdata);
+       /* - DUMMY  */
+       if (igep00x0_buddy_pdata.model == IGEP00X0_BUDDY_DUMMY)
+               dummy_init();
+

        /* Add twl4030 common data */
        omap3_pmic_get_config(&twl4030_pdata, TWL_COMMON_PDATA_USB |

Known issues

See http://processors.wiki.ti.com/index.php/AM35x-OMAP35x-PSP_04.02.00.07_Release_Notes#Known_Issues_-_AM.2FDM37x

modules are not installed correctly

Try to change rootfs owner from root to your username.

 sudo chown <username> -R /media/rootfs

wlcore: Unknown symbol

Probably, you didn't erase old module binaries from rootfs. Open IGEP terminal and type:

depmod -a
depmod -A 

Finally reboot the system

Changelog

  • 2016-12-06 Release 2.6.37-12
    • Improved wilink8 support
  • 2015-10-08 Release 2.6.37-11
    • Added wilink8 support to new IGEP0020-RFxx and IGEP0030-RGxx boards
  • 2014-07-08 Release 2.6.37-10
    • Add CONFIG_DEVTMPFS kernel option that is required for newer udev
    • Update igep00x0_nowifi config options like igep00x0 config options (sync)
    • Fix: smsc911.c: fix mac0 address test
  • 2014-05-22 Release 2.6.37-9
    • Fix sprz319 erratum 2.1 (USB)
    • Add mt9v034 sensor driver
    • Add mt9p031 sensor driver
    • Add TWL4030 PWM driver
  • 2014-03-11 Release 2.6.37-8
    • Add new defconfig without wifi support
    • Add adhoc WEP functionality for libertas driver
    • Change use GPMC timmings and configuration for flash
  • 2014-01-31 Release 2.6.37-7
    • Add TI wl12xx driver support
    • EDR Enhanced Drivers for Linux
    • Fix builds with gcc 4.7
  • 2013-06-10 Release 2.6.37-6
    • #2: [feature] Add SPI device feature: allow configuration of CS line behavior to toggle state every transfered word
    • #85: [request] Add the functionality of a 9-bit UART with userspaces CMSPAR
    • #86: [request] Fuse module
    • #87: [bug] musb-hdrc musb-hdrc.0: configured as A device timeout
  • 2012-11-23 Release 2.6.37-5
    • #70: Compiling error on menuconfig of power management selection.
    • #69: Change OMAP3 video layers format, use video driver and change minimum displays.
    • #29: GFX_FIFO_UNDERFLOW on OMAP3530 when changing system clock speed.
    • #12: USB OTG only detect device one time (or first usb master plug either first slave plug).
  • 2012-07-19 Release 2.6.37-4
    • Fix #026: Add bridging network support.
    • Fix #019: omapdss DISPC error: GFX_FIFO_UNDERFLOW, disabling GFX.
    • Fix #021: Linux kernel doesn't detect Ethernet link after boot on OMAP3530 and IGEP0020-RC2.
    • Fix #027: HDMI standard resolution 720P or 480P it's not working correctly.
  • 2012-05-23 Release 2.6.37-3
    • Fix PM features.
    • Return ENODEV if touchscreen device is not found.
    • Fix SMSC911x issue, wait for the chip to be ready.
    • Fix MCP251X requesting NRESET gpio.
  • 2012-02-29 Release 2.6.37-2
    • base0010: Fix mux for GPIO53
    • Update defconfig (disable JFFS2 SUMMARY SUPPORT)
  • 2012-01-19 Release 2.6.37-1
    • Fix NFS root mount option
    • Add MADC support
    • Add support for Battery Backup
    • Fix RS485 bug when transmitting more than 16 bytes
  • Release 2.6.37-0
    • First release for 2.6.37 series

For more information,it is interesting read The Linux kernel article previously.