I have been trying to port TWRP for my device (a somewhat dated tablet, the Toshiba AT100 Thrive) but am running into problems with the kernel. It seems that no matter what I try, I am unable to get a kernel that actually boots.
I have the full OmniROM 4.4 source (with the end intention of building OmniROM for the tablet) as well as the kernel source from Toshiba (it is their patched version of 184.108.40.206). I also have a known working recovery (built around CWM with a 2.6.39 kernel) and stock boot.img and ICS ROM for the tablet.
I have extracted the kernel config from the ICS ROM as well as the kernel command line parameters.
Additionally, I also have access to two other ports (CyanogenMod) with kernel sources for this tablet and have found the AOSP source for the 2.6.39 and 3.10 kernels.
I am using CentOS 6.7 64-bit as my build OS, as that is what I have running on my Linux machine. I have OpenJDK 1.6 installed as opposed to the Oracle version (this might affect building OmniROM, but certainly shouldn't affect the kernel build).
I can successfully compile the kernel from the Toshiba sources using the tablet's config, as well as the CM-based port kernel sources and the 3.10 kernel (2.6.39 has some bugs straight out of the Google repository, which I can only get around if I disable yaffs2 in that kernel config or replace the yaffs2 source for it with the equivalent from the Toshiba sources).
I have the Android emulator set up on my Windows machine with both a ICS and KitKat AVD. After being unable to get the Toshiba-based kernel to start on my tablet, I thought I'd try building a kernel from the sources to run in the emulator.
At this stage, not a single one of my kernels has successfully booted either the tablet or the emulator. I have tried using the kernel config from the ICS AVD to build both the Toshiba 2.6.39 and AOSP 3.10 sources. The compile completes with no errors and a zImage is produced. However, it fails to boot the emulator.
Out of desperation, I have tried downloading the toolchains for Gingerbread and ICS and using those to build the kernels instead of the toolchain provided with OmniROM 4.4. That hasn't made a difference, either.
On the tablet, I have tried extracting the known working recovery kernel from the CWM recovery and using it as a prebuilt kernel. TWRP fails to load and the tablet always reboots after a few seconds, regardless of whether I set the kernel commandline parameters or not.
I am puzzled by this. Clearly there is something wrong but I am at a loss as to how to debug it, especially as do not appear to be able to produce a working kernel either for the tablet or emulator, despite having the sources and the kernel configs.
If anyone has any suggestions, they would be much appreciated.