CM-T3730: Android: Kernel

From Compulab Mediawiki
Revision as of 09:15, 14 March 2013 by Grinberg (talk | contribs) (Building the kernel)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

Linux kernel supplied with the CM-T3730 Android Demo package 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-T3730 modules. The kernel binary is optimized for using with Android, however can be used with any Linux root filesystem as well.

Building kernel for CM-T3730

In this article we assume that the /home/development/cm-t3730/android directory is used for CM-T3730 kernel development.

Getting cross-compiler

The recommended pre-built toolchain repository is hosted on the Rowboat Gitorious website.

  • Clone the toolchain repository. By default it will be created in the directory named prebuilts-gcc-linux-x86-arm-arm-eabi-4_6/.
cd /home/development/cm-t3730/android
git clone -b rowboat-jb git://gitorious.org/rowboat/prebuilts-gcc-linux-x86-arm-arm-eabi-4_6.git

Getting kernel sources

The Rowboat Kernel sources repository is hosted on the Rowboat Gitorious website.

  • Clone the kernel sources repository. By default it will be created in the directory named kernel/.
cd /home/development/cm-t3730/android
git clone git://gitorious.org/rowboat/kernel.git
  • Create a branch for CM-T3730 development. The CM-T3730 patches are generated vs. rowboat-jb-am37x-4.1.2 tag (c83d5f31dd92832fd83db48c073d82546c23eeab commit) in the Rowboat kernel tree. It is recommended to use exactly the same baseline to avoid merge conflicts:
git checkout -b cm-t3730-dev rowboat-jb-am37x-4.1.2
  • Apply the CM-T3730 patch:
cd /home/development/cm-t3730/android/kernel
git apply /path/to/cm-t3730-android/kernel/linux-2.6.37-cm-t3730-1.patch

Building the kernel

  • Setup the toolchain
export PATH=/patch/to/cross/compiler/prebuilts-gcc-linux-x86-arm-arm-eabi-4_6:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
  • Build the kernel
cd /home/development/cm-t3730/android/kernel
make cm_t3730_android_defconfig
make menuconfig
make uImage

In the example above, the Linux kernel image (uImage) will be created in /home/development/cm-t3730/android/kernel/arch/arm/boot directory.

Admolition note.png There is no need to build and install any kernel modules into the Android Demo image for CM-T3730, as all the kernel driver modules are compiled in the kernel binary.

See also