Building the kernel on macOS natively

I’ve recently added a Linux compatibility layer to Starina operating system based on a lightweight VM approach similar to WSL2.

I can cross-compile its init program with Cargo. I can prepare a container image contents using skopeo. However, I need to build the genuine Linux kernel, preferably on my daily driver: macOS.

The most common way to build Linux kernel on macOS would be using Docker Desktop, and that works fine. I know nobody need to build on macOS natively, but it looked possible – there are 2 previous attempts before.

Tested with Linux version 6.12.34 and macOS version 15.5 (Sequoia). RISC-V is chosen here because Starina OS supports it, and it’s a good example of cross compilation.

TL;DR: It works.

Read More Here.


Discover more from Vancouver Linux Users Group

Subscribe to get the latest posts sent to your email.


Posted

in

by

Tags:

Discover more from Vancouver Linux Users Group

Subscribe now to keep reading and get access to the full archive.

Continue reading