Prerequisites

  • A computer running Linux. If you're running windows, I highly recommend that you download the latest version of Ubuntu and run it using VirtualBox. This tutorial assumes you're running Ubuntu 9.10 x86.

Preparing the enviornment

Getting the necessary packages

Get the packages needed to build the kernel:

sudo apt-get install linux-headers-$(uname -r) gcc make kernel-package libncurses5-dev \
fakeroot wget bzip2 git-svn curl git-core gedit build-essential debhelper \
libqt3-mt-dev libxtst-dev libqt3-headers qt4-qmake qt4-qtconfig libqt4-gui libqt4-core git

Getting a cross compiler

You'll need to compile this kernel for an ARM target, which is the type of processor the Omnia uses. Since the processor your PC runs is an x86, you'll have to get a cross compiler. This cross compiler, called Sourcery G++, will do the trick. Download the IA32 GNU/Linux TAR (IA32 and x86 are the same thing) and place the folder called arm-2009q3 into your home folder. Now you need to tell your operating system that there's a cross compiler in this folder by editing a file in your home folder called .bashrc. Run this in the terminal:

gedit ~/.bashrc

Scroll to the bottom and add this line:

export PATH=${PATH}:~/arm-2009q3/bin

Save and close the file. Logoff or reboot to apply it. To apply the change without restarting in your current terminal window, just run that command.

Getting the latest kernel source

Connect to andromnia's git repository and fetch the latest kernel:

git clone git://andromnia.git.sourceforge.net/gitroot/andromnia/andromnia_32 ~/andromnia
cd ~/andromnia/kernel

Building the kernel

To build the kernel, run:

make zImage

Alternatively, if you have a dual-core processor, and you've configured your VirtualBox to use two processors if you're using it, you can speed it up by instead running:

make zImage -j2

Once done, your kernel will appear in the form of a zImage located at ~/andromnia/arch/arm/boot/zImage

–written by whiplash