Compiled my own CM kernel!
Awesome, I got it working. My own compiled Linux Kernel from CyanogenMod’s repository. It boots and wlan does also work. Great success!
The process of doing so is pretty straight forward. I followed a post, by a guy called bcrook at XDA-developers had made to help some other person, with slight modifications.
This guide requires you to run a Linux based system, since the compilers are made for this system. You might as well have some luck with Cygwin, but I wouldn’t count on it.
So here is what I did to get it working.
- First get the android source and build it. You will need JDK, curl and git and probably also some other tools to get this working.
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
mkdir <Android source dir> && cd <Android source dir>
repo init -u git://android.git.kernel.org/platform/manifest.git
When it is done build it.
make - Now we have the tools and compilers ready so we just need to add them to our PATH.
export PATH=$PATH:~/<Android source dir>/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin
- Grab the CyanogenMod kernel from his GIT repo. Make sure to get the correct branch or you will see a lot of errors while compiling!
git clone git://github.com/cyanogen/cm-kernel.git
git branch -r
git checkout --track -b cm-2.6.29-bfs origin/android-2.6.29-bfs - Now get a configuration for the kernel. You can pull an existing one from you phone, it is found in /proc/config.gz or you can use your own. This needs to be put in your cm-kernel dir, where you will se a lot of folders and such.
zcat config.gz > ~/cm-kernel/.config - Apply any patches to the kernel now.
- Build it! This is done easily it is here the PATH we exported earlier comes in handy.
cd ~/cm-kernel
make ARCH=arm CROSS_COMPILE=arm-eabi-
Wait for it to get done. The built kernel will be in arch/arm/boot/zImage - Now we just need to build the wlan.ko module, so we can get some WiFi on our phone.
cd <Android source dir>/system/wlan/ti/sta_dk_4_0_4_32
make KERNEL_DIR="<kernel source dir>" ARCH=arm
The kernel is now built!
Last thing to do is to pack it into a boot.img instructions can be found on android-dl’s Wiki.
