Success: Bring-up of LLVM/clang-built Linux ARM(32-bit) kernel for Android - Nexus 5
Hello,
I would like to share my successful bring-up of LLVM/clang-built Linux ARM(32-bit) hammerhead kernel for Android running on my Nexus 5 smartphone. After having successfully brought up LLVM/clang-built Linux kernel(since v4.15.7 to the most recent v4.17) on x86_64, I was interested in accomplishing the same on the ARM platform of my Nexus 5 - Android smartphone. So, here is the complete report of the same for the interested people.
The main advantage of the clang-built Android ARM(32-bit) hammerhead kernel for my Nexus 5 has been the better battery usage when compared to that of gcc-built kernel, with the same kernel config and hardware(my Nexus 5 Android Smartphone). Details of the same can be found below.
NOTE : By the way, I came across some reports of ARM64 clang-kernel for some Android Smartphones - but, the information over there did *not* help for my ARM32 clang-kernel case of Nexus 5(hammerhead). So, I started off this project from *scratch* and it has been lot of *entirely my own original work* to first successfully build the ARM32 clang-kernel for Nexus 5(hammerhead) and second to make it *actually work* on the real hardware - Nexus 5.
Cheers,
Raghavan Santhanam
NOTE: This is an update to my earlier successful independent research work in bringing-up LLVM/clang-built ARM(32-bit) Android Linux kernel for different Android(Marshmallow to Nougat to Oreo) on Nexus 5 Android Smartphone. For my earlier report of successful independent research on bringing-up LLVM/clang-built ARM(32-bit) kernel for Resurrection Remix, read the details of the same towards the end of this post.
As of now, a total of 10 Android custom ROMS including AOSP(latest factory image) have been successfully brought-up with their respective kernel sources built using LLVM/clang. This includes 9 more(AOSP + 8 other popular Android custom ROMs) along with the initial Resurrection Remix Android custom ROM. Below is the complete list of these 10 Android ROMs including AOSP.
NOTE: Above picture is used here just for *representational* purpose *only*. I have created it by combining all of the 10 Android ROMs boot-animation-logos into one for an uniformed representation of all the ROMs that have been successfully brought-up as part of my successful independent research of ARM(32-bit) LLVM/clang-built Android Linux kernel bring-up.
Nitrogen OS (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Dirty Unicorn (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
AOKP (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Unlegacy Android (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Paranoid Android (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
[Average Battery Usage]
[1] Android NDK r13b [LLVM/clang + binutils(as, ld, etc)] [2] Android NDK r17 [LLVM/clang + binutils(as, ld, etc)]
[3] Main LLVM/clang + Android NDK r13b binutils(as, ld, etc) [4] Main LLVM/clang + Android NDK r17 binutils(as, ld, etc)
[5] Snapdragon Qualcomm LLVM/clang + NDK r13b binutils(as, etc) [6] Snapdragon Qualcomm LLVM/clang + NDK r13b binutils(as, etc)
I would like to share my successful bring-up of LLVM/clang-built Linux ARM(32-bit) hammerhead kernel for Android running on my Nexus 5 smartphone. After having successfully brought up LLVM/clang-built Linux kernel(since v4.15.7 to the most recent v4.17) on x86_64, I was interested in accomplishing the same on the ARM platform of my Nexus 5 - Android smartphone. So, here is the complete report of the same for the interested people.
The main advantage of the clang-built Android ARM(32-bit) hammerhead kernel for my Nexus 5 has been the better battery usage when compared to that of gcc-built kernel, with the same kernel config and hardware(my Nexus 5 Android Smartphone). Details of the same can be found below.
NOTE : By the way, I came across some reports of ARM64 clang-kernel for some Android Smartphones - but, the information over there did *not* help for my ARM32 clang-kernel case of Nexus 5(hammerhead). So, I started off this project from *scratch* and it has been lot of *entirely my own original work* to first successfully build the ARM32 clang-kernel for Nexus 5(hammerhead) and second to make it *actually work* on the real hardware - Nexus 5.
Cheers,
Raghavan Santhanam
NOTE: This is an update to my earlier successful independent research work in bringing-up LLVM/clang-built ARM(32-bit) Android Linux kernel for different Android(Marshmallow to Nougat to Oreo) on Nexus 5 Android Smartphone. For my earlier report of successful independent research on bringing-up LLVM/clang-built ARM(32-bit) kernel for Resurrection Remix, read the details of the same towards the end of this post.
As of now, a total of 10 Android custom ROMS including AOSP(latest factory image) have been successfully brought-up with their respective kernel sources built using LLVM/clang. This includes 9 more(AOSP + 8 other popular Android custom ROMs) along with the initial Resurrection Remix Android custom ROM. Below is the complete list of these 10 Android ROMs including AOSP.
NOTE: Above picture is used here just for *representational* purpose *only*. I have created it by combining all of the 10 Android ROMs boot-animation-logos into one for an uniformed representation of all the ROMs that have been successfully brought-up as part of my successful independent research of ARM(32-bit) LLVM/clang-built Android Linux kernel bring-up.
- AOSP(Android Open Source Project)/Factory image : https://developers.google.com/android/images#hammerhead
- Resurrection Remix : Resurrection Remix OS | Get Resurrected
- LineageOS : https://lineageos.org/
- OmniROM : https://www.omnirom.org/
- AospExtended : https://www.aospextended.com
- Nitrogen OS : https://sourceforge.net/projects/nitrogen-project/
- Dirty Unicorn : https://dirtyunicorns.com/
- AOKP : AOKP.co
- Unlegacy Android : https://www.unlegacy-android.org/pro...wiki/Main_Page
- Paranoid Android : Paranoid Android – Official
Android ARM(32-bit) clang-kernel(kernel v3.4.113) bring-up for Android Oreo 8.1.0 on Nexus 5(hammerhead)
[Android Version Information] & [Battery Usage of a clang-built kernel ~ better than that of gcc-built kernel (shows one of the instances)]
AOSP(Android Open Source Project)/Factory image (v3.4.0 AOSP kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Resurrection Remix (v3.4.113 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
LineageOS (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
[Android Version Information] & [Battery Usage of a clang-built kernel ~ better than that of gcc-built kernel (shows one of the instances)]
AOSP(Android Open Source Project)/Factory image (v3.4.0 AOSP kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Resurrection Remix (v3.4.113 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
LineageOS (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
OmniROM (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
AospExtended (v3.4.113 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Nitrogen OS (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Dirty Unicorn (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
AOKP (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Unlegacy Android (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
Paranoid Android (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)
[Average Battery Usage]
[1] Android NDK r13b [LLVM/clang + binutils(as, ld, etc)] [2] Android NDK r17 [LLVM/clang + binutils(as, ld, etc)]
[3] Main LLVM/clang + Android NDK r13b binutils(as, ld, etc) [4] Main LLVM/clang + Android NDK r17 binutils(as, ld, etc)
[5] Snapdragon Qualcomm LLVM/clang + NDK r13b binutils(as, etc) [6] Snapdragon Qualcomm LLVM/clang + NDK r13b binutils(as, etc)
No comments: