Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

The Linux kernel

14,685 bytes removed, 13:46, 12 March 2018
Linux kernels
=What is Linux?= How to cross compile [[Image:tux.png|left]][http://www.kernel.org The Linux Kernel Archives]Linux is a clone of the linux kernel ==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.
Embedded Linux is It has all the use of features you would expect in a Linux operating system in embedded computer systems such as mobile phonesmodern fully-fledged Unix, including true multitasking, virtual memory, personal digital assistantsshared libraries, media playersdemand loading, setshared copy-top boxeson-write executables, proper memory management, and other consumer electronics devices, multistack networking equipment, machine control, industrial automation, navigation equipment including IPv4 and medical instrumentsIPv6.
Unlike desktop and server versions of Linux, embedded versions of Linux are designed Although originally developed first for devices with relatively limited resources, such as cell phones and set32-bit x86-top boxes. Due to concerns such as cost and sizebased PCs (386 or higher), embedded devices usually have much less RAM and secondary storage than desktop computers, and are likely to use flash memory instead of today Linux also runs on 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 multitude of device drivers and software applicationsother processor architectures, in both 32- and modifying the Linux kernel to be a real64-time operating systembit variants.
=== Overview of How-To ===This How-To is meant to be a starting point for people to learn build a kernel image for IGEP Processor Boards as quickly and easily as possible.
This =How-To is meant to be a starting point cross compile the linux kernel=In order to build the Linux Kernel for people IGEP PROCESSOR BOARDS it's recommended to learn cross-compile the kernel, that's, build a the kernel image in your HOST machine for IGEP v2 devices as quickly and easily as possiblea target architecture.
This How-To works with the [[Ubuntu 816.04 IGEP v2LTS Toolchain|setup the cross-compiling]] there are two fundamental variables that the kernel uses to select the target architecture.0 SDK Virtual Machine Normally these values are guessed based on your build environment, but most of the contents course that environment here does not match our target embedded system, so we'll need to override them. The variables in question are valid also for other GNU/Linux distributions. We do not issue any guarantee that this will work on other distributionsARCH and CROSS_COMPILE.
=== Requirements ===The ARCH variable is the architecture you're targetting as the kernel knows it. For IGEP PROCESSOR BOARDS you'll set to "arm" architecture.
*'''Ubuntu 8Hopefully the CROSS_COMPILE variable is pretty self-explanatory.04 IGEP v2Set this to the prefix of your toolchain (including the trailing dash "-").0 SDK Virtual Machine''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-.
=== Supported kernels ===There is an additional variable, INSTALL_MOD_PATH, which defines where the /lib directory will be created, and all the modules stored. While you don't have to transfer the kernel sources to your target device, if you build any modules, you'll want this directory.
First of all setup As example, once you've downloaded the build environment sourcing this script <pre>$ source /usr/local/poky/eabi-glibc/arm/environment-setup</pre> or <pre>$ kernel 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]])should follow these steps:
make ARCH=arm CROSS_COMPILE== Kernel image for IGEP v2 [cross compiler] [defconfig] make ARCH=arm CROSS_COMPILE==[cross compiler] zImage modulesNewest kernels can require build the dtbs too as:
==== Linux OMAP v2.6.33 series (stable) make ARCH=arm CROSS_COMPILE===[cross compiler] zImage modules dtbs
Latest stable kernel version is: '''2.6.33.4-0 (20100517)''' The result will be a zImage file in <code>${KERNEL_SOURCES}/arch/arm/boot</code>
And dabs will be in <code>${| border="1"|-! '''Sources''' ! '''uImage binary''' ! '''Modules binaries'''|-| [http://downloads.igep.es/sources/linux-omap-2.6.33.4-0.tar.gz 2.6.33.4-0] ([http://downloads.igep.esKERNEL_SOURCES}/sourcesarch/linux-omap-2.6.33.4-0.tar.gz.md5 md5sum]) | [http:arm/boot/downloads.igep.esdts</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.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)]|}code>
Download the IGEP v2 Linux kernel sources and follow next steps: <pre>$ 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- igep0020_defconfig$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules</pre> The result will be an uImage file in arch/arm/boot directory. You At last 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]</pre>using this command
==== Linux OMAP v2.6.28 series (stable) make ARCH=arm CROSS_COMPILE=[cross compiler] modules_install INSTALL_MOD_PATH==[path to your target rootfs]Example:
Latest stable kernel version is: '''2.6.28.10 make ARCH=arm CROSS_COMPILE=arm-3 (20100318)''' linux-gnueabihf- omap2plus_defconfig<br>make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs<br>make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/media/user/rootfs
{| border="1" class="simple"Linux kernels==|-===IGEP Boards based on Texas Instruments  Processors===! '''Sources''' ! '''uImage binary''' ! '''Modules binaries'''|-| * [[http://downloads.igep.es/sources/linux-omap-Linux Kernel 2.6.2837.10-3.tar.gz 2.6.28.10-3y]]  ([http://downloadsOMAP35xx and DM3730) processor board based.igep.es/sources/linux-omap-2.6.28.10-3.tar.gz.md5 md5sum]) | * [[http://downloadsLinux Kernel 4.igep9.es/binaries/kernel/v2.6.28.10-3/uImage-2.6.28.10-3.bin uImage-2.6.28.10-3.biny]] ([http://downloads.igep.es/binaries/kernel/v2.6.28.10-3/uImage-2.6.28.10-3.binOMAP35xx, DM3730, AM335x) processor board based.md5 md5sum]) | * [[http://downloads.igep.es/binaries/kernel/v2.6.28.10-Linux Kernel 3/linux-omap-modules-2.68.28.10-3.tar.gz modules-2.6.28.10-3y]]  ([http://downloadsOMAP5432) processor board based.igep.es/binaries/kernel/v2.6.28.10-3/linux-omap-modules-2.6.28.10-3.tar.gz.md5 md5sum)]|}
Download the ===IGEP v2 Linux kernel sources and follow next steps: <pre>$ wget http://downloads.igep.es/sources/linuxBoards based on NXP-omap-2.6.28.tar.gzFreescale Processors===$ tar xzf linux-omap-2* [[Linux Kernel 3.614.28.tary]] (iMX6) processor board based.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</pre> 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]</pre> ==== Linux Android 2Kernel 4.9.6 y]] (developmentiMX6) ====processor board based.
Clone the GIT repository from git.myigep.com. Based on rowboat project tree.
<pre>$ 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
</pre>
and build with
<pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- igep0020_android_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules
</pre>
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]
</pre>
==== 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 <pre>$ git clone git://git.igep.es/pub/scm/linux-omap-2.6.git$ cd linux-omap-2.6</pre> and build with <pre>$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- igep0020_defconfig$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules</pre> 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]</pre> === Reference: Kernel features === {| border="1" cellspacing="2" cellpadding="2" style="color: black; border-collapse: collapse;"|- style="background: none repeat scroll 0% 0% rgb(209, 209, 209); text-align: center;"! '''&nbsp;Kernel version&nbsp;''' ! '''&nbsp;Ethernet&nbsp;''' ! '''&nbsp;USB OTG&nbsp;''' ! '''&nbsp;USB host&nbsp;''' ! '''&nbsp;WIFI SDIO&nbsp;''' ! '''&nbsp;Bluetooth&nbsp;''' ! '''&nbsp;Audio IN&nbsp;''' ! '''&nbsp;Audio OUT&nbsp;''' ! '''&nbsp;DVI-D (Vesa)&nbsp;''' ! '''&nbsp;HDMI (720p)&nbsp;''' ! '''&nbsp;OneNAND&nbsp;''' ! '''&nbsp;Hw. Rev. B&nbsp;''' ! '''&nbsp;Hw. Rev. C&nbsp;'''|- style="text-align: center;"| style="text-align: left;" | &nbsp;2.6.33.4-0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;([http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=commit;h=e26b3cb4dad330ba57df7d62ada045875d0a3221 20100517]) | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS|- style="text-align: center;"| style="text-align: left;" | &nbsp;2.6.33.2-0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;([http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=commit;h=4fe0a5750b1658dc4fc177e25648d263807d3184 20100406]) | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% red;" | FAIL | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% yellow;" | NA|- style="text-align: center;"| style="text-align: left;" | &nbsp;2.6.28.10-3&nbsp;&nbsp;&nbsp;([http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=commit;h=452be20337eabca99d0e012720b3b8ff05f7097e 20100318]) | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS|- style="text-align: center;"| style="text-align: left;" | &nbsp;2.6.28.10-2&nbsp;&nbsp;&nbsp;([http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=commit;h=2b15dcde40cf725b95141df88e9a7702316e48cf 20091222]) | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% yellow;" | NA|- style="text-align: center;"| style="text-align: left;" | &nbsp;2.6.28.10-1&nbsp;&nbsp;&nbsp;([http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=commit;h=ceb0923118949490108f2e637877cd23e0a46e65 20091109]) | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% yellow;" | FAIL | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% yellow;" | NA|- style="text-align: center;"| style="text-align: left;" | &nbsp;2.6.28.10-0&nbsp;&nbsp;&nbsp;([http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=commit;h=f12323fa4f65c024970174e79ba8da8f184dceaa 20090903]) | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% red;" | FAIL | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% red;" | FAIL | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% yellow;" | NA|} === Reference: QA, diagnosis &amp; 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:  #run 'nandtest -l 4194304 -k -p 5 /dev/mtd4'. Result should be like this: <pre>ECC corrections: 0ECC failures &nbsp;: 0Bad blocks &nbsp;: 0BBT blocks &nbsp;: 0003c0000: checking...Finished pass 1 successfully003c0000: checking...Finished pass 2 successfully003c0000: checking...Finished pass 3 successfully003c0000: checking...Finished pass 4 successfully003c0000: checking...Finished pass 5 successfully</pre> {| border="1" cellspacing="2" cellpadding="2" style="color: black; border-collapse: collapse;"|- style="background: none repeat scroll 0% 0% rgb(209, 209, 209); text-align: center;"! '''&nbsp;2.6.28.y&nbsp;''' ! '''&nbsp;2.6.33.y&nbsp;''' ! '''&nbsp;2.6.34.y&nbsp;'''|- style="text-align: center;"| style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS | style="background: none repeat scroll 0% 0% green;" | PASS|} ===== Flash filesystem performance ===== How to test: run  #flash_eraseall /dev/mtd4 #mkdir /mnt/qa #mount -t jffs2 /dev/mtdblock4 /mnt/qa #cd /mnt/qa #bonnie++ -u 0:0 -s 32 -m 16 -r 16 Result should be like this: <pre>Using uid:0, gid:0.Writing with putc()...doneWriting intelligently...doneRewriting...doneReading with getc()...doneReading intelligently...donestart '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&nbsp;%CP K/sec&nbsp;%CP K/sec&nbsp;%CP K/sec&nbsp;%CP K/sec&nbsp;%CP /sec&nbsp;%CP16 32M 268 8 282 0 311 0 3082 99 +++++ +++ 331.8 1 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec&nbsp;%CP /sec&nbsp;%CP /sec&nbsp;%CP /sec&nbsp;%CP /sec&nbsp;%CP /sec&nbsp;%CP 16 50 1 2296 24 48 1 48 1 2440 21 48 116,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</pre> {| border="1" align="left" cellspacing="2" cellpadding="2" width="867" style="color: black; border-collapse: collapse;"|- style="background: none repeat scroll 0% 0% rgb(209, 209, 209); text-align: center;"| colspan="2" | '''Kernel 2.6.33'''<br> | colspan="6" style="text-align: center;" | '''Sequential Output''' | colspan="4" | '''Sequential Input''' | colspan="2" rowspan="2" | '''Random'''<br> '''Seeks'''  | colspan="1" | <br> | colspan="6" | '''Sequential Create''' | colspan="6" | '''Random Create'''|- style="background: none repeat scroll 0% 0% rgb(209, 209, 209); text-align: center;"| Filesystem<br> | Size(MB) | colspan="2" | Per Char | colspan="2" | Block | colspan="2" | Rewrite | colspan="2" | Per Char | colspan="2" | Block | Files | colspan="2" | Create | colspan="2" | Stat | colspan="2" | Delete | colspan="2" | Create | colspan="2" | Stat | colspan="2" | Delete|- style="background: none repeat scroll 0% 0% rgb(209, 209, 209); text-align: center;"| colspan="2" | <br> | <font size="-2">K/sec</font> | <font size="-2">%CPU</font> | <font size="-2">K/sec</font> | <font size="-2">%CPU</font> | <font size="-2">K/sec</font> | <font size="-2">%CPU</font> | <font size="-2">K/sec</font> | <font size="-2">%CPU</font> | <font size="-2">K/sec</font> | <font size="-2">% CPU</font> | <font size="-2">/ sec</font> | <font size="-2">%CPU</font> | <br> | <font size="-2">/sec</font> | <font size="-2">%CPU</font> | <font size="-2">/ sec</font> | <font size="-2">%CPU</font> | <font size="-2">/sec</font> | <font size="-2">%CPU</font> | <font size="-2">/sec</font> | <font size="-2">%CPU</font> | <font size="-2">/ sec</font> | <font size="-2">%CPU</font> | <font size="-2">/sec</font> | <font size="-2">%CPU</font>|-| style="text-align: center;" | '''JFFS2''' | style="text-align: center;" | 32M | style="text-align: center;" | 268 | style="text-align: center;" | 8 | 282 | style="text-align: center;" | 0 | style="text-align: center;" | 311 | style="text-align: center;" | 0 | style="text-align: center;" | 3082 | style="text-align: center;" | 99 | style="text-align: center;" | +++++ | style="text-align: center;" | +++ | style="text-align: center;" | 331.8 | style="text-align: center;" | 1 | style="text-align: center;" | 16 | style="text-align: center;" | 50 | style="text-align: center;" | 1 | style="text-align: center;" | 2296 | style="text-align: center;" | 24 | style="text-align: center;" | 48 | style="text-align: center;" | 1 | 48 | style="text-align: center;" | 1 | style="text-align: center;" | 2440 | style="text-align: center;" | 21 | style="text-align: center;" | 48 | style="text-align: center;" | 1|} [[Category:Software|Linux Kernel]]