Stock kernel from Xiaomi's OOS with merged linux-stable upstream v4.4.133.
- Assuming out is your output directory and whyred-perf_defconfig is your default defconfig
mkdir -p out
make O=out clean
make O=out mrproper
make O=out ARCH=arm64 whyred-perf_defconfig
make -j$(nproc --all) O=out ARCH=arm64 CC="<path_to_clang>/bin/clang" CLANG_TRIPLE="aarch64-linux-gnu-" CROSS_COMPILE="<path_to_toolchain>/bin/aarch64-linux-android-"
If you want to get rid of the long Google URL in the kernel version, then you need to add the following before compiling the kernel
export KBUILD_COMPILER_STRING=$(<path_to_clang_folder/bin/clang --version | head -n 1 | perl -pe 's/\(http.*?\)//gs' | sed -e 's/ */ /g' -e 's/[[:space:]]*$//')
-
Nathan's guide on how to compile with clang: Click here!
Telegram: @AxelBlaz3