Monday, February 25, 2013

How to Compile a Kernel for an Android



1. Open the Terminal on Ubuntu. The Terminal is similar to the Command Prompt in Windows.

2. Create a folder named 'kernel' and a subfolder named 'droid' and download the Android source files inside it by using these commands in the Terminal:mkdir -p ~/kernel/droid

cd ~/kernel/droid

git clone git://android.git.kernel.org/kernel/omap.git

git clone git://android.git.kernel.org/platform/system/wlan/ti.git

git clone git://android.git.kernel.org/platform/prebuilt.gitWait for the files to be downloaded from the repository.

3. Set GIT to use the latest version of the Android's Eclair source kernel by running these commands in the Terminal:cd ~/kernel/droid/omap

git checkout --track -b android-omap-2.6.29-eclair origin/android-omap-2.6.29-eclair

cd ~/kernel/droid/ti

git checkout --track -b eclair origin/eclair

cd ~/kernel/droid/prebuilt

git checkout --track -b eclair origin/eclair

4. Configure the kernel options. This step is optional and requires extensive knowledge of the kernel system.

5. Run this command in the Terminal if it is not in the omap folder already:cd ~/kernel/droid/omapCompile the Android kernel by running this command in the Terminal:make

No comments:

Post a Comment