For some time, I have been experimenting with ways to try and build SlimKat with display-caf instead of display-legacy.
As I, and the other devs, have said this requires major updates to parts of the kernel including ion, video/framebuffer and kgsl.
Why build with display-caf?
With display-caf, we would be able to use Adreno libs built for kitkat. This would allow us to use chromium webview instead of classic webview so no more white boxes! It would also, hopefully, give us better application compatibility.
If we can bring our device up to kitkat level using display-caf & kitkat adreno libs, it may also make it easier to transition to lollipop if our devices can handle it.
So, now it's time to share what have I been working on...
1. Adreno Libs
Based on this
discussion on the Qualcomm forum - especially the comments from Oguzhan Yigit - I am targeting the adreno libs from the Galaxy S3 (d2lte).
2. Kernel Updates
There are a number of similar(ish) devices that have undergone updates from jellybean to kitkat including updating the kernel to the latest ion, framebuffer & kgsl to build with display-caf. For my experiments, I have been working with the msm7x27a
TeamHackLG kernel.
I looked back through the commit history of this kernel and tried to identify a point which most closely resembles the current state of our kernel. Then I started merging each commit one-by-one onto my chil360-kernel to end up with an experimental kernel with all of the required updates.
A better approach would be to start with a clean CAF base kernel e.g. kk-2.7-stable and add the Huawei code into it. I tried to do this but didn't get very far mainly because of the camera changes.
3. Device Tree updates
In order to build against display-caf with the experimental kernel a number of changes had to be made to the device tree. I have updated android_device_huawei_msm7x27a-common changing the BoardCommonConfig.mk & msm7x27a.mk to use display-caf and remove webview classic. The updated kernel also removes the need for device specific kernel headers so the include folder has been removed.
I have also modified the device tree to build against media-caf instead of media-legacy.
The audio hal in u8833 has also been modified to include linux/msm_ion.h instead of linux/ion.h. This will also be required for u8825 audio but I haven't updated this yet.
The result...
After a lot of work and experimenting I finally have a build that is basically working. There are still problems to sort out so this is NOT for everyday use - you have been warned!
What works:
* In general the ROM works.
* It boots successfully to the launcher.
* The display works quite smoothly.
* The camera works (although haven't tried recording video).
* Chromium works and is usable with no white boxes :D
What doesn't work:
* Video playback (memory allocation errors I think)
* ???
What's next...
At the moment I am stuck working on the video decoding problems. Hopefully after I release all of the code on github later, other devs will contribute to help fix these problems and any others that come up. Eventually I hope to merge these changes into my main SlimKat builds if we can get everything fully working.
Download
Changelog
Build 28/10/2014
- Use CAF camera HAL instead of prebuilt - fixes video recording
Build 25/10/2014
- Initial display-caf build