Skip to content

Repository files navigation

SamOs

A 64-bit multi-threaded kernel built from scratch, chapter by chapter, following Daniel McCarthy's "Developing A Multi-Threaded Kernel From Scratch" (Dragon Zap).

How this repo is organized

samos/
├── README.md              # this file
├── PROGRESS.md            # checkbox per book chapter, commit hash next to each
├── docs/
│   ├── chapters/Chxx.md   # one note per book chapter (intent, what was built)
│   └── gotchas/Gxx.md     # one note per discovered bug + its fix
├── src/                   # kernel sources
├── programs/              # user-space utilities (built once the book gets there)
└── tests/                 # end-to-end tests (bash; one script per feature)

Build & run

Toolchain is the GCC cross-compiler at $HOME/opt/cross/ (i686-elf-gcc early; x86_64-elf-gcc after we switch to 64-bit), plus nasm and qemu-system-x86_64.

./build.sh
qemu-system-x86_64 -hda bin/os.bin -m 512 -accel tcg -display none -serial stdio
./tests/run.sh

Status

See PROGRESS.md.

About

Engineered a multitasking kernel, implementing a bootloader, IDT, preemptive scheduler, 4-level paging, multi-arena heap, syscall layer, ELF64 loader, VFS with FAT16 driver, PCIe ECAM (ACPI MCFG), NVMe and PATA disk drivers, PS/2 keyboard and mouse drivers, event-driven window system and a static userlib + shell program.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages