View Full Version : Errors building kernel for Redmi 8

2021-09-04, 14:40
Hello guys
I've been trying to compile a kernel for Nethunter on a Redmi 8 phone, but I keep getting a bunch of errors. First, here are the steps I followed:
1- Installed LegionOS custom rom, android 11 LINK HERE
(https://forum.xda-developers.com/t/rom-11-0-unofficial-olives-legionos-3-12-for-redmi-8-8a-8a-dual-unified.4310699/)2- git cloned the kernel sources used by the LegionOS LINK HERE (https://github.com/olives-device/android_kernel_xiaomi_sdm439)
3- used nethunter menuconfig script (https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-devices/-/blob/master/example_scripts/menuconfig.sh) to edit the original olive-perf_defconfig file and after adding the necessary configurations using the official tutorial (https://www.kali.org/docs/nethunter/nethunter-kernel-2-config-1/) , I got a new defconfig file: nethunter_redmi8_defconfig
4- gcc-linaro folder is inside the kernel folder (renamed to legion), and proton-clang is outside the kernel folder
5- Here are the commands of the script I used to compile the kernel:

export ARCH=arm64
export SUBARCH=arm64
export CLANG_PATH=/root/Desktop/nethunter/proton-clang/bin
export CLANG_TRIPLE=aarch64-linux-gnu-
export CROSS_COMPILE=/root/Desktop/nethunter/legion/gcc-linaro/bin/aarch64-linu>
rm -rf out
echo clean
make clean && make mrproper
mkdir -p out
echo Set Defconfig
make CC=clang O=out nethunter_redmi8_defconfig
echo Build Kernel
make CC=clang O=out -j4

However, I keep getting these errors:

PASTEBIN LINK (https://pastebin.com/7tMjMZpT)

I hope one of you guys knows how to get around this, or has successfully compiled a working kernel for my device. Thanks