Ornage Pi 5 Max, need help for kernel compiling

4haxorpass

New member
Jan 17, 2025
2
0
1
Dear AC members,
I've been reading posts on the forum for a long time and I can't find my solution!

I have problem I want to compile kernel for Android TV 12, the reason why i want to do that is to add some drivers to the existing img i have and nothing else!

The img i use is:
Android Version: 12 (Snow Cone)
API Level: 32
Kernel Architecture: aarch64
Kernel Version:
- 5.10.110 (Android (7284624, based on r416183b) clang version 12.0.5 (https://android.googlesource.com /toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)
- LLD 12.0.5 (/buildbot/src/android/llvm-toolchain/out/llvm-project/lld c935d99d7cf2016289302412d708641d52d2f7ee)

How do I do cross-compiling, i extracted /proc/config.gz to be precise .config

# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.10.110 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="Android (7284624, based on r416183b) clang version 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)"
CONFIG_GCC_VERSION=0
CONFIG_LD_VERSION=0
CONFIG_CC_IS_CLANG=y
CONFIG_LD_IS_LLD=y
CONFIG_CLANG_VERSION=120005
CONFIG_LLD_VERSION=120005
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
CONFIG_TOOLS_SUPPORT_RELR=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y

A few things to note: this image was made for the Orange Pi 5, but it also works on the Orange Pi 5 Max. My questions are as follows:
1. Should I use the kernel source for the Orange Pi 5, or can I use the kernel source from the Orange Pi 5 Max?
- If that's not the case, let me know which kernel I should use to successfully compile.
2. How do I set up the Clang compiler and LLD for successful compilation? I am currently using Ubuntu.

I just can't figure out how to do this. I tried some compilations, but I had errors. Now I would really appreciate it if someone could tell me how to do this.

Thank you all, I hope someone will be willing to free me from this misery. :)
 
Welcome to AC!
You probably should check the XDA website for help in this as they are more geared for this .
 
  • Like
Reactions: 4haxorpass

Members online

Forum statistics

Threads
955,191
Messages
6,964,080
Members
3,163,220
Latest member
stevinz