Cross Compile aarch64 linux kernel on Apple M1 chip

1. get linux kernel source wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.3.9.tar.xz 2. install dependency packages brew install openssl 3. compile and fix compile errors compile choose using llvm toolchain to build. # install llvm if you don't have it brew install llvm ref:Building Linux with Clang/LLVM make ARCH=arm64 LLVM=1 menuconfig GNU Make >= 3.82 is required install make, and use gmake to compile brew install make # generate .config gmake ARCH=arm64 LLVM=1 menuconfig # compile gmake ARCH=arm64 LLVM=1 -j`nproc --all` <elf....

July 8, 2023 · 1 min · 166 words · sarace