MI
miruchigawa/os-chan
Os Chan is a staged x86_64 hobby kernel built on Limine.
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-debugconat I/O port0xE9). - The primary verification flow is headless (
make qemu-headlessandmake test-smoke). make runuses VNC output. A blank VNC window is expected because the kernel does not currently render framebuffer text.
Dependencies
- GNU make (
makeon Linux,gmakeon non-GNU systems) - C toolchain for x86_64 freestanding kernel build (
gcc/binutilsorclang/llvm/lld) xorriso(ISO creation)python3(initramfs generation viascripts/mkinitramfs.py)qemu-system-x86_64(run targets)timeout(smoke harness)- Optional:
gdb(formake qemu-gdbattach)curl,tar,gunzip(UEFI firmware fetch viamake 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
makeormake all- Build bootable ISO at
dist/os-chan.iso.
- Build bootable ISO at
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-ovmfdone automatically by dependency).
- UEFI headless run with OVMF (
make qemu-gdb- Headless run paused with gdbstub on
:1234(-S -gdb tcp::1234).
- Headless run paused with gdbstub on
make test-smoke- Run headless smoke verification and assert required
oschan:tokens.
- Run headless smoke verification and assert required
make run- Interactive VNC run (
-vnc :0). Useful for bootloader visibility; kernel logs are still debugcon-based.
- Interactive VNC run (
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-smokeGDB Quick Attach
In terminal 1:
make qemu-gdbIn terminal 2:
gdb -q -ex "target remote :1234" -ex "info registers"Notes
- Avoid running multiple ISO/QEMU make targets in parallel. They share temporary
iso_root/and can race. - Reference background reading: https://osdev.wiki/wiki/Limine_Bare_Bones
On this page
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