CM-T54: Linux: Kernel
Contents
Overview
Linux kernel for CM-T54 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-T54 modules.
Building kernel for CM-T54
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 (recommended):
- Tools for creating cross-compilers:
- Crosstool-ng: Builds a cross-compiler from source. Non-distribution specific.
- Crossdev: Gentoo's cross-compiler builder. Needs Gentoo.
Getting kernel sources
We assume that you have created /home/development/cm-t54/kernel directory for CM-T54 kernel development.
Git clone
- Install git version control system.
- Create a clone of linux kernel tree
cd /home/development/cm-t54/kernel git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-cm-t54
- Create a branch for CM-T54 development. The CM-T54 patches are generated vs. v3.14.8 tag (0c5b3b80f7aeba9b8d25e12f7b321d148a1b1cb9 commit) in the Linux tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
cd /home/development/cm-t54/kernel/linux-cm-t54 git checkout -b cm-t54-dev v3.14.8
- Apply the CM-T54 patch
git apply /path/to/cm-t54-linux/kernel/linux-3.14.8-cm-t54-2.patch
Future stable kernel versions of 3.14 can also be used by checking out any later tag of v3.14.y stable kernel tree. |
Building the kernel
export ARCH=arm export CROSS_COMPILE=arm-none-linux-eabi- make cm_t54_defconfig make menuconfig make && make zImage && make omap5-sbc-t54.dtb \ INSTALL_MOD_PATH=/home/development/cm-t54/rootfs make modules_install
In the example above:
- The Linux kernel image zImage will be created in /home/development/cm-t54/kernel/linux-cm-t54/arch/arm/boot
- The Device Tree binary omap5-sbc-t54.dtb will be created in /home/development/cm-t54/kernel/linux-cm-t54/arch/arm/boot/dts
- The loadable kernel modules will be installed into the /home/development/cm-t54/rootfs/lib/modules directory.
When the CM-T54 is booted with the kernel image and Device Tree binary created as described above and with networked root filesystem at /home/development/cm-t54/rootfs/, the system will be able to load the kernel modules properly, thus avoiding module version problems.