Compile from Kernel and Boot Loader from Source Code

All software for Gumstix COMs is freely available and open source. Gumstix also makes available the complete build system used to generate our release images and package repository.

 

Linux Kernel

The most up-to-date kernel source for the Overo in this tree:

$ git clone git://github.com/gumstix/linux.git

Currently, Over users are recommended to use the omap-3.2 branch.  Support for DuoVero COMs is under development in the omap-3.6 branch.

Build Kernel

This article explains how to build the Gumstix Linux kernel from source.

Ubuntu:

The toolchain is already in the Ubuntu repository.

$ sudo apt-get install gcc-arm-linux-gnueabi

Debian:

Emdebian provide the toolchain in their Debian repository. Add the following line to your sources.list file.

deb http://www.emdebian.org/debian/ squeeze main

Don't forget to update before the install.

$ apt-get update
$ apt-get install gcc-4.4-arm-linux-gnueabi

g++ is available as well.

$ apt-get install gobjc++-4.4-arm-linux-gnueabi

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://github.com/gumstix/linux.git -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/ 

Please submit problem reports and patches via the Gumstix mailing list.

u-boot

The u-boot repository is available at:

$ git clone git://github.com/gumstix/u-boot.git

Decide where you want your u-boot source to go an move to that directory. Then use git to download it.

$ git clone git://github.com/gumstix/u-boot.git -b omap-v2012.10

The omap-v2012.10 branch is known to be the most stable at the time of writing. Once the above process is complete move into the new directory. Then configure the u-boot:

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- omap3_overo_config

Now we can build u-boot:

 

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- all

If it was successful, you will see MLO, u-boot.bin and u-boot.img in your u-boot directory.

For Overo, use the omap3_overo configuration. Problem reports and patches should be submitted via the u-boot mailing list:

Support for DuoVero is under development here git://www.sakoman.com/git/u-boot.git in the upstream branch.

x-load

X-load has been superseded by the SPL bootloader built out of the u-boot code base.

Yocto Project

Gumstix uses the Yocto Project build system. While it is certainly possible to use other methods to build the boot loaders, kernel, and root file systems, we've found Yocto Project to be an attractive solution.  Please see this page on the Yocto project for more information about the Gumstix meta layer.

 

Please submit problem reports and patches via the Gumstix mailing list.

Home Software Development How To and Other References Compile from Kernel and Boot Loader from Source Code