Difference between revisions of "CM-T3530: Linux: Kernel"
m (1 revision(s)) |
|||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
Linux kernel for CM-T3530 modules provides support for on-board peripherals and abstracts the functionality provided by the hardware. Current support coverage is specified at [http://www.compulab.co.il/t3530/html/t3530-os-support.htm O/S support coverage map] page. CompuLab provides ready-to-run binary kernel images, and source code of the modifications and additions made to the Linux kernel to work properly with CM-T3530 modules. | Linux kernel for CM-T3530 modules provides support for on-board peripherals and abstracts the functionality provided by the hardware. Current support coverage is specified at [http://www.compulab.co.il/t3530/html/t3530-os-support.htm O/S support coverage map] page. CompuLab provides ready-to-run binary kernel images, and source code of the modifications and additions made to the Linux kernel to work properly with CM-T3530 modules. | ||
− | Most of the CM-T3530 functionality is merged into the mainline kernel | + | Most of the CM-T3530 functionality is merged into the mainline kernel starting from 2.6.33 release. |
== Kernel command line == | == Kernel command line == | ||
Line 36: | Line 36: | ||
=== Getting kernel sources === | === Getting kernel sources === | ||
− | There are two ways to get Linux kernel sources that can be used as a baseline for CM-T3530 kernel. You can create a copy of linux-omap git tree or download a snapshot and extract it. We assume that you have created {{filename|/home/development/cm-t35/kernel}} directory for CM-T3530 kernel development | + | There are two ways to get Linux kernel sources that can be used as a baseline for CM-T3530 kernel. You can create a copy of linux-omap git tree or download a snapshot and extract it. We assume that you have created {{filename|/home/development/cm-t35/kernel}} directory for CM-T3530 kernel development. |
==== Snapshot download ==== | ==== Snapshot download ==== | ||
* Download [http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=snapshot;h=2a20002a83ce565ed16aaec5e64151cae165cb8f;sf=tgz v2.6.32-omap1] snapshot with your web browser. Note, that tools like {{cmd|wget}} and {{cmd|curl}} will not work here. | * Download [http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=snapshot;h=2a20002a83ce565ed16aaec5e64151cae165cb8f;sf=tgz v2.6.32-omap1] snapshot with your web browser. Note, that tools like {{cmd|wget}} and {{cmd|curl}} will not work here. | ||
Line 50: | Line 50: | ||
patch -p1 < /path/to/t3530-linux/kernel/linux-2.6.32-omap1-cm-t35.patch | patch -p1 < /path/to/t3530-linux/kernel/linux-2.6.32-omap1-cm-t35.patch | ||
</pre> | </pre> | ||
+ | |||
==== Git clone ==== | ==== Git clone ==== | ||
* Install [http://git-scm.com/ git] version control system. | * Install [http://git-scm.com/ git] version control system. | ||
− | * Create a clone of linux-omap | + | * Create a clone of linux-omap kernel tree |
<pre> | <pre> | ||
cd /home/development/cm-t35/kernel | cd /home/development/cm-t35/kernel | ||
Line 80: | Line 81: | ||
Now, if you boot CM-T3530 with newly created kernel image and with networked root filesysem at {{filename|/home/development/cm-t35/rootfs/}} the system will be able to properly load kernel modules and you avoid modules versioning problems. | Now, if you boot CM-T3530 with newly created kernel image and with networked root filesysem at {{filename|/home/development/cm-t35/rootfs/}} the system will be able to properly load kernel modules and you avoid modules versioning problems. | ||
+ | |||
+ | == Power management == | ||
+ | The Linux kernel for CM-T3530 supports very low power sleep mode and dynamic frequency scaling. Please refer to [[CM-T3530: Linux: Power management]] article for further details. | ||
== See also == | == See also == |
Revision as of 14:10, 16 August 2010
Contents
Overview
Linux kernel for CM-T3530 modules provides support for on-board peripherals and abstracts the functionality provided by the hardware. Current support coverage is specified at O/S support coverage map page. CompuLab provides ready-to-run binary kernel images, and source code of the modifications and additions made to the Linux kernel to work properly with CM-T3530 modules. Most of the CM-T3530 functionality is merged into the mainline kernel starting from 2.6.33 release.
Kernel command line
The Linux kernel for CM-T3530 is shipped with built-in command line parameters:
ubi.mtd=4,2048 root=ubi0:cm-t35-rootfs rootfstype=ubifs console=ttyS2,115200 \ omapfb.mode=dvi:1024x768-24@60 omapfb.vram=1:4M vram=8M omapdss.def_disp=lcd
The default kernel command line defines primary console, default display settings, root device and root filesystem type.
Setting U-Boot bootargs environment variable overrides default kernel command line and can be used to set desired kernel parameters.
Building kernel for CM-T3530
Cross-Compiler
There are several options for cross-compilation toolchain setup. You can either compile your cross-compiler or use an already built cross-compiler. The cross-compiler should support the ARM embedded-application binary interface ("EABI")
- Pre-built toolchain:
- Tools for creating cross-compilers:
- Crosstool-ng: Builds a cross-compiler from source. Non-distribution specific.
- Crossdev: Gentoo's cross-compiler builder. Needs Gentoo.
U-Boot mkimage tool
U-Boot mkimage utility is required in order to create kernel images that can be loaded by the CM-T3530 bootloader. You can download prebuilt mkimage binary or build it yourself:
mkdir ~/tmp cd tmp wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 tar -xjvf u-boot-latest.tar.bz2 cd u-boot-2009.08 touch include/config.{h,mk} make tools sudo install tools/mkimage /usr/local/bin
Getting kernel sources
There are two ways to get Linux kernel sources that can be used as a baseline for CM-T3530 kernel. You can create a copy of linux-omap git tree or download a snapshot and extract it. We assume that you have created /home/development/cm-t35/kernel directory for CM-T3530 kernel development.
Snapshot download
- Download v2.6.32-omap1 snapshot with your web browser. Note, that tools like wget and curl will not work here.
- Extract the downloaded archive linux-omap-2.6-2a20002a83ce565ed16aaec5e64151cae165cb8f.tar.gz
cd /home/development/cm-t35/kernel tar xzvf /path/to/downloaded/linux-omap-2.6-2a20002a83ce565ed16aaec5e64151cae165cb8f.tar.gz
- This will create /home/development/cm-t35/kernel/linux-omap-2.6 directory containing linux-omap kernel tree.
- Apply the CM-T3530 patch
cd /home/development/cm-t35/kernel/linux-omap-2.6 patch -p1 < /path/to/t3530-linux/kernel/linux-2.6.32-omap1-cm-t35.patch
Git clone
- Install git version control system.
- Create a clone of linux-omap kernel tree
cd /home/development/cm-t35/kernel git clone git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git linux-omap-2.6
- Create a branch for CM-T3530 development. The CM-T3530 patches are generated vs. commit 2a20002a83ce565ed16aaec5e64151cae165cb8f in the linux-omap tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
git checkout -b cm-t35-dev 2a20002a83ce565ed16aaec5e64151cae165cb8f
- Apply the CM-T3530 patch
cd /home/development/cm-t35/kernel/linux-omap-2.6 git apply /path/to/t3530-linux/kernel/linux-2.6.32-omap1-cm-t35.patch
Building the kernel
export ARCH=arm export CROSS_COMPILE=arm-none-linux-eabi- make cm_t35_defconfig make menuconfig make && make uImage && \ INSTALL_MOD_PATH=/home/development/cm-t35/rootfs make modules_install
In the example above, the Linux kernel image (uImage) will be created in /home/development/cm-t35/kernel/linux-omap-2.6/arch/arm/boot, and the loadable kernel modules will be installed into the /home/development/cm-t35/rootfs/lib/modules directory.
Now, if you boot CM-T3530 with newly created kernel image and with networked root filesysem at /home/development/cm-t35/rootfs/ the system will be able to properly load kernel modules and you avoid modules versioning problems.
Power management
The Linux kernel for CM-T3530 supports very low power sleep mode and dynamic frequency scaling. Please refer to CM-T3530: Linux: Power management article for further details.