Development [Kernel] eva kernel for OnePlus 9/9 Pro/9RT & Realme GT Master Edition [Android 13]

Search This thread

m_vaisakh

Recognized Developer
Eva-Kernel-Logo.png


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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. And many more to come with subsequent updates!

eva kernel has 2 variants available for user choice:
  1. Clang Version: This variant is built using the bleeding LLVM toolchain (Neutron clang).
  2. 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!
 
Last edited:

m_vaisakh

Recognized Developer
Changelogs

21 April 2023

  • Latest upstream (5.4.241)
  • Latest Android Security bulletin merged (ASB-2023-04-05_11-5.4)
  • Samsung RMNET extension for better network throughput
  • Fixed double tap to wake on OnePlus 9
  • Fixed userspace irq balance crashes
  • Buffer allocation optimisations
  • Clang builds are now built with Polly Optimisations
18 May 2023
  • Latest upstream (5.4.243)
  • Latest Android Security bulletin merged (ASB-2023-05-05_11-5.4)
  • Latest QSSI14 CLO upstream (LA.UM.9.14.r1-21600-LAHAINA.QSSI14.0)
  • Latest exFAT driver updates
  • Improved fingerprint sensor drivers
  • Support for ROMs using OSS HWC
  • Upgraded GCC to 14.x
  • Kernel is now optimized for performance using -O3
  • Improve drains caused due to IPA (Mobile Network)
22 May 2023
  • Fixed usb issues
  • Fixed battery drain due to USB wakelock stuck
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 27
    Eva-Kernel-Logo.png


    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:

    1. 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.
    2. 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.
    3. 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.
    4. 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.
    5. 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.
    6. 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.
    7. 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.
    8. 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.
    9. 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.
    10. 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.
    11. 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.
    12. And many more to come with subsequent updates!

    eva kernel has 2 variants available for user choice:
    1. Clang Version: This variant is built using the bleeding LLVM toolchain (Neutron clang).
    2. 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!
    6
    Changelogs

    21 April 2023

    • Latest upstream (5.4.241)
    • Latest Android Security bulletin merged (ASB-2023-04-05_11-5.4)
    • Samsung RMNET extension for better network throughput
    • Fixed double tap to wake on OnePlus 9
    • Fixed userspace irq balance crashes
    • Buffer allocation optimisations
    • Clang builds are now built with Polly Optimisations
    18 May 2023
    • Latest upstream (5.4.243)
    • Latest Android Security bulletin merged (ASB-2023-05-05_11-5.4)
    • Latest QSSI14 CLO upstream (LA.UM.9.14.r1-21600-LAHAINA.QSSI14.0)
    • Latest exFAT driver updates
    • Improved fingerprint sensor drivers
    • Support for ROMs using OSS HWC
    • Upgraded GCC to 14.x
    • Kernel is now optimized for performance using -O3
    • Improve drains caused due to IPA (Mobile Network)
    22 May 2023
    • Fixed usb issues
    • Fixed battery drain due to USB wakelock stuck
    5
    New Update!

    Changelog

    • Latest upstream (5.4.243)
    • Latest Android Security bulletin merged (ASB-2023-05-05_11-5.4)
    • Latest QSSI14 CLO upstream (LA.UM.9.14.r1-21600-LAHAINA.QSSI14.0)
    • Latest exFAT driver updates
    • Improved fingerprint sensor drivers
    • Support for ROMs using OSS HWC
    • Upgraded GCC to 14.x
    • Kernel is now optimized for performance using -O3
    • Improve drains caused due to IPA (Mobile Network)
    Download from Post #1
    4
    Bess Karamel Vaai
    4
    If you can get your kernel working on stock OOS 13, you will make many people happy. All of us who prefer OOS have faced the reality that there will never be a custom kernel for stock OOS past Android 11.
    I am working on it. It's a time consuming task, and I need sufficient testers to get it to work.