[Note: This is still very much a work in progreess with a long way to go]
ZenOS is a minimal educational operating system built from scratch for the x86_64 architecture. The goal of this project is to understand how an operating system works at the lowest level including but not limited to:
- booting
- memory management
- interrupts
- multitasking
- user/kernel separation.
This OS is built using C and x86 assembly, runs on bare metal, and is tested using QEMU.
- Emulator: QEMU (x86_64)
- Compiler: Cross-compiled GCC (x86_64-elf)
- Bootloader: GRUB (Multiboot2)
The following tools are required on the host system:
- GNU Make
- GCC and Binutils
- GRUB
- xorriso
- GDB
- QEMU
zen-os/
├── README.md
├── .gitignore
├── src/ # kernel C code
├── arch/x86_64/ # architecture-specific code (ASM, linker)
├── build/ # build artifacts
└── scripts/ # helper scripts
- gmp
- mpfr
- libmpc
- Cross-compiler toolchain
- Bare-metal kernel entry
- VGA text output
- Memory management
- Interrupt handling
- Scheduler
- User mode support
- File system
A freestanding x86_64-elf cross-compiler is used to ensure the kernel does not depend on the host operating system. Components:
- binutils (assembler and linker)
- GCC (C compiler without standard library) The GCC build is configured as freestanding:
- No libc
- No system calls
- No host OS dependencies
The cross-compiler toolchain is not stored in the repository. To build it locally run:
./scripts/build-toolchain.shThis will download, build, and install a freestanding x86_64-elf GCC toolchain under toolchain/install/.