OpenOS is an educational, open-source operating system built from scratch for the x86 architecture. It features a modular monolithic architecture, complete exception handling, memory management, and timer support - a production-ready foundation for learning OS development.
The goal is to build a small, understandable OS from zero, inspired by hobby OS projects like MyraOS, xv6, and OSDev examples β but implemented with our own code, fully documented, and open for community contribution.
To create a collaborative OS development environment where students, beginners, and low-level enthusiasts can learn:
All with clean, simple, modern C + Assembly code in a well-organized modular structure.
OpenOS follows a modular monolithic kernel architecture:
βββ arch/x86/ # Architecture-specific code (IDT, ISR, PIC, exceptions)
βββ kernel/ # Core kernel (initialization, panic handling)
βββ memory/ # Memory management (PMM, VMM, heap)
βββ drivers/ # Hardware drivers (console, keyboard, timer)
βββ fs/ # File systems (VFS - future)
βββ process/ # Process management (future)
βββ include/ # Common headers (types, multiboot)
Benefits:
See docs/architecture/ARCHITECTURE.md for detailed architecture documentation.
make run
You should see:
OpenOS - Advanced Educational Kernel
====================================
Running in 32-bit protected mode.
[1/5] Initializing IDT...
[2/5] Installing exception handlers...
[3/5] Initializing PIC...
[4/5] Initializing timer...
[5/5] Initializing keyboard...
*** System Ready ***
- Exception handling: Active
- Timer interrupts: 100 Hz
- Keyboard: Ready
Type commands and press Enter!
OpenOS> _
make iso
make run-vbox
This automatically creates a VM, builds an ISO, and launches OpenOS in VirtualBox!
To build and run OpenOS, youβll need:
Ubuntu/Debian:
sudo apt-get install gcc-multilib nasm make qemu-system-x86 grub-pc-bin xorriso mtools
Arch Linux:
sudo pacman -S gcc nasm make qemu-system-x86 grub xorriso mtools
macOS (with Homebrew):
brew install i686-elf-gcc nasm make qemu grub xorriso mtools
From the project root directory:
make
This will compile the kernel and produce Kernel2.0/openos.bin.
To build and run the kernel in QEMU with direct kernel boot:
make run
This launches QEMU with the kernel. You should see:
OpenOS - Educational Kernel Prototype
-------------------------------------
Running in 32-bit protected mode.
Initializing interrupts...
Keyboard initialized. Type something!
OpenOS> _
Type on your keyboard and press Enter to interact with the shell!
OpenOS Phase 0 includes complete implementations of:
For complete implementation details, see docs/roadmap/UPGRADE_PHASE0.md.
Want to see the exception handler in action? Add this to kernel.c:
void test_exception(void) {
volatile int x = 1 / 0; // Trigger divide-by-zero
}
Youβll get a detailed crash report with full register dump!
To create a bootable ISO and run in VirtualBox:
make run-vbox
This will:
openos.iso)Manual VirtualBox Setup:
If you prefer to set up VirtualBox manually:
make iso
openos.iso as CD-ROMTroubleshooting: If you encounter any issues with VirtualBox, see the VirtualBox Troubleshooting Guide.
To test the ISO image in QEMU:
make run-iso
To remove build artifacts:
make clean
OpenOS welcomes contributions at all levels! Whether youβre fixing a bug, adding a feature, improving documentation, or just learning, your contributions are valuable.
Please see CONTRIBUTING.md for detailed guidelines on:
git checkout -b feature/amazing-feature)git commit -m "Add amazing feature")git push origin feature/amazing-feature)The /docs directory contains comprehensive documentation organized by topic:
MIT License β free to use, modify, and contribute.