| git.druid.rocks | index | druid520 | kaboom | docs/ | index.btft.in |
docs/index.btft.in
[link rel="stylesheet" href="keyframes.css"][e]
[table class="topnav"]
[tr]
[td class="logotab"][see name="index"]kaboom[e][e]
[td][see name="kernel"]kernel[e][e]
[td][see name="fs"]fs[e][e]
[td][see name="syscalls"]syscalls[e][e]
[td][see name="userland"]userland[e][e]
[td][see name="build"]build[e][e]
[e]
[e]
[h1]kaboom[e]
[span class="banner"][blink]get kaboom now![e] [spin]*[e] {{SUMMARY}}[e]
interdimensional salutations, again. this is kaboom, a from-scratch x86_64 kernel and userspace, built the same way i build most things: alone, slowly, because i wanted to actually understand the whole stack instead of trusting forty years of somebody else's abstractions. its written in nsc, a language i wrote alongside it (see its own compiler, nscc) precisely so i didnt have to fight c's macros, floats, or libc's baggage while writing a kernel -- explicit-width integers, real word-addressed structs, no #define, no hidden control flow, nothing you cant point at. kaboom itself links against no libc and doesnt aim for posix compliance; it does things its own way whenever unix's way didnt make sense to me, which is more often than youd think.
whats actually real right now, not a roadmap: a real on-disk filesystem (kfs) with its own permission bits, a paging setup thats deliberately minimal but genuinely there, a real shell with shebang script support, and a small pile of real coreutils -- cat, ls, cp, mv, mkdir, touch, rm, rmdir, chmod, perms, ps, pwd, date, info, klogs, clear, echo, and ed, an actual line editor -- plus 4c, forthc's own language ported to run on top of all of it -- all running as real elf binaries off that filesystem. /proc and /int expose live kernel state as virtual files, same idea unix had, kept because its genuinely useful and not because posix demanded it.
is it done? no. is it stable? dont expect much -- this is one person's kernel, built for fun and to learn something real, and it shows in exactly the places youd guess it would. but it boots, it runs real programs, and everything documented on the five pages below is real and working today, not aspirational.
heads up: this docs site itself only just went up, so [img src="under-construction.gif"]under construction[e] still applies -- not to the five pages below, which are real, finished, and checked against the actual running kernel, but to the site wrapping them: hosting, layout, and retro visual polish that's still settling in, plus whatever pages get added later as kaboom itself grows.
five pages:
[see name="kernel"]kernel[e] - boot to running processes: boot.s's identity paging trick (now a real, genuinely bootable path onto real hardware too, not just qemu -- see dynamite on the build page), the gdt/idt setup, alloc.nsc's kernel heap, vmm.nsc's real per-process address spaces, exec.nsc's elf loading (shebang re-exec included, so a #!/bin/sh script just works), elf.nsc itself, and the drivers that make a machine feel like a machine -- keyboard, serial, vga text mode, the rtc clock, cpu identification.
[see name="fs"]fs[e] - kfs, the real on-disk filesystem: inode layout (now with double indirection, files up to a real 8mb-ish ceiling instead of the old 62k), permission bits that are r=1/w=2/x=4 added together as a single digit instead of unix's octal habit, kfs_resolve and kfs_resolve_parent walking paths, directories chained across blocks when one block isnt enough. plus virtfs, the /proc and /int trees that expose live kernel state as ordinary files.
[see name="syscalls"]syscalls[e] - the full syscall table, all 26 of them, ported straight out of idt.nsc's own numbered doc comment so the docs and the code cant quietly drift apart: exact signatures, what each one actually does, and what it hands back when it fails.
[see name="userland"]userland[e] - the shell (sh) and every coreutil that ships with it: cat, ls, cp, mv, mkdir, touch, rm, rmdir, chmod, perms, ps, pwd, date, info, klogs, clear, echo, ed, and 4c -- forthc, a separate self-hosted forth compiler, with its language (not its jit) ported to run as an ordinary kaboom program. no libc backing any of it -- these are elf binaries linked straight against kaboom's own syscall interface, nothing borrowed.
[see name="build"]build[e] - how the whole thing actually gets built: the c -> b -> bl -> bu -> bd pipeline (wipe, kernel, the real bios bootloader, userspace, the disk image), then either the fast qemu -kernel dev-loop or a genuine real-bios/mbr boot through dynamite, what nsc/nscc's own toolchain expects from you, and how to go from a clean checkout to a booting disk image without guessing at the order.
[img src="made-with-nsc.gif"]made with nsc[e] [img src="powered-by-kaboom.gif"]powered by kaboom[e]