In this post I'll post the detailed procedure of compile the kernel.
1.Get the kernel source and wifi driver:
If you want to compile the kernel based on my tweak,
you can use my repo (fork from hashcode's source):https://github.com/adam900710/kernel_omap
Or you can just start from scratch without my tweak:https://github.com/KFire-Android/kernel_omap
(only branch stock is tested)
If you are unfamiliar with git,you can learn it on the GitHub's help page:
Tiwlan drivers from neither omapzoom nor CM7 works due the lack of given functions.
ONLY the wifi driver from Amazon seems work. So you need to download the whole zip from Amazon:
The wifi driver locates in mydroid/hardware/ti/wlan/wl1283
2.Get the cross compile toolchain:
Yes,you can build from scratch according to CLFS(http://trac.cross-lfs.org/
),but a newbie like me is glad to use the pre-compiled toolchain like sourcery G++. Omappedia recommanded 2010q1-202(https://sourcery.mentor.com/sgpp/lit...al/release1293
), so I use it as the toolchain and it works well.
The self-extrated installation program will install the toolchian without any problem.
Also other toolchain is available like linaro , but according to the post by Ezekeel (http://rootzwiki.com/topic/10855-res...er-toolchains/
) , there seems no obvious difference. So the out-of-box sourcery G++ is a good choice.
3.Compile the kernel.
cd kernel_omap #cd into your kernel
make mrproper #clean the source tree( normally you can skip)
make otter_android_defconfig #get the default .config (also you can copy it manually)
make ARCH=arm menuconfig #if you want,you can tweak the config of the kernel.This needs headers of ncurse
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi -j4 #you should make sure that the toolchain is in you PATH
After some CPU time, the kernel is built, in arch/arm/boot/zImage. Also the modules is built in other places.
Since I built all TUN/CIFS and so on into kernel,so there is no need to install the modules.
4.Compile the wifi driver:
cd mydroid/hardware/ti/wlan/wl1283/platforms/os/linux/ #cd into the building folder
make ARCH=arm KERNEL_DIR=/home/adam/kernel_omap CROSS_COMPILE=arm-none-linux-gnueabi- TNETW=1273 -j4 #you need to change the path of KERNEL_DIR
CAUTION: DO NOT add DEBUG=n OR DELETE TNETW=1273....
I don't know why,but if you do so,the wifi driver won't work properly.
5. Package the kernel into boot.img with ramdisk.
Thanks to DooMLord , in his git repo , you can download the tools needed.
Only minor changes are needed for the path ,every thing elso works fine.
You can use the ramdisk extracted from any CM7 boot.img using the perl script.
Then just ./make_bootimg will do everythin for you.