A x86_64 kernel built from scratch, in NASM, with no framework and no tutorial-following on autopilot. The goal isn't to ship a usable OS, it's to actually understand what happens between power-on and a scheduler running processes: real mode, the transition to protected mode, then long mode, paging, interrupts, and everything else the CPU hides behind abstractions the rest of the time.
This is a learning and portfolio project. Expect rough edges, and expect the boot chain to be more polished than the parts further out.
Progress is tracked through GitHub milestones, from real mode up to userspace:
| Milestone | Focus |
|---|---|
| M1 - Boot to long mode | real mode → protected mode → long mode, minimal paging to enable it, text output working |
| M2 - Interrupts | IDT, exception handlers, PIC/APIC init |
| M3 - Paging | proper page tables, higher-half kernel jump, dynamic mapping |
| M4 - Timer | APIC timer or PIT, tick counter |
| M5 - Memory management | physical frame allocator, kernel heap |
| M6 - Scheduling | context switch, cooperative round-robin |
| M7 - Syscalls | syscall/sysret, first userspace binary |
git clone https://github.com/mitsuakki/baremetal-x86_64-kernel.git
cd baremetal-x86_64-kernel
make
qemu-system-x86_64 -kernel build/kernel.bin(adjust the exact make/qemu invocation to match your actual build setup)
Built with NASM and a lot of Intel/AMD manual reading. If you're going through the same rabbit hole, OSDev Wiki is where most of this started.
MIT