Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12294

Building toolchains for compiling Android kernel on aarch64 host

$
0
0

I am using a free ARM (aarch64) compute instance from Oracle Cloud as a development machine. I would like to compile an Kernel for my Android phone (arm64), but I'm having trouble with selecting the appropriate toolchain.

Google provides Android-specific toolchains, aarch64-linux-android- and arm-linux-androideabi-, but these are primarily distributed for x86_64 hosts.

After a couple of hours of searching the internet, I found mentions that I could use the host (or native) compiler for my system, which happens to be aarch64-linux-gnu- and arm-linux-gnueabi-. However, these toolchains target a generic Linux environment, and I'm not sure if they would be suitable for compiling a kernel for an Android device. I'm particularly concerned about potential optimization issues or compatibility problems that might arise from using these toolchains.

Questions:
  1. Is it appropriate to use the generic Linux toolchains (*-linux-gnu-) for compiling an Android kernel?
  2. What's the recommended approach to build the Android-specific toolchains (*-linux-android-) on an aarch64 host?

I am having difficulty finding answers on my own and would appreciate detailed explanations.

Environment:
  • Host: aarch64 (ARM64)
  • OS: Ubuntu 22.04.4 LTS
  • Target: Android phone (arm64)

Viewing all articles
Browse latest Browse all 12294

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>