A minimal, embeddable operating system written from scratch in C.
Zythos is a from-scratch, x86 (32-bit protected mode) operating system built for minimalism and embeddability. It boots via a custom real-mode stage1/stage2 bootloader, runs a hand-written kernel, and is paired with its own toolchain — including a compiler, assembler, linker, C library, and coreutils — built specifically for the system rather than ported wholesale from Linux.
powerpc / powerpc64 support is planned as a future architecture target.
- Custom bootloader — 16-bit real-mode stage1 (FAT12/16/32 BPB, BIOS disk
read via CHS/LBA) and stage2, loading the kernel at
0x100000 - Kernel — memory management (custom
kmalloc/kfreeallocator), IDT andint 0x80syscall dispatch, ELF32 loader - BCC — a minimal, purpose-built C compiler/interpreter (inspired by
c4) - Own toolchain — an in-progress
binutilssuite: a freestanding assembler with a custom object format, and a linker based ontiny-link - zlibc — a custom C library with multi-arch raw syscall wrappers
- Userland — a non-Unix shell (
zsh), a minimalnolibc-based shell, and coreutils (includingls, built directly against FAT32 structures) - ttar — a "Tiny tar" implementation supporting create/extract of
ustar-format archives - sysfetch — a
neofetch-style system info tool - Lua -
standard luawithout some tools.
you probably need the zlibc library to run userland programs.
arch/ # architecture-specific code (boot.asm, etc.)
base/ # base subsystem tree
core/ # core subsystem
drivers/ # device drivers
fs/ # filesystem code (FAT32; ext2 under consideration)
include/ # shared headers (kernel + imported Linux-style headers)
init/ # kernel init sequence
input/ # input handling (keyboard, etc.)
kernel/ # kernel core (main.c, syscalls, IDT)
mm/ # memory management
net/ # networking
scripts/ # build/dev scripts
userland/ # userland programs
usr/ # usr tree
Zythos is developed in a Linux container (GitHub Codespaces). Build instructions and toolchain requirements are being finalized as the custom
binutilssuite matures.
make run
This produces a bootable disk image that can be run in an emulator such as QEMU:
qemu-system-i386 -drive format=raw,file=zythos.img
Zythos currently boots and runs a working userland shell with basic syscalls
(read/write/exit), memory allocation, and an ELF32 loader. Development is
active and many subsystems (filesystem choice, paging/VMM, process model) are
still evolving.
- moshego189 —
tiny-link, the basis for Zythos's linker - seancfoley — Java-side reference work
- tayoky —
tviheaders and Zemulate - ndevilla —
iniparser - wtarreau — libc reference. Huge thanks
- fsantanna — SDL
- Robert-van-Engelen — Lisp reference
- The Lua Team — Lua
- rswier —
c4 - Rui314 — other cc (
chibicc) - pardeep-singh — SQLite
- wkozek — zlib tools
- Ferki-git-crestor — ttar
keyboard.h,keycodes.h, andkeymap.horiginally from BoredOS by Lluciocc, used under GPL.- Bootloader design informed by the NanoByte OS tutorial series.
GPL-2.0
