From Gumstix User Wiki
11 April 2012
This wiki entry explains how to build the Gumstix Linux kernel from source.
Start by installing the toolchain.
You will also need the U-boot 'mkimage' utility. Debian and Ubuntu users can install it from their respective repositories. It's also compiled when U-boot is built if you can't get it otherwise. On top of that you will need 'git' and 'make'.
$ sudo apt-get install uboot-mkimage git make
Next we need to get the patched kernel source that's available at www.sakoman.com. You can browse Sakoman's git repository here.
Decide where you want your kernel source to go an move to that directory. Then use git to download it.
$ git clone git://www.sakoman.com/git/linux-omap-2.6 linux -b omap-3.2
The above command pulls down the omap-3.2 branch. The omap-2.6.38 branch has proved stable for those who want to use Xenomai. Once the above process is complete move into the new directory. The first thing to do is to create a .config file.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- omap2plus_defconfig (or maybe omap3_defconfig)
If you need to configure the kernel:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig
And now for the main kernel build.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage -j4
When the above completes, uImage can be found in arch/arm/boot/
Build the kernel modules.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules -j4
To install your kernel modules into your root file system:
$ make ARCH=arm modules_install INSTALL_MOD_PATH=/path-to-your-rootfs/