Hobby operating system written from scratch in C. Designed for older, low-end hardware.
  • C 91.8%
  • Logos 2.6%
  • Assembly 2.5%
  • Python 1%
  • Makefile 1%
  • Other 1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
kooper (IceDebian Thinkcentre) b2cc3c3cbe
All checks were successful
Build disc (ISO) and disk (IMG) artifacts / build (push) Successful in 1m2s
defer bad apple to 0.0.12
2026-11-02 05:00:42 +00:00
.forgejo/workflows THIS is how you do submodules 2026-11-02 04:54:08 +00:00
etc SystemK 0.0.11 2026-11-02 04:11:06 +00:00
extras SystemK 0.0.8 2026-09-03 00:21:06 +01:00
fonts A lot of stuff, all at once. 2026-08-30 00:43:40 +01:00
iso/boot/grub Initial commit 2026-08-29 21:09:37 +01:00
patches SystemK 0.0.11 2026-11-02 04:11:06 +00:00
res SystemK 0.0.9 2026-10-03 22:27:56 +01:00
scripts SystemK 0.0.11 2026-11-02 04:11:06 +00:00
src fix missing tinycc build files 2026-11-02 04:47:46 +00:00
tests SystemK 0.0.11 2026-11-02 04:11:06 +00:00
.gitignore SystemK 0.0.11 2026-11-02 04:11:06 +00:00
.gitmodules SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE SystemK 0.0.9 2026-10-03 22:27:56 +01:00
LICENSE.bizcat SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.impulse-tracker SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.libmodplug SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.libxmp SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.musl SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.openmpt SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.pciids SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.tetris SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.tinycc SystemK 0.0.11 2026-11-02 04:11:06 +00:00
LICENSE.zapfont SystemK 0.0.11 2026-11-02 04:11:06 +00:00
linker.ld Initial commit 2026-08-29 21:09:37 +01:00
Makefile fix missing tinycc build files 2026-11-02 04:47:46 +00:00
README.md SystemK 0.0.11 2026-11-02 04:11:06 +00:00
TODO defer bad apple to 0.0.12 2026-11-02 05:00:42 +00:00

SystemK

Just a heads up:

Everything in this repository outside of the actual source code is a work in progress. The README, roadmap, and other documentation will be revised. Eventually.

SystemK is a hobby Unix-like operating system implemented in C. It is not intended for daily use, just an excuse to learn OS development and write something lightweight that runs on older, lower-end hardware.

Compatibility

SystemK currently targets 32-bit x86 (Pentium-class or newer). It is tested primarily in QEMU and Bochs, and also works on real hardware.

Requirements

  • Pentium-class x86 CPU or newer
  • 16MB of RAM minimum (32MB recommended)
  • VESA framebuffer graphics card (640x480x8 minimum; defaults to 1024x768x32, with 1280x720 widescreen also available)
    • Custom framebuffer modes can be built with make FRAMEBUFFER_WIDTH=WIDTH FRAMEBUFFER_HEIGHT=HEIGHT FRAMEBUFFER_BPP=BPP
    • Support for changing the framebuffer mode at runtime is planned, but not yet implemented
  • Bootable CD-ROM, USB drive, or MBR disk (for real hardware)
  • Keyboard (PS/2 and USB mice also supported)

Tested hardware

  • QEMU 10.0.11 (default CPU/video, 32MB RAM) (no errors to report)
  • Bochs 3.0 (Pentium I, sample config in extras/) (uptime calculation is bugged)
  • Dell Latitude D520 (Core 2 Duo T7200, 4GB RAM, GMA 950) (no errors to report)

Roadmap

Stuff done:

  • Paging, heap allocation, preemptive multitasking, ELF execution, and loadable .ko driver modules
  • Multi-user accounts, groups, login (login, su, passwd), and POSIX file permissions (chmod, chown)
  • On-system C toolchain with TinyCC (tcc) and the musl C/POSIX standard library (/usr/include, /usr/lib)
  • FHS root filesystem layout with VFS, hard/symbolic links (ln), and full FAT32 read/write + LFN support
  • Live-disc (ISO) root filesystem in a ramdisk that grows and shrinks on demand
  • Storage drivers for IDE, AHCI SATA, and USB mass storage (MBR and GPT partitions)
  • Bash-inspired shell (/bin/shell) with history, Tab completion, autosuggestions, job control (Ctrl+C, Ctrl+Z, fg/bg), and $PATH
  • POSIX/BSD-style utilities (ls, cp, mv, cat, dd, stat, uname, whoami, md5sum, shasum, etc.) and the edit text editor
  • Framebuffer console (1024x768 and 1280x720) with boot splash, PS/2 & USB mouse cursor, drag selection, and clipboard copy/paste
    • Custom framebuffer modes (i.e. anything above 640x480) are also possible (see "Build instructions" below)
  • Audio subsystem supporting AC'97, Sound Blaster 16, and PC speaker, with sound configuration and jukebox playback (WAV, MIDI, MOD, XM, S3M, IT)
  • CPUID, ACPI, and PCI hardware detection with vendor/device lookup

Stuff planned:

  • Support for changing the framebuffer mode at runtime
  • Basic windowing system (K Windowing System)
  • Networking (targeting rtl8139 and e1000 initially), along with ping, ssh, ftp, scp, and a curl/wget-like downloader
  • ...and more?

Suggestions are welcome via issues.

Known issues

  • Uptime calculation is inaccurate in Bochs (works fine in QEMU and on real hardware).

Wontfix

  • UEFI support: Shelved for now since I want to focus on the OS in general first. For now you can try using Legacy/CSM mode if your firmware supports it.
  • i386 and i486 CPUs: SystemK uses GRUB, which requires a Pentium-class CPU or newer.
  • VGA build bugs: Legacy VGA text-mode builds are deprecated and will eventually be removed; use framebuffer builds instead.

Build instructions

Assumes a Debian-based Linux distribution. Building on Windows requires WSL2 or a Linux VM.

Install dependencies and clone the repository:

sudo apt update
sudo apt install build-essential nasm make qemu-system-x86 xorriso grub-pc-bin dosfstools mtools
git clone https://git.thesillysociety.net/kooper/systemk.git
cd systemk

Common make targets:

*-widescreen builds default to 1280x720.

For custom framebuffer modes, use make FRAMEBUFFER_WIDTH=WIDTH FRAMEBUFFER_HEIGHT=HEIGHT

  • make all - builds standard and widescreen ISO and FAT32 disk images
  • make iso / make widescreen - builds an ISO image
  • make disk / make disk-widescreen - builds a bootable MBR/FAT32 disk image (1024x768 or 1280x720)
  • make iso-vga / make disk-vga - builds deprecated legacy VGA fallback images
    • This option will be removed at a later date.
  • make host-tests / make test-disk - runs host unit tests or QEMU disk boot test
  • make clean - cleans the build directory

Customizable make variables:

  • BUILD_TYPE - staging (default), release, staging+debug, or release+debug (+debug enables debug tools/logging and skips the splash screen)
  • DISK_SIZE_MB / DISK_LABEL - FAT32 disk image size in MiB (default 64) and label (default SYSTEMK)
  • FRAMEBUFFER_WIDTH - width of the framebuffer in pixels (min 640, default 1024)
  • FRAMEBUFFER_HEIGHT - height of the framebuffer in pixels (min 480, default 768)
  • FRAMEBUFFER_BPP - bits per pixel (min 16, default 32)
  • MEMORY - QEMU RAM size for make run* targets (default 32M)
  • RAMDISK_MAX_PERCENT - largest share of RAM (1-90, default 50) the live-disc ramdisk may use (e.g. 8MB on a 16MB machine)
  • CPU - QEMU CPU model for make run* targets (e.g. CPU=pentium, CPU=pentium3)
  • AUDIO - QEMU audio device: ac97, sb16, pcspkr (default), hda, none
  • NET - QEMU network card: rtl8139, e1000, virtio, ne2k_pci, pcnet, none (default)

Built images are placed in build/ (e.g. build/systemk-staging.iso and build/systemk-staging.img).

Running in QEMU

make run                  # Boot ISO
make run-disk             # Boot FAT32 image as hard drive
make run-usb              # Boot FAT32 image as USB drive
make run-headless         # Headless serial run (also run-headless-disk / run-headless-usb)

Running on real hardware

Write the disk image or ISO to your target medium and boot via BIOS (or UEFI Legacy/CSM mode):

# USB flash drive, HDD, or SSD (replace /dev/sdX):
sudo dd if=build/systemk-staging.img of=/dev/sdX bs=4M status=progress && sync

# CD/DVD:
sudo xorriso -as cdrecord -v dev=/dev/srX -eject build/systemk-staging.iso

Contributing

  • Linux host environment required for the build toolchain.
  • Include steps to reproduce, expected behavior, and actual behavior in issues and PRs.
  • AI may be used to assist, not to blindly generate code or documentation. PRs suspected of being "vibecoded" will be closed without review.

Credits

AI Disclaimer

This project was partially assisted by AI, more specifically Google Gemini.

To be more explicit, AI was used in this repository to help with creating test code to verify that changes made to SystemK were not only functional, but did not cause any regressions.

To be clear:

  1. Any code assisted with AI in this repository has been reviewed manually by a human.
  2. This repository does not contain any AI "generated" code (that is to say, no code given by an LLM has been copied line-for-line).
  3. The rest of the SystemK repository, including the main codebase (kernel, userland, etc), do not and will not contain any AI generated or assisted code.

License

SystemK is licensed under the MIT License. Bundled software and assets in this repository are licensed as follows:

MIT License:

Other licenses:

  • TinyCC (src/tinycc): GNU LGPL v2.1 (LICENSE.tinycc)
  • Sam Tay's Tetris (src/demos/tetris): BSD-3-Clause (LICENSE.tetris)
  • PCI ID Repository (src/acpi/pci.ids): BSD-3-Clause (LICENSE.pciids; also offered upstream under GNU GPL v2.0+)
  • Zap Console Fonts (fonts/zap-ext-light16.psf): GNU GPL v3.0 (LICENSE.zapfont)
  • Bizcat (fonts/bizcat.psf): Creative Commons Attribution 4.0 (LICENSE.bizcat)

Additionally, the following software are not bundled but were used in the development of SystemK and are licensed as follows:

Sounds

The following sounds (in src/sound/samples/) are bundled with SystemK: