From 3fd3454212dc1d4dc396e393812833ec2e15e41a Mon Sep 17 00:00:00 2001 From: user Date: Sat, 18 Jul 2026 00:46:26 +0200 Subject: kernel: dmesg-style boot spew before init spawns Print everything the kernel knows implicitly at boot, Linux-flavored, on the LCD console and mirrored over the link (gbhub logs each GB's boot): gbos sm83 microkernel console: CGB (boot a=$11) <- boot ROM's A/B, saved at entry cart: mbc5, 1M rom, 128K sram <- our own cart header ($0147-49) mem: 32K wram 16K vram 127B hram <- CGB constants proc: 8 slots, 31 programs <- link-time table sizes net: slip on link port, 4 sockets fs: gbfs v3 mounted, 120/128 blk free <- bitmap popcount; 'formatted' tty: 40x18 console, SELECT = osk on first boot init: spawning pid 1 New src/dmesg.asm with kernel print helpers (kputc/kputs/kputhex/kputdec) that bypass KPutc (no process context at boot). term_init now runs before net/fs init so the spew is visible as subsystems come up. --- src/kdata.asm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/kdata.asm') diff --git a/src/kdata.asm b/src/kdata.asm index 83ed162..65a059a 100644 --- a/src/kdata.asm +++ b/src/kdata.asm @@ -62,3 +62,6 @@ wSleepLastDiv::DS 1 ; sys_sleep: previous DIV reading wKillParent::DS 1 ; scratch for sys_kill wPsBuf:: DS 2 ; scratch for sys_ps wPnStart:: DS 2 ; scratch for sys_progname +wBootA:: DS 1 ; A at entry: console model from the boot ROM +wBootB:: DS 1 ; B at entry: bit0 set = AGB (GBA in CGB mode) +wBootFsFresh::DS 1 ; fs_init formatted a blank disk this boot -- cgit v1.3.1-sl0p