Success: Bring-up of LLVM/clang-built Linux ARM(32-bit) kernel for Android - Nexus 5

ExperimentalGeek

New member
Aug 19, 2017
3
0
0
Visit site
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.

SbwjiAch.png


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.

  1. AOSP(Android Open Source Project)/Factory image : https://developers.google.com/android/images#hammerhead
  2. Resurrection Remix : Resurrection Remix OS | Get Resurrected
  3. LineageOS : https://lineageos.org/
  4. OmniROM : https://www.omnirom.org/
  5. AospExtended : https://www.aospextended.com
  6. Nitrogen OS : https://sourceforge.net/projects/nitrogen-project/
  7. Dirty Unicorn : https://dirtyunicorns.com/
  8. AOKP : AOKP.co
  9. Unlegacy Android : https://www.unlegacy-android.org/pro...wiki/Main_Page
  10. 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)]​

k0UNicG.png


AOSP(Android Open Source Project)/Factory image (v3.4.0 AOSP kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)​


hoz91xd.png


3oZS2gl.png


Resurrection Remix (v3.4.113 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)​


JxVxvGP.png


wTHeZ4G.png


LineageOS (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)​


NiE86rn.png


Tdt5a4c.png


OmniROM (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)​​

HVzKhjO.png


VHwgbwB.png


AospExtended (v3.4.113 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)​

co8vaS7.png


TMopk5c.png


Nitrogen OS (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)

Hdcp7uj.png


TT22PNt.png


Dirty Unicorn (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)

Vdjj0jD.png


tU6BXlr.png


AOKP (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)

ynHl24d.png


JzvUlbU.png


Unlegacy Android (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)​

CuWrDfd.png


uecNkkd.png


Paranoid Android (v3.4.0 kernel built with different LLVM/clang toolchains and NDK-binutils - 6 combinations)


Akr9C0W.png


8lTQHJc.png


[Average Battery Usage]

yWiXOVl.png


[1] Android NDK r13b [LLVM/clang + binutils(as, ld, etc)] [2] Android NDK r17 [LLVM/clang + binutils(as, ld, etc)]​

8whisoz.png


[3] Main LLVM/clang + Android NDK r13b binutils(as, ld, etc) [4] Main LLVM/clang + Android NDK r17 binutils(as, ld, etc)


CN6yhMn.png


[5] Snapdragon Qualcomm LLVM/clang + NDK r13b binutils(as, etc) [6] Snapdragon Qualcomm LLVM/clang + NDK r13b binutils(as, etc)

9FH84ty.png


 

Forum statistics

Threads
943,201
Messages
6,917,781
Members
3,158,874
Latest member
dxter