GitHunt

Os Chan

Os Chan is a staged x86_64 hobby kernel built on Limine.

The project validates progress with deterministic headless QEMU logs (oschan: ... tokens) and a smoke harness.

Output Model (Important)

  • Kernel milestone logs are written to QEMU debugcon (isa-debugcon at I/O port 0xE9).
  • The primary verification flow is headless (make qemu-headless and make test-smoke).
  • make run uses VNC output. A blank VNC window is expected because the kernel does not currently render framebuffer text.

Dependencies

  • GNU make (make on Linux, gmake on non-GNU systems)
  • C toolchain for x86_64 freestanding kernel build (gcc/binutils or clang/llvm/lld)
  • xorriso (ISO creation)
  • python3 (initramfs generation via scripts/mkinitramfs.py)
  • qemu-system-x86_64 (run targets)
  • timeout (smoke harness)
  • Optional:
    • gdb (for make qemu-gdb attach)
    • curl, tar, gunzip (UEFI firmware fetch via make edk2-ovmf)
    • sgdisk, mtools (HDD image targets)

Toolchain Selection

The kernel build supports TOOLCHAIN and TOOLCHAIN_PREFIX.

Examples:

make TOOLCHAIN=llvm
make TOOLCHAIN_PREFIX=x86_64-elf-

Common Targets

  • make or make all
    • Build bootable ISO at dist/os-chan.iso.
  • make iso
    • Alias for ISO build.
  • make qemu-headless
    • BIOS headless run with debugcon output to stdout.
  • make qemu-headless-uefi
    • UEFI headless run with OVMF (make edk2-ovmf done automatically by dependency).
  • make qemu-gdb
    • Headless run paused with gdbstub on :1234 (-S -gdb tcp::1234).
  • make test-smoke
    • Run headless smoke verification and assert required oschan: tokens.
  • make run
    • Interactive VNC run (-vnc :0). Useful for bootloader visibility; kernel logs are still debugcon-based.
  • make run-uefi
    • Interactive UEFI run.
  • make all-hdd, make run-hdd, make run-hdd-uefi
    • HDD image build/run variants.

Quick Start

make iso
make qemu-headless
make test-smoke

GDB Quick Attach

In terminal 1:

make qemu-gdb

In terminal 2:

gdb -q -ex "target remote :1234" -ex "info registers"

Notes

Languages

C76.6%Makefile10.7%Assembly4.3%Shell3.2%Python2.7%Linker Script2.4%

Contributors

BSD Zero Clause License
Created March 1, 2026
Updated March 1, 2026
miruchigawa/os-chan | GitHunt