Projects · 03/06

Projects

CreateOS: a from-scratch x86 kernel

A from-scratch x86 kernel experiment: a Multiboot assembly stub hands control to a freestanding C kernel that writes straight to VGA text memory, packaged into a GRUB ISO and booted in QEMU.

cd ..back to projects

Overview

boot.s declares the Multiboot header (magic, flags, checksum) and a _start symbol that calls kernel_main, then halts the CPU in a cli/hlt loop. kernel_main writes a greeting directly to the VGA buffer at 0xB8000, one character and one attribute byte at a time. A custom linker script places the sections, and the Makefile drives an i686-elf cross compiler with -ffreestanding and -nostdlib, builds the ISO with grub-mkrescue and boots it with QEMU in a single make run.

Highlights

  • No libc, no runtime: the whole kernel is a handful of lines you can read in one sitting.
  • Reproducible boot path: compile, link, ISO, QEMU, all from the Makefile.