Prerequisites
Aeolos is an x86_64 hobby operating system that requires specific tools for building and testing. You’ll need a Linux environment (or WSL on Windows) with the following dependencies installed.Required Dependencies
What each dependency does
What each dependency does
- nasm: Netwide Assembler for x86 assembly code
- gcc: GNU Compiler Collection for C compilation
- mtools: Utilities for accessing DOS disks
- xorriso: Tool for creating ISO 9660 filesystem images
Optional Dependencies
For testing and debugging:Cloning the Repository
Clone Aeolos with its submodules:--recursive, initialize submodules manually:
Building Aeolos
Build Process Overview
The build system is organized into multiple stages:- Kernel compilation - Compiles all C and assembly sources
- Symbol generation - Extracts kernel symbols for debugging
- Initrd creation - Builds the initial ramdisk using SAF filesystem
- ISO generation - Creates a bootable ISO image with Limine bootloader
Building the Kernel
Build just the kernel:kernel/Makefile:21-36:
The
-Og flag enables optimizations that don’t interfere with debugging. The -fno-omit-frame-pointer flag ensures stack traces work correctly.Building the Complete ISO
Build the bootable ISO image:- Build third-party tools (SAF filesystem utilities)
- Compile the kernel with symbol table generation
- Create the compressed initrd (
initrd.saf.gz) - Generate
os.isousing thegenimgscript
os.iso file can be booted in QEMU or written to physical media.
Build Artifacts
After a successful build, you’ll find:kernel/kernel.elf- The kernel executable with debug symbolsimage/boot/initrd.saf.gz- Compressed initial ramdiskos.iso- Bootable ISO image
Running in QEMU
Test Aeolos in QEMU:Makefile:5-10:
QEMU flags explained
QEMU flags explained
-m 128: Allocate 128MB of RAM-no-reboot -no-shutdown: Halt on kernel panic instead of rebooting-smp 4: Emulate 4 CPU cores for SMP testing-cpu host: Use host CPU features (requires KVM)-M accel=kvm:tcg: Use KVM if available, fallback to TCG emulation
Bootloader Configuration
Aeolos uses the Limine bootloader with the Stivale2 protocol. The configuration is inimage/boot/limine.cfg:
- Boot protocol: Stivale2
- Default resolution: 800x600x32
- Kernel:
boot/kernel.elf - Initrd:
boot/initrd.saf.gz
Cleaning Build Artifacts
Remove all build artifacts:- All object files (
*.o) - Kernel executable
- Generated symbol files
- Initrd archive
- Third-party build artifacts
Troubleshooting
Build fails with 'nasm: command not found'
Build fails with 'nasm: command not found'
Install NASM:
QEMU fails with KVM error
QEMU fails with KVM error
If you see KVM-related errors, QEMU will automatically fall back to TCG (slower emulation). To use KVM:
- Ensure your CPU supports virtualization
- Enable it in BIOS/UEFI
- Load the KVM module:
sudo modprobe kvm-intelorsudo modprobe kvm-amd
Submodule errors during build
Submodule errors during build
Initialize submodules:
ISO generation fails
ISO generation fails
Ensure xorriso is installed:
Next Steps
Debugging
Learn how to debug Aeolos using QEMU and serial output
Contributing
Start contributing to the Aeolos project