Inside NØNOS: Streamlining OS Development with QEMU Emulation
Share this article
Developing a new operating system demands rapid iteration, but physical hardware testing creates bottlenecks. NØNOS—an experimental OS—sidesteps this challenge through sophisticated QEMU integration, enabling developers to boot and debug directly from their workstations. The project's documentation reveals a meticulously crafted workflow where a single make run command launches a graphical desktop environment within QEMU, accelerating development cycles.
Execution Modes for Targeted Workflows
NØNOS supports three execution modes tailored to different development needs:
- Graphical Mode:
make runlaunches a desktop environment with essential QEMU controls:
Ctrl+Alt+G - Release mouse Ctrl+Alt+F - Toggle fullscreen Ctrl+A X - Force quit
- Serial Mode:
make run-serialredirects all output to the terminal, crucial for diagnosing boot failures - Debug Mode:
make debugpauses execution and exposes GDB on port 1234 for kernel-level debugging:
break kernel_main continue stepi info registers
Platform-Agnostic Firmware Handling
The build system automatically resolves OVMF (Open Virtual Machine Firmware) paths across platforms—a critical detail for cross-OS development:
| Platform | OVMF Path |
|---|---|
| Debian/Ubuntu | /usr/share/OVMF/OVMF_CODE.fd |
| macOS (Intel) | /usr/local/share/qemu/edk2-x86_64-code.fd |
| Apple Silicon | /opt/homebrew/share/qemu/edk2-x86_64-code.fd |
Hardware acceleration activates transparently via Linux KVM or macOS Hypervisor.framework, though Apple Silicon users face Rosetta 2 emulation penalties for x86_64 targets.
Troubleshooting Real-World Hurdles
The documentation anticipates common pain points:
"When encountering GPU initialization failures or triple faults, serial mode and GDB become indispensable. Early boot crashes often manifest as black screens—serial output reveals whether drivers or memory mapping are culprits."
Advanced configurations allow RAM adjustments (-m 1G), network integration (-netdev user), and boot tracing (-trace events=...). For teams progressing beyond emulation, the next steps involve creating bootable USB media and physical hardware validation—critical milestones for any emerging OS.
Source: NØNOS Documentation