Experimental Patch Gets The ARM64 Linux Kernel Compiling Under macOS

Written by Michael Larabel in Linux Kernel on 26 September 2022 at 05:40 AM EDT. 10 Comments
LINUX KERNEL
Nick Desaulniers with Google who has been known for his contributions around compiling the Linux kernel with LLVM/Clang has recently taken to the challenge of being able to compile the Linux kernel under macOS.

With some "duct tape and bailing wire", Nick has managed to achieve compiling the ARM64 Linux kernel under macOS 12.5.1 "Monterey" on his Apple M2 MacBook Air.

With his own built LLVM/Clang and fetching some dependencies via Homebrew, he was able to compile the Linux kernel under macOS. Not that you would be able to use the Linux kernel with macOS, but if just wanting to do development and build/smoke testing on an Apple M1/M2 -- at least until the Linux support is good enough itself for running on the M1/M2 hardware with accelerated graphics, working audio, and other features still being tackled by those bringing up Linux on Apple Silicon.


There is apparently interest in being able to compile the Linux kernel while running macOS on M1/M2 hardware.


Nick published a work-in-progress patch with the necessary changes needed to perform the successful build. The patch is still to be cleaned up and splitten up before its potential upstreaming in the future.

Nick annoucned the success overnight on the mailing list to gauge the interest level of other upstream developers and the Asahi Linux crew over the interest level in being able to compile the Linux kernel under macOS.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week