Prerequisites
This guide assumes you have:- Homebrew installed
- Xcode or Xcode Command Line Tools installed
The Command Line Tools alone are sufficient - you don’t need the full Xcode application.
Setup with Homebrew
Configure Xcode Command Line Tools
If you have the full Xcode application installed, set your command line tools to use Xcode’s tools:
Skip this step if you only have the Command Line Tools installed.
Install filesystem support
Choose one of the following options:
- Option 1: fuse + ext2
- Option 2: genext2fs
Install debugging tools (Apple Silicon only)
For kernel debugging on Apple Silicon Macs:
This provides a native build of GDB that can cross-debug x86-64 code.
Setup with Nix
If you have Nix installed, you can enter a devshell with all dependencies:Build and Run
Once all dependencies are installed:Refer to the main Build System Overview for detailed build instructions.
Platform Notes
Apple Silicon vs Intel
- Apple Silicon
- Intel
- Both native aarch64 and x86_64 builds are supported
- Rosetta 2 should be disabled to build native aarch64 version
- Use
x86_64-elf-gdbfor debugging x86-64 kernel
macfuse Installation
CMake Version Notes
Homebrew ships bleeding-edge CMake versions, which should work fine. However: If Homebrew doesn’t offer CMake 3.25.x+ on your platform:$PATH.
Xcode Compatibility
If you have the full Xcode installed, keep it updated to avoid CMake compatibility issues with GCC.
Troubleshooting
macfuse Not Working
If you get permission errors:- Check System Settings for enabled kernel extensions
- Ensure you’ve restarted after installation
- Try reinstalling:
CMake Build Issues
If you encounter CMake errors:Compiler Version Issues
Verify your compiler versions:QEMU Launch Failures
If QEMU fails to start:Architecture-Specific Builds
To build for a specific architecture:- x86_64
- aarch64
Next Steps
Advanced Options
Explore build customization and CMake options
Build System Overview
Learn more about the SuperBuild system
