Building Linux kernel on macOS natively
10 months ago
- #macOS
- #Linux
- #Kernel
- Building Linux kernel on macOS natively is possible with some adjustments.
- GNU Make version on macOS is too old; use Homebrew to install a newer version.
- Clang Built Linux allows using LLVM tools (clang, lld) instead of GCC and GNU binutils.
- Missing headers like 'elf.h' and 'byteswap.h' can be resolved using Homebrew packages and custom includes.
- Incompatible 'uuid_t' and 'sed' issues were fixed with patches and GNU sed.
- Successful build achieved for RISC-V and AArch64 architectures.
- macOS shows faster clean build times but slower incremental builds compared to Linux (Docker Desktop).
- Build issues primarily stem from scripts, not the kernel itself, making them easier to address.