danos/tools
Daniel Samson ffa45edc8b
boot: the capsule — one-file system image first, manifest and walk as fallbacks
Real-firmware finding: the per-file /system tree walk boots in seconds
under OVMF but stalls for MINUTES on real firmware — the cost is not
bytes (USB 3 moves the ~4 MB instantly) but firmware filesystem
OPERATIONS: ~30 opens, each an uncached directory-chain walk in an
unoptimized firmware FAT driver. This is why every real OS loader
(winload, GRUB) reads many files through its own filesystem code over
Block I/O rather than the firmware's file protocol.

The loader now reads boot/system.img — the bundled binaries packed into
ONE v2 initial_ramdisk (tools/pack-system-image.py, derived from the
same bundled list in the same build graph, so tree and capsule cannot
drift) — with a single open + sequential read, the one firmware file
I/O shape that is fast everywhere. The manifest (open each listed path
by name) and the tree walk remain as fallbacks, so a hand-assembled
stick without the capsule still boots. The running system is identical
in all three cases: the kernel receives the same in-RAM table.

The load phase now brackets itself with unconditional on-screen
breadcrumbs ('EFI: loading the system...' / '...starting the kernel'),
because this phase stalling behind a silent black screen — kernel
status is serial-only by design — already cost a real-hardware
debugging session.

Direction (settled with the user): this capsule becomes the BOOTSTRAP
capsule — kernel + init + the storage-bring-up set — once a
spawn-from-memory syscall lets init and the device manager load
everything else from the stick's real file tree at runtime through
danos's own storage stack: file-granular updates (rebuild one binary,
copy one file), the initramfs shape.
2026-07-21 18:57:33 +01:00
..
make-fat-image.py boot: fix ramdisk paths lost to FAT name uppercasing; widen driver-name buffers 2026-07-21 15:13:19 +01:00
make-iso-image.py build: release-x86-64 — the flashable hybrid ISO (Etcher/dd + optical), built in-repo 2026-07-20 13:37:10 +01:00
make-xkeyboard-config.py Add xkeyboard-config: X11 keyboard layouts compiled to Zig 2026-07-11 15:57:09 +01:00
pack-system-image.py boot: the capsule — one-file system image first, manifest and walk as fallbacks 2026-07-21 18:57:33 +01:00
rewrap-comments.py add tools/rewrap-comments.py 2026-07-12 16:18:56 +01:00
sort-lines-group-by-start.sh Make sort-lines-group-by-start.sh a runnable script 2026-07-13 05:15:56 +01:00