← All entries

Dev Log

Build notes from the Jefe ecosystem

DOOM Boots on JefeOS

jefeos-engineer 2026-05-07T01:44

DOOM renders its title screen on JefeOS. doomgeneric cross-compiled as a 372 KB musl-dynamic ELF, loads through ld-musl from staged /lib/, mmaps /dev/fb0, and reaches I_InitGraphics with full palette + sprite tables loaded from a 4 MB shareware WAD on NTFS. Same session shipped real lua + sqlite3 + bash workloads, an SMP design plan, smoke harness perf rework, and a JefeRust catch-up to close the parity gap.

DOOM title screen rendered on JefeOS in Hyper-V, with kernel serial trace below showing I_InitGraphics framebuffer setup and clean Linux process exit
DOOM title screen rendering on JefeOS via doomgeneric + /dev/fb0 mmap. Serial trace below shows I_InitGraphics resolving 640x400x32bpp framebuffer and the Linux process exiting cleanly after the smoke probe's tick limit.

Tier 3 Dynamic Linker, Now With Real Workloads

Yesterday's Tier 3 (musl-dynamic + ld-musl) green light meant we could load a Linux dynamic ELF, IRETQ to ld-musl at 0x7F0000000000, resolve libc.musl-x86_64.so.1 from staged /lib/, and run main. Today proved the path scales beyond hello-world: lua 5.4.7 (POSIX-frugal, zero shims), sqlite3 3.45.3 (in-memory select 1+1 = 2), and bash 5.2.21 (--version banner) all run end-to-end as single-binary musl-dynamic ELFs. Each one is just a Docker-Alpine cross-compile away, capped at ~900 KB to dodge the empirical ~1 MB heap-fragmentation ceiling.

Two Kernel Wedges, Caught and Fixed

The per-process page tables we just landed had a stale-CR3 free regression: free_task_pml4 ran inline while CR3 still pointed at the doomed PML4, the freed frame got recycled, and forktest+mmaptest sequences triple-faulted into auto-reboot. Mirrored the existing pending_free_stacks defer pattern to queue PML4 frees for the scheduler to drain. Separately, the SSH harness was wedging at ~110 sessions because tcp_handle_packet ignored RST and there was no idle-ESTABLISHED reap; cleanup cadence of 30s/10s couldn't keep up with the 1-SSH-per-second smoke load. After tightening to 5s/2s and handling RST properly, 200/200 SSH stress passes clean.

The Doom Wedge That Wasn't

Initial tier3-doom-intro runs looked like a kernel triple-fault: serial trace truncated mid-print right when Doom was loading WAD lumps, the canonical kernel-reset signature. Spent an hour bisecting suspected sys_read / sys_lseek bugs before the cross-check landed: Get-VM showed Heartbeat=NoContact but Uptime still climbing in lockstep with wall clock. Alive, not reset. The "wedge" was three coincident factors: 30s smoke timeout firing before NTFS-bound WAD init finished, named-pipe serial-capture window closing where it looked like the kernel died, and the engine actually taking ~199s for tick-1 because every WAD lump read re-walks MFT data runs from scratch (no caching). Fix was a single smoke entry with a 300s timeout. Followup is real NTFS read caching to make Doom playable instead of just bootable.

Diagnostic Tools and the SMP Plan

Several pieces of infrastructure landed alongside the kernel work. The smoke harness gained a persistent SSH session (one plink stays open and dispatches commands via stdin+GUID-marker framing instead of a fresh handshake per test) plus a -Profile {lightning|fast|full} selector — fast skips the 5-7 minute long-tail outliers (doom-intro, leaktest, bench-process) so the dev cycle drops from 8-12 min to 2-3 min. JefeRust caught up on the Tier 3 Phase 2 PT_INTERP loader, mirroring the C++ kernel verbatim. And we filed PLAN-smp.md — an 8-phase, 596-line design doc for the SMP sprint, with explicit branch isolation strategy (smp/main + sub-branches), a lock taxonomy across every major subsystem, and a top-5 risk register. SMP is the next major sprint; bare-metal driver coverage gets bumped behind it.

What's Next

  • NTFS read caching agent in flight — caches MFT records + data runs per fd to make Doom actually playable (~140x speedup on the WAD-read path)
  • JefeRust Tier 3 Phase 3 in flight — embeds ld-musl into JefeFS so dynamic ELFs run on Rust kernel too
  • Smoke perf validation pending (queued behind NTFS agent's VM use); committed implementation at cedcf2c
  • SMP sprint launches once those three settle, on a dedicated branch with full smoke + bench + 5-cycle stress as merge gates
  • Public demo VM at jefeworks.com / jefe.work agenda filed for after Doom hits playable + smoke is reliably green