CM11 kernel & initrd for Root/KernelChooser v3
Recenty, I installed
cm-11-20140720-UNOFFICIAL-tf201 with
TWRP-Recovery 2.7.0.0
and made it fresh to start linux from sdcard / image / internalDirectory.
I'm on jellybean bootloader (4.1.1)
(there is a newer one 4.2.1 which does not work with this method.)
0. nvFlash / wheelie
(Highly Recommended) Enable NVFlash
... to make your device more robust against bricking ->
Flatline.
I am not resposible if you brick your Tab. Be Careful. Restore your Data, Restore your running OS!!!!
1. Install CM11 via TWRP and gapps if you like.
I downloaded kernel sources from
namidairo to directory ./kernel and pulled the .config (CM11 kernel configuration)
from the TF201. Made oldconfig & menuconfig to configure with KEXEC and built the kernel.
Code:
$ cd kernel
$ unzip android_kernel_asus_tf201
$ adb pull /proc/config.gz # having TF201 on USB-line
$ gunzip config_CM11.gz
$ cp config_CM11 android_kernel_asus_tf201/.config && cd config_CM11 android_kernel_asus_tf201
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- oldconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig
#------------------------------------------------
Boot options --->
[*] Kexec system call (EXPERIMENTAL)
[*] Export atags in procfs
#------------------------------------------------
$ make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
$ cp arch/arm/boot/zImage ../cm11_kernel
Extract initrd from "cm-11-20140720-UNOFFICIAL-tf201" (unzip file, search boot.blob)
Code:
$ blobunpack boot.blob
$ abootimg -x boot.blob.LNX
$ cp initrd.img ../cm11_initrd
The above HowTo is for all who like to compile a kernel for androids other than CM11.
If you run CM11 here is a
cm11_Kernel_Initrd.tar.gz with cm11_kernel & cm11_initrd.
(md5sum cm11_Kernel_Initrd.tar.gz -> 868b01816c8c09be236aacf85e20616d)
2. Configure RootKernelChooser
This is the file and directory map, which you need on your Pad.
Code:
+- data
| +- boot
| | + cm11_kernel
| | + cm11_initrd
| | + root_chooser6.gz
| | + zImage
| +- .kernel.d
| | + cm11Android
| | + ubuntuLoopImg
| +- .kernel -> .kernel.d/cm11Android # here symbolic link to default boot
| + background.bmp # MUST be bmp, 1280 x 800, 24bit of depth
content of "/data/.kernel.d/cm11Android":
Code:
android
/dev/mmcblk0p8:/boot/cm11_kernel:/boot/cm11_initrd
content of "/data/.kernel.d/ubuntuLoopImg":
Code:
ubuntu from iso-image
/dev/mmcblk0p8:/boot/zImage:/boot/root_chooser6.gz
+newroot=/dev/mmcblk0p8:/media/[B]0[/B]/linux/ubuntu.img:/sbin/init
Remark: directories (/media/
0/linux/ubuntu.img) seems to be changed in KitKat / CM11.
Files under /data/boot are from above zip (cm11_kernel, cm11_initrd) and
lifeinarootshell (root_chooser6.gz, zImage)
3. Flash boot partition with RootChooser
Get kernel_chooser from (step 5)
lifeinarootshell - read this lifeinarootshell-TF201-HOWTO carefully to get to know how it is working.
flash the blob with nvflash, dd or fastboot. I recommend fastboot for safety reasons.
Start TF201 to fastboot: plug USB -> hold 10s [Vol down]+[Power] -> choose USB symbol [Vol UP]
Code:
$ wget https://www.dropbox.com/s/42dvjpt315iywup/lastest_fastboot.blob
$ fastboot -i 0x0b05 flash boot lastest_fastboot.blob
$ fastboot reboot
Now I can boot to CM11 or to LinuX. My /sdcard/linux/ubunutu.img is the Teagra3-AC100 with lubuntu 12.10.
It has very instable Wifi and no suspend (there is a solution in TF700 dev thread...)
Next time: testing SergeantWagners utopic-preinstalled-touch-armhf.tar.gz
Thanks to namidairo, lilStevie, tux_mind, your name.
Hopefully someone will help to configure a nice and stable LinuX.
. .