參考資訊:
https://github.com/JunASAKA/kernel_google_msm-4.9_KernelSU
https://stackoverflow.com/questions/62805049/error-compiling-latest-android-10-kernel-for-pixel-3xl-b1c1-defconfig-error
步驟如下:
$ sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev bc git gcc-aarch64-linux-gnu libfdt-dev clang $ cd $ wget https://github.com/steward-fu/website/releases/download/pixel-3a-xl/lineageos_linux-x86.tar.gz $ tar xvf lineageos_linux-x86.tar.gz $ wget https://github.com/steward-fu/website/releases/download/pixel-3a-xl/lineageos_kernel.tar.gz $ tar xvf lineageos_kernel.tar.gz $ cd kernel $ export PATH=~/linux-x86/bin/:$PATH $ ARCH=arm64 make CC=clang CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabihf- pixel3axl_defconfig $ ARCH=arm64 make CC=clang CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabihf- all -j4 $ wget https://github.com/steward-fu/website/releases/download/pixel-3a-xl/lineageos_flash.tar.gz $ tar xvf lineageos_flash.tar.gz $ cd flash $ cp ../kernel/arch/arm64/boot/Image.lz4-dtb . $ ./run.sh
P.S. 進入fastboot後,刷入boot_new.img即可