Building Linux OMAP Kernel

From OMAPpedia

Jump to: navigation, search

Note: In order to build the kernel, it is recommended that you use the omappedia Release Notes page corresponding to the platform you are using (Blaze, Blaze Tablet, Panda, or Zoom) and follow the instructions for that release: http://www.omappedia.com/wiki/Release_Notes In general, the instructions will be very similar with the following exceptions:

Step 1: Clone the git tree for the OMAP kernel with the below commands for Ice Cream Sandwich releases (kernel 3.0) or Gingerbread releases (kernel 2.6.35), respectively:

% git clone git://git.omapzoom.org/kernel/omap.git kernel/android-3.0
% cd kernel/android-3.0
% git clone git://git.omapzoom.org/kernel/omap.git kernel/android-2.6.35
% cd kernel/android-2.6.35

Step 2: Checkout the kernel with the commit ID corresponding to your release:

$ git checkout <<commit ID>>

For example:

$ git checkout de492e1e12b10e2d89b21ebe7228d22ea2210100

Step 3: Make sure that the u-boot tools directory is included in your path:

% export PATH=$PATH:/<path to bootloader>/u-boot/tools/mkimage

This is due to the fact that the uImage, which is generated when you build the kernel, is an image format used by the u-boot. uImage is created by a tool called mkimage, which must be in your path.

Check Bootloader_Project for more information about obtaining and building the u-boot source code.

Step 4: Determine the defconfig file that is needed for your platform. The defconfig files are located in /arch/arm/config.

Platform defconfig
Blaze or Blaze Tablet 4430/4460 - with ICS releasesblaze_defconfig
Blaze or Blaze Tablet 4470 - with ICS releasesblaze_4470_defconfig
Blaze or Blaze Tablet 4430/4460 - with Gingerbread releasesandroid_4430_defconfig
Zoom36xomap_zoom3_defconfig
Zoom2omap_zoom2_defconfig

Step 5: Build the kernel with the commands:

$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm <defconfig>
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage

For example, to build for the 4460 Blaze with an ICS release:

$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm blaze_defconfig
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage

Step 6: If needed, build and install the kernel modules:

$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
$ sudo make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm INSTALL_MOD_PATH=<path to rootfs> modules_install
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox