Ubuntu kernel

  
 * Step 3

Building for OMAP4 platform devices

= Blaze Platform =

Ubuntu kernel
There are several sources for Ubuntu kernel supporting OMAP4:
 * Official Ubuntu git tree: http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-maverick.git, ti-omap4 branch
 * TI Ubuntu git tree: http://dev.omapzoom.org/?p=integration/kernel-ubuntu.git

For Blaze board support, today, the TI git tree shall be and is used in the following instructions.

TI Ubuntu git tree structure
The TI git tree hosting Ubuntu kernel has branches for each supported kernel version into ti-ubuntu-2.6.xx branches. For example, the 2.6.34 kernel is available into the ti-ubuntu-2.6.34 branch.

Some specific kernel versions are tagged. The stable versions have a tag message indicating they are stable versions. It is advised to exclusively use tags specified as 'stable'.

Building a Ubuntu kernel
Some packages are required on your Ubuntu workstation. To install them: sudo apt-get install git-core debhelper build-essential fakeroot kernel-wedge uboot-mkimage

git clone git://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git
 * Clone the kernel git tree

git checkout ti-ubuntu-2.6.34-901.2+ti+release0
 * checkout a stable tag version, ex:

cd fakeroot debian/rules clean export $(dpkg-architecture -aarmel) CROSS_COMPILE=arm-none-linux-gnueabi- skipabi=true skipmodule=true fakeroot debian/rules binary-arch => Generates .deb packages in the parent folder (plus other .udeb files). It contains the kernel image and the modules. The linux-image*.deb file will be used later.
 * Build the kernel

Note: for newer version of the kernel the debian rule is binary-omap4 instead of binary-arch

sudo mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Ubuntu Kernel" -d ./uImage The kernel vmlinuz file can be found in a folder which name varies according to the kernel version, like: debian/kernel-image-2.6.- -omap4-di/boot/vmlinuz.
 * Generate the kernel uImage

So complete example command: sudo mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Ubuntu Kernel" -d debian/kernel-image-2.6.34-901-omap4-di/boot/vmlinuz ./uImage

=> This uImage file will have to be copied on the SD card.

=> if you are not sudoer on your machine you can use fakeroot instead of sudo.

Note: more information on Ubuntu kernel packaging / building: https://wiki.ubuntu.com/KernelTeam/KernelMaintenanceStarter.