Difference between revisions of "The Linux kernel"

From IGEP - ISEE Wiki

Jump to: navigation, search
(Linux OMAP v2.6.33 series (stable))
Line 18: Line 18:
  
 
First of all setup the build environment sourcing this script  
 
First of all setup the build environment sourcing this script  
<pre>$ source /usr/local/poky/eabi-glibc/arm/environment-setup
+
$ source /usr/local/poky/eabi-glibc/arm/environment-setup
</pre>
 
 
or  
 
or  
<pre>$ source /usr/local/poky/eabi-glibc/environment-setup-arm-none-linux-gnueabi
+
$ source /usr/local/poky/eabi-glibc/environment-setup-arm-none-linux-gnueabi
</pre>
 
 
if you have updated your SDK environment to latest version (see [[Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine]])
 
if you have updated your SDK environment to latest version (see [[Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine]])
  
=== Kernel image for IGEP v2  ===
+
=== Linux OMAP v2.6.33 series (stable) ===
  
==== Linux OMAP v2.6.33 series (stable)  ====
+
Latest stable kernel version is: '''2.6.33.5-0 (20100611)'''  
 
 
Latest stable kernel version is: '''2.6.33.4-0 (20100517)'''  
 
  
 
{| border="1"
 
{| border="1"
Line 37: Line 33:
 
! '''Modules binaries'''
 
! '''Modules binaries'''
 
|-
 
|-
| [http://downloads.igep.es/sources/linux-omap-2.6.33.4-0.tar.gz 2.6.33.4-0] ([http://downloads.igep.es/sources/linux-omap-2.6.33.4-0.tar.gz.md5 md5sum])  
+
| [http://downloads.igep.es/sources/linux-omap-2.6.33.5-0.tar.gz 2.6.33.5-0] ([http://downloads.igep.es/sources/linux-omap-2.6.33.5-0.tar.gz.md5 md5sum])  
| [http://downloads.igep.es/binaries/kernel/v2.6.33.4-0/uImage-2.6.33.4-0.bin uImage-2.6.33.4-0.bin] ([http://downloads.igep.es/binaries/kernel/v2.6.33.4-0/uImage-2.6.33.4-0.bin.md5 md5sum])  
+
| [http://downloads.igep.es/binaries/kernel/v2.6.33.5-0/uImage-2.6.33.5-0-igep0020.bin uImage-2.6.33.5-0-igep0020.bin] ([http://downloads.igep.es/binaries/kernel/v2.6.33.5-0/uImage-2.6.33.5-0-igep0020.bin.md5 md5sum])
| [http://downloads.igep.es/binaries/kernel/v2.6.33.4-0/linux-omap-modules-2.6.33.4-0.tar.gz modules-2.6.33.4-0] ([http://downloads.igep.es/binaries/kernel/v2.6.33.4-0/linux-omap-modules-2.6.33.4-0.tar.gz.md5 md5sum)]
+
| [http://downloads.igep.es/binaries/kernel/v2.6.33.5-0/linux-omap-modules-2.6.33.5-0-igep0020.tar.gz modules-2.6.33.5-0-igep0020] ([http://downloads.igep.es/binaries/kernel/v2.6.33.5-0/linux-omap-modules-2.6.33.5-0-igep0020.tar.gz.md5 md5sum)]
 +
|-
 +
| [http://downloads.igep.es/sources/linux-omap-2.6.33.5-0.tar.gz 2.6.33.5-0] ([http://downloads.igep.es/sources/linux-omap-2.6.33.5-0.tar.gz.md5 md5sum])
 +
| [http://downloads.igep.es/binaries/kernel/v2.6.33.5-0/uImage-2.6.33.5-0-igep0030.bin uImage-2.6.33.5-0-igep0030.bin] ([http://downloads.igep.es/binaries/kernel/v2.6.33.5-0/uImage-2.6.33.5-0-igep0030.bin.md5 md5sum])  
 +
| [http://downloads.igep.es/binaries/kernel/v2.6.33.5-0/linux-omap-modules-2.6.33.5-0-igep0030.tar.gz modules-2.6.33.5-0-igep0030] ([http://downloads.igep.es/binaries/kernel/v2.6.33.5-0/linux-omap-modules-2.6.33.5-0-igep0030.tar.gz.md5 md5sum)]
 
|}
 
|}
  
Download the IGEP v2 Linux kernel sources and follow next steps:  
+
Download the IGEP Linux kernel sources and follow next steps:  
<pre>$ wget http://downloads.igep.es/sources/linux-omap-2.6.33.tar.gz
+
$ wget http://downloads.igep.es/sources/linux-omap-2.6.33.tar.gz
$ tar xzf linux-omap-2.6.33.tar.gz
+
$ tar xzf linux-omap-2.6.33.tar.gz
$ cd [kernel version]
+
$ cd [kernel version]
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- igep0020_defconfig
+
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- <board-config>
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules
+
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules
</pre>  
+
 
 +
where:
 +
 
 +
* <board-config> is igep0020_defconfig for IGEP v2 platform.
 +
* <board-config> is igep0030_defconfig for OMAP3 IGEP module.
 +
 
 
The result will be an uImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs  
 
The result will be an uImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs  
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]
+
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]
</pre>
+
 
 +
==== CHANGELOG ====
 +
 
 +
* [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=commit;h=7c1be0293958b1aa661b224cecf96bbf8a34bc61 2010-06-11 Release 2.6.33.5-0]
 +
** add support for OMAP3 IGEP module (igep0030)
  
==== Linux OMAP v2.6.28 series (stable)  ====
+
=== Linux OMAP v2.6.28 series (stable)  ===
  
 
Latest stable kernel version is: '''2.6.28.10-3 (20100318)'''  
 
Latest stable kernel version is: '''2.6.28.10-3 (20100318)'''  
Line 78: Line 87:
 
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]
 
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]
 
</pre>  
 
</pre>  
==== Linux Android 2.6 (development)  ====
+
 
 +
=== Linux Android 2.6 (development)  ===
  
 
Clone the GIT repository from git.myigep.com. Based on rowboat project tree.  
 
Clone the GIT repository from git.myigep.com. Based on rowboat project tree.  
Line 92: Line 102:
 
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]
 
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]
 
</pre>  
 
</pre>  
==== Linux mainline tree (development)  ====
+
 
 +
=== Linux mainline tree (development)  ===
  
 
Here is where the development work takes place and you should use this if you're after to work with the latest cutting edge developments. It is possible 'master' can suffer temporary periods of instability while new features are developed and if this is undesirable we recommend using one of the release branches. Additional patches can be found at http://patchwork.kernel.org/project/linux-omap/list  
 
Here is where the development work takes place and you should use this if you're after to work with the latest cutting edge developments. It is possible 'master' can suffer temporary periods of instability while new features are developed and if this is undesirable we recommend using one of the release branches. Additional patches can be found at http://patchwork.kernel.org/project/linux-omap/list  
Line 109: Line 120:
 
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]
 
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]
 
</pre>  
 
</pre>  
=== Reference: Kernel features  ===
+
 
 +
== Reference: Kernel features  ==
  
 
{| border="1" cellspacing="2" cellpadding="2" style="color: black; border-collapse: collapse;"
 
{| border="1" cellspacing="2" cellpadding="2" style="color: black; border-collapse: collapse;"
Line 212: Line 224:
 
|}
 
|}
  
=== Reference: QA, diagnosis &amp; tests  ===
+
== Reference: QA, diagnosis &amp; tests  ==
  
==== OneNAND  ====
+
=== OneNAND  ===
  
 
This page describes basic testing of OneNAND/NAND Flash devices, controllers, and wear levelling filesystems.  
 
This page describes basic testing of OneNAND/NAND Flash devices, controllers, and wear levelling filesystems.  
  
===== Simple read and write test  =====
+
==== Simple read and write test  ====
  
 
How to test:  
 
How to test:  
Line 251: Line 263:
 
|}
 
|}
  
===== Flash filesystem performance  =====
+
==== Flash filesystem performance  ====
  
 
How to test: run  
 
How to test: run  

Revision as of 13:03, 6 July 2010

How to cross compile the linux kernel

Embedded Linux is the use of a Linux operating system in embedded computer systems such as mobile phones, personal digital assistants, media players, set-top boxes, and other consumer electronics devices, networking equipment, machine control, industrial automation, navigation equipment and medical instruments.

Unlike desktop and server versions of Linux, embedded versions of Linux are designed for devices with relatively limited resources, such as cell phones and set-top boxes. Due to concerns such as cost and size, embedded devices usually have much less RAM and secondary storage than desktop computers, and are likely to use flash memory instead of a hard drive. Since embedded devices serve specific rather than general purposes, developers optimize their embedded Linux distributions to target specific hardware configurations and usage situations. These optimizations can include reducing the number of device drivers and software applications, and modifying the Linux kernel to be a real-time operating system.

Overview of How-To

This How-To is meant to be a starting point for people to learn build a kernel image for IGEP v2 devices as quickly and easily as possible.

This How-To works with the Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine but most of the contents are valid also for other GNU/Linux distributions. We do not issue any guarantee that this will work on other distributions.

Requirements

  • Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine

Supported kernels

First of all setup the build environment sourcing this script

$ source /usr/local/poky/eabi-glibc/arm/environment-setup

or

$ source /usr/local/poky/eabi-glibc/environment-setup-arm-none-linux-gnueabi

if you have updated your SDK environment to latest version (see Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine)

Linux OMAP v2.6.33 series (stable)

Latest stable kernel version is: 2.6.33.5-0 (20100611)

Sources uImage binary Modules binaries
2.6.33.5-0 (md5sum) uImage-2.6.33.5-0-igep0020.bin (md5sum) modules-2.6.33.5-0-igep0020 (md5sum)
2.6.33.5-0 (md5sum) uImage-2.6.33.5-0-igep0030.bin (md5sum) modules-2.6.33.5-0-igep0030 (md5sum)

Download the IGEP Linux kernel sources and follow next steps:

$ wget http://downloads.igep.es/sources/linux-omap-2.6.33.tar.gz
$ tar xzf linux-omap-2.6.33.tar.gz
$ cd [kernel version]
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- <board-config>
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules

where:

  • <board-config> is igep0020_defconfig for IGEP v2 platform.
  • <board-config> is igep0030_defconfig for OMAP3 IGEP module.

The result will be an uImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]

CHANGELOG

Linux OMAP v2.6.28 series (stable)

Latest stable kernel version is: 2.6.28.10-3 (20100318)

Sources uImage binary Modules binaries
2.6.28.10-3 (md5sum) uImage-2.6.28.10-3.bin (md5sum) modules-2.6.28.10-3 (md5sum)

Download the IGEP v2 Linux kernel sources and follow next steps:

$ wget http://downloads.igep.es/sources/linux-omap-2.6.28.tar.gz
$ tar xzf linux-omap-2.6.28.tar.gz
$ cd [kernel version]
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- igep0020_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules

The result will be an uImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]

Linux Android 2.6 (development)

Clone the GIT repository from git.myigep.com. Based on rowboat project tree.

$ git clone git://git.igep.es/pub/scm/linux-omap-2.6.git
$ cd linux-omap-2.6
$ git checkout origin/linux-android-2.6 -b linux-android-2.6

and build with

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- igep0020_android_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules

The result will be an uImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]

Linux mainline tree (development)

Here is where the development work takes place and you should use this if you're after to work with the latest cutting edge developments. It is possible 'master' can suffer temporary periods of instability while new features are developed and if this is undesirable we recommend using one of the release branches. Additional patches can be found at http://patchwork.kernel.org/project/linux-omap/list

This Linux kernel is also considered as a downstream of tmlind's Linux kernel. The main difference between this tree and the linux-omap tree is that the myigep OMAP tree has unpublished patches for IGEP v2 support.

Clone GIT repository from git.myigep.com

$ git clone git://git.igep.es/pub/scm/linux-omap-2.6.git
$ cd linux-omap-2.6

and build with

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- igep0020_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules

The result will be an uImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs]

Reference: Kernel features

 Kernel version   Ethernet   USB OTG   USB host   WIFI SDIO   Bluetooth   Audio IN   Audio OUT   DVI-D (Vesa)   HDMI (720p)   OneNAND   Hw. Rev. B   Hw. Rev. C 
 2.6.33.4-0     (20100517) PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS
 2.6.33.2-0     (20100406) PASS PASS PASS PASS PASS PASS PASS PASS PASS FAIL PASS NA
 2.6.28.10-3   (20100318) PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS
 2.6.28.10-2   (20091222) PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS NA
 2.6.28.10-1   (20091109) PASS PASS PASS PASS PASS PASS PASS PASS FAIL PASS PASS NA
 2.6.28.10-0   (20090903) PASS PASS PASS PASS PASS FAIL PASS PASS FAIL PASS PASS NA

Reference: QA, diagnosis & tests

OneNAND

This page describes basic testing of OneNAND/NAND Flash devices, controllers, and wear levelling filesystems.

Simple read and write test

How to test:

  1. run 'nandtest -l 4194304 -k -p 5 /dev/mtd4'.

Result should be like this:

ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
003c0000: checking...
Finished pass 1 successfully
003c0000: checking...
Finished pass 2 successfully
003c0000: checking...
Finished pass 3 successfully
003c0000: checking...
Finished pass 4 successfully
003c0000: checking...
Finished pass 5 successfully
 2.6.28.y   2.6.33.y   2.6.34.y 
PASS PASS PASS

Flash filesystem performance

How to test: run

  1. flash_eraseall /dev/mtd4
  2. mkdir /mnt/qa
  3. mount -t jffs2 /dev/mtdblock4 /mnt/qa
  4. cd /mnt/qa
  5. bonnie++ -u 0:0 -s 32 -m 16 -r 16

Result should be like this:

Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
16              32M   268   8   282   0   311   0  3082  99 +++++ +++ 331.8   1
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16    50   1  2296  24    48   1    48   1  2440  21    48   1
16,32M,268,8,282,0,311,0,3082,99,+++++,+++,331.8,1,16,50,1,2296,24,48,1,48,1,2440,21,48,1
Kernel 2.6.33
Sequential Output Sequential Input

Random
Seeks


Sequential Create Random Create
Filesystem
Size(MB) Per Char Block Rewrite Per Char Block Files Create Stat Delete Create Stat Delete

K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec % CPU / sec %CPU
/sec %CPU / sec %CPU /sec %CPU /sec %CPU / sec %CPU /sec %CPU
JFFS2 32M 268 8 282 0 311 0 3082 99 +++++ +++ 331.8 1 16 50 1 2296 24 48 1 48 1 2440 21 48 1