-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Device: OnePlus 10 Pro (NE2211)
Android Version: Android 15 / OOS 15
Kernel Version: 5.10.x
Description:
Hello OnePlus Open Source Team,
I have been trying to compile the kernel source for the OnePlus 10 Pro (OOS15 branch) using GitHub Actions (Ubuntu-latest). After 200+ build attempts and thorough debugging, I have identified critical errors in the provided source code that prevent compilation with modern toolchains (Clang 17+).
Here are the specific issues found in the source:
1. Broken Symlinks & Corrupt Directories
The source code contains broken symlinks/paths that cause the build to fail immediately during the make process.
- Path:
drivers/base/kernelFwUpdate - Issue: This directory appears to be a broken symlink or corrupt file in the repo. We have to manually
rm -rfand recreate it as a dummy directory to proceed.
2. Clang Compatibility: Global Register Variable 'sp'
The code uses the stack pointer (sp) as a global register variable, which is no longer supported or is considered "unsuitable" in modern Clang versions used in standard build environments.
Error Log:
arch/arm64/include/asm/stack_pointer.h:8:51: error: register 'sp' unsuitable for global register variables on this target
register unsigned long current_stack_pointer asm ("sp");
3. KGDB Constraints Issue
The Kernel Debugger (KGDB) implementation has constraint values that are out of range for the compiler, causing immediate build termination.
Error Log:
../arch/arm64/include/asm/kgdb.h:21:25: error: value '1025' out of range for constraint 'I' asm ("brk %0" : : "I" (KGDB_COMPILED_DBG_BRK_IMM));
Steps to Reproduce:
-
Clone the OOS15 kernel source.
-
Setup build environment (Ubuntu-24.04 / Clang 17+).
-
Run make O=out gki_defconfig.
-
Run `make O=out
Request:
The current source seems optimized only for a very specific, older proprietary toolchain. Please update the source to be compatible with standard Clang versions or provide the specific toolchain used internally.
Currently, we are forced to manually disable CONFIG_KGDB and CONFIG_CC_WERROR to bypass these critical errors.
Thank you