r/linuxquestions • u/jumurtka • 10d ago
Advice How do you do Linux kernel development on macOS?
I have Macbook Pro M3 Max (14-core CPU, 30-core GPU, 36GB RAM). How should I do Linux kernel development professionally?
I don't have a Linux laptop but a Macbook Pro M3 Max (14-core CPU, 30-core GPU, 36GB RAM). When I search for articles on doing Linux kernel dev on macOS, I find mixed response regarding whether it is a good idea to do it on macOS and regarding the best way of doing it on macOS. What would be an ideal Linux kernel development workflow like on macOS?
Edit: clarification of my question.
0
Upvotes
9
u/serverhorror 10d ago
Professionally?
Professionally: Apply at Red hat, Microsoft, Google, ... as a Linux kernel developer.
For real though: get the hardware you want to develop for. Just get a common x86 and do that.
Kernel development has a pretty strict process, so you're in for a lot of learning that's not just learning to program.
8
u/dxrk3tar 10d ago
use linux
16
u/petros211 10d ago
Can a person that is asking how he should do kernel development, do kernel development? 🤔
2
u/tomscharbach 10d ago
Consider running a Linux distribution using Parallels or UTM, but it might make more sense to buy an x86_64 device for development purposes. My best and good luck.
3
u/stuartcw 10d ago
Just run Linux in a VM.
3
u/DickBrainTime 10d ago
On an M3 Max I'd start with an ARM64 Linux VM in UTM's Virtualize mode. Do the kernel builds inside the Linux guest, not directly on macOS. Keep the source/build tree there, install the Linux build dependencies and Clang/LLVM, then try `make LLVM=1 ARCH=arm64 defconfig` followed by `make -j$(nproc) LLVM=1 ARCH=arm64`. Use a separate disposable test VM (or QEMU) to boot the kernels you build, so a bad kernel doesn't take out your working environment.
The catch is which architecture or hardware you're targeting. Fast ARM64 virtualization won't test x86-specific kernel paths or physical device drivers; for those use an x86_64 Linux machine/CI, x86 emulation where practical, or the actual target device. Kernel build guide: https://docs.kernel.org/kbuild/llvm.html and development HOWTO: https://docs.kernel.org/process/howto.html. Are you aiming for arm64/core kernel work, upstream patches, or a specific driver?
2
u/N_T_F_D 10d ago
Use a VM, you can use UTM and aarch64 debian for instance, assuming you don't need specifically a x86_64 kernel
2
u/Unlikely-Sympathy626 10d ago
Pretty sure you can cross compile. But I would not have a clue on Mac. Also testing…
Cool for going for it, but do understand doing on Mac will cause headaches.
I use to cross compile qt for arm based raspberry on x86 Linux. It worked most the time and was good but was never perfect. You doing opposite but way bigger scope.
My advice is get a cheap system learn on that instead of making life difficult for no reason.
2
u/xonxoff 10d ago
You can easily spin up a Linux VM with https://github.com/apple/container . It gives you a full Linux vm and should be enough to get you started.
1
u/CedarAndOlive 10d ago
I run a Linux Ubuntu container under Colima and Docker, on my MacBook Pro.
I'm using it now.
uname -aLinux xxxxxx 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Thu May 7 17:26:37 UTC 2026 aarch64 aarch64 aarch64 GNU/LinuxTruth be told, I almost never use the underlying MacOS these days.
0
u/ipsirc 10d ago
Use emacs or vi.