Template:Container 3

  
 * Step 3

The kernel consists of the uImage and related binaries. This page describes how to build the kernel depending on the Android release used. For more information on the Kernel project visit this page.

Get source
For OMAP4430 releases L27.x (Blaze/OMAP4430) onwards, the kernel source is not part of the Android manifest. To continue with getting started on Android and build your own binaries, if you are building a release that is not L27.x or above, skip this step.

For L27.x(Blaze/OMAP4430), it is required to pull the source separately from the git tree.

The below is an example to use the commit for L27.4

Repo  : git://git.omapzoom.org/kernel/omap.git Branch : p-android-omap-2.6.32 Commit : android-2.6.32-2.1-omap4.4 Config : android_4430_defconfig

How to use the information above

If mydroid folder isn't already created, (it would have already been created if you followed "Android Environment - Source versions and Manifest" previously) mkdir -p /mydroid

Then, cd /mydroid export MYDROID=`pwd` git clone  cd $MYDROID/kernel/android-2.6.32 git checkout 

To build kernel, $ cd $MYDROID/kernel/android-2.6.32 $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- distclean $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- android_4430_defconfig $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage

To build the kernel modules: $ cd $MYDROID/kernel/android-2.6.32 $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules

L25.10 and higher
$ cd $MYDROID/omap $ make CROSS_COMPILE= /arm-none-linux-gnueabi- distclean $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zoom2_defconfig $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage
 * For releases L25.10 and higher

''Note: Configuration option varies by platform. Above is an example for building zoom2. Change "zoom2_defconfig" to "zoom3_defconfig" to enable a build for zoom3 (OMAP3630).''

To build the kernel modules: $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules

The output module for USB gadget is at: $MYDROID/omap/drivers/usb/gadget/

Prior to L25.10
$ cd $MYDROID/kernel $ make CROSS_COMPILE= /arm-none-linux-gnueabi- distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap_zoom2_android_defconfig $ make CROSS_COMPILE=arm-none-linux-gnueabi- uImage
 * For releases prior to L25.10

''Note: Configuration option varies by platform. Above is an example for building zoom2. Change "omap3430zoom2_config" to "omap_ldp_android_defconfig" to enable a build for zoom1 (LDP).''

For USB modules: $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules

The output modules are at: $MYDROID/kernel/drivers/usb/gadget/

Where to find uImage
$MYDROID/kernel-omap/arch/arm/boot
 * "uImage" is available at:
 * For PandaBoard

$MYDROID/omap/arch/arm/boot/
 * For releases L25.INC2.5 and higher

$MYDROID/kernel/android-2.6.29/arch/arm/boot/
 * For releases L25.10 and higher

$MYDROID/kernel/arch/arm/boot/
 * For releases prior to L25.10