[OnePlus 9 Pro] m_vaisakh:
View attachment 5881011

eva kernel is a custom kernel based on OnePlus 9/9 Pro and Oplus android-13 sources with some under the hood optimisations and improvements. This kernel aims to provide a flash-and-use experience and is not intended to be tuned or modified by the user. There are a few key features to this kernel that improves the overall experience which includes several compiler optimisations, minimal debug code and production level stability.

This custom kernel only supports Android 13 based custom roms that use the OxygenOS 13 firmware. OxygenOS/ColorOS/RealmeUI android versions 11/12/13 are unsupported as of now (maybe supported in future if I find testers).

Features of the kernel includes:

Bleeding Edge Toolchains: The Eva Kernel is built using two custom toolchains: eva GCC and Neutron Clang. Both the toolchains are bleeding edge with new compiler optimisations and features being merged into them.

MGLRU Backport: MGLRU is a memory management algorithm that's used to improve the performance of systems with limited memory. The Eva Kernel has MGLRU backported, allowing it to take advantage of this feature and improve performance on devices with less RAM. MGLRU allows the kernel to use memory more efficiently and avoid swapping to disk, resulting in better performance and faster response times.

Full GCC LTO and clang thin LTO: GCC LTO (Link-Time Optimization) and clang thin LTO are compiler optimizations that can improve code generation and reduce the size of the resulting binary. By building the kernel with both of these optimizations, the Eva Kernel achieves better performance and a smaller size. LTO works by analyzing the code at compile time and performing optimization at the link stage. This results in more efficient code generation and better performance.

Graphite Optimizations (GCC variant only): Graphite Optimizations is a set of optimizations that improve the performance of code by allowing the compiler to better understand the relationships between different parts of the code. The Eva Kernel includes this feature for those who are fans of it (GCC variant only). Graphite Optimizations work by analyzing the code and identifying patterns and relationships between different parts of the code. The compiler can then use this information to generate more efficient code.

Fully Upstreamed to Latest Linux Upstream Source: The kernel is fully upstreamed to the latest linux upstream source. This means that it's up to date with the latest security patches and features, and should be compatible with the latest version of Android. Upstreaming means that the kernel is based on the latest stable release of the Linux kernel and includes all the latest security patches and bug fixes.

Fully Up to Date with Android Security Bulletin: The kernel is fully up to date with the latest Android Security Bulletin, ensuring that your device is as secure as possible. The Android Security Bulletin is a monthly release that includes security updates for the Android operating system. The Eva Kernel is updated to include all the latest security patches and fixes.

Battery Optimisations: The kernel employs power efficient workqueues that enable the kernel to run specific workqueues in a power efficient manner in order to reduce power consumption and increase battery life. Power hungry drivers are those that consume a lot of power, such as the WiFi driver, and audio driver.

Tracing free: The Eva Kernel has removed the CONFIG_TRACING kernel configuration option, resulting in a slight performance improvement. CONFIG_TRACING is a kernel configuration option that enables kernel tracing, which can be useful for debugging purposes. However, it can also have a slight impact on performance.

Built on CI: The kernel is built on a Continuous Integration (CI) system, which ensures that it's built consistently and reliably. CI is a process that automatically builds, tests, and deploys code changes. By building the kernel on a CI system, the Eva Kernel is built in a controlled and automated environment, which reduces the risk of human error and ensures that each build is consistent and reliable. This also makes it easier to maintain and update the kernel over time.

GCC PGO (GCC Variant only): The Eva Kernel is built with GCC PGO (Profile Guided Optimization), which is a compiler optimization technique that uses profiling information to improve code generation. GCC PGO works by collecting profiling information about the kernel during a test run and then using that information to optimize the code during the next build. This can result in better performance and a smaller binary size.

No Modules: The support for modules has been dropped from the kernel to improve security. This can potentially avoid malicious modules being loaded into the kernel.

And many more to come with subsequent updates!

eva kernel has 2 variants available for user choice:

Clang Version: This variant is built using the bleeding LLVM toolchain (Neutron clang).

GCC Version: This variant is built using the baremetal GNU C Compiler (GCC) (or eva GCC).

What is the difference between these?

It is just a compiler difference. It boils down to the optimisations applied via the compiler to the C that would yield a real-life difference. I provide both the clang and gcc version to give users a choice. At the end of the day, it depends on your own usage, and the kernel shall provide you the best user experience out of the box with both clang and GCC.

How do I install this kernel?

Firstly, backup your boot, vendor_boot and dtbo partitions. The kernel only modifies these partitions and in case if the kernel fails to boot (which it won't), you can just restore the 3 partitions or flash full ota of your custom rom to get back to previous working state.

To flash the kernel:

You can use TWRP or any other custom recovery and flash it just as any other flashable zip.

This kernel also supports flashing using custom kernel managers like FKM etc.

Downloads

Grab the Kernel from my GitHub Releases!

Note: Only download the zip according to your device codename:

OnePlus 9/9 Pro: eva-lemonade-xxx

OnePlus 9RT: eva-martini-xxx

Realme GT Master: eva-lunaa-xxx

Beta Testing

If you are interested in testing my kernel, join my Telegram Channel (and discussion through the channel) which posts automated builds.

Source Code: GitHub

Like my work?

Buy me a beer!

Sponsor me on my GitHub!

Special Thanks to @Sherif Rahim @SugaCRX @rk134 for testing out the kernel!