From 4e935e4825ac66c75505686da0dab7f407bc4fb0 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 11:54:53 +0000 Subject: [PATCH] test(stick): Artemis grows to fill the stick -- the tests, seen to fail (#92, Task 2) [skip ci] Plan 2026-10-29-stick-5, Task 2, steps 1-2: - qemu_session.py: --stick-gib N (the session's copy of the stick extended, sparse); modes stick_grow (16 GiB: grown, over 12000000 user blocks, the prompt, the first boot's time; the second boot of the same copy not grown again; sfdisk --verify clean) and stick_small (4 GiB: under 8 GB, not grown, said so). - kernel/Makefile: STICK_GIB and STICK_FRESH on qemu-stick, for those. - check_images.sh: the PC stick's and data stick's Artemis BAM sized for the 256 GiB cap (6144 devblocks). Before the change: stick_grow FAIL (no growth line, 1137649 user blocks, sfdisk: the backup GPT not at the end); stick_small FAIL (no line); check_images.sh FAIL on the two BAM checks only. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2 --- .../runs/doe-amd64-20261108-113956.csv | 0 .../runs/doe-amd64-20261108-114628.csv | 0 .../runs/doe-amd64-20261108-114806.csv | 0 kernel/Makefile | 13 +- .../amd64/qemu-amd64-20261108-113956.log | 164 ++++++++++++++++++ .../amd64/qemu-amd64-20261108-114628.log | 163 +++++++++++++++++ .../amd64/qemu-amd64-20261108-114806.log | 164 ++++++++++++++++++ scripts/check_images.sh | 7 + scripts/qemu_session.py | 59 ++++++- 9 files changed, 566 insertions(+), 4 deletions(-) create mode 100644 experiments/bare_metal/runs/doe-amd64-20261108-113956.csv create mode 100644 experiments/bare_metal/runs/doe-amd64-20261108-114628.csv create mode 100644 experiments/bare_metal/runs/doe-amd64-20261108-114806.csv create mode 100644 logs/20261108-113956/amd64/qemu-amd64-20261108-113956.log create mode 100644 logs/20261108-114628/amd64/qemu-amd64-20261108-114628.log create mode 100644 logs/20261108-114806/amd64/qemu-amd64-20261108-114806.log diff --git a/experiments/bare_metal/runs/doe-amd64-20261108-113956.csv b/experiments/bare_metal/runs/doe-amd64-20261108-113956.csv new file mode 100644 index 00000000..e69de29b diff --git a/experiments/bare_metal/runs/doe-amd64-20261108-114628.csv b/experiments/bare_metal/runs/doe-amd64-20261108-114628.csv new file mode 100644 index 00000000..e69de29b diff --git a/experiments/bare_metal/runs/doe-amd64-20261108-114806.csv b/experiments/bare_metal/runs/doe-amd64-20261108-114806.csv new file mode 100644 index 00000000..e69de29b diff --git a/kernel/Makefile b/kernel/Makefile index 71d9bb12..98c73223 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -1314,6 +1314,12 @@ else ifeq ($(ARCH),riscv64) STICK_PC_IMG := build/boards/pc/lithos-pc.img STICK_MACHINE ?= q35 STICK_MEM ?= 1024 +# STICK_GIB=N -- the copy booted is extended, sparse, to N GiB: a stick larger than the image +# written to it (docs/v4.0.0/STICK.md 5a). STICK_FRESH=0 -- boot the copy the last boot left, +# not a fresh one: a stick's second boot (plan 2026-10-29-stick-5, Task 2). +STICK_GIB ?= +STICK_FRESH ?= 1 +STICK_RUN_IMG = $(BUILD_DIR)/stick-run.img .PHONY: qemu-stick qemu-stick-high qemu-stick-high: @$(MAKE) -f kernel/Makefile ARCH=$(ARCH) STICK_MACHINE=pc STICK_MEM=3G qemu-stick @@ -1322,7 +1328,10 @@ ifneq ($(ARCH),amd64) @echo "qemu-stick: the stick is the PC's -- ARCH=amd64 (ARM and RISC-V sticks are later, STICK.md 10)"; exit 1 else @$(MAKE) -f kernel/Makefile ARCH=amd64 BOARD=pc boot_image - @cp --sparse=always $(STICK_PC_IMG) $(BUILD_DIR)/stick-run.img + @if [ "$(STICK_FRESH)" = 1 ] || [ ! -f $(STICK_RUN_IMG) ]; then \ + cp --sparse=always $(STICK_PC_IMG) $(STICK_RUN_IMG); \ + $(if $(STICK_GIB),truncate -s $(STICK_GIB)G $(STICK_RUN_IMG);) \ + fi @if [ ! -f $(OVMF_CODE) ]; then echo "Error: $(OVMF_CODE) not found"; exit 1; fi @if [ ! -f $(OVMF_VARS_RO) ]; then echo "Error: $(OVMF_VARS_RO) not found"; exit 1; fi @cp $(OVMF_VARS_RO) $(BUILD_DIR)/OVMF_VARS-stick.fd @@ -1347,7 +1356,7 @@ else -drive if=pflash,format=raw,readonly=on,file=$(OVMF_CODE) \ -drive if=pflash,format=raw,file=$(BUILD_DIR)/OVMF_VARS-stick.fd \ $(XHCI_ARGS_ROOT) \ - -drive if=none,id=stickdrv,file=$(BUILD_DIR)/stick-run.img,format=raw \ + -drive if=none,id=stickdrv,file=$(STICK_RUN_IMG),format=raw \ -device usb-storage,bus=xhci0.0,port=1,drive=stickdrv,bootindex=0 \ -chardev socket,id=cserial,path=$$SERIAL_SOCK,server=on,wait=off,logfile=$$LOG \ -serial chardev:cserial \ diff --git a/logs/20261108-113956/amd64/qemu-amd64-20261108-113956.log b/logs/20261108-113956/amd64/qemu-amd64-20261108-113956.log new file mode 100644 index 00000000..864ac33d --- /dev/null +++ b/logs/20261108-113956/amd64/qemu-amd64-20261108-113956.log @@ -0,0 +1,164 @@ +[=3h[=3h[=3hBdsDxe: loading Boot0001 "UEFI QEMU QEMU USB HARDDRIVE 1-0000:00:03.0-1" from PciRoot(0x0)/Pci(0x3,0x0)/USB(0x0,0x0) +BdsDxe: starting Boot0001 "UEFI QEMU QEMU USB HARDDRIVE 1-0000:00:03.0-1" from PciRoot(0x0)/Pci(0x3,0x0)/USB(0x0,0x0) +[=3hStarKernel UEFI Loader +Loading kernel from ESP... +[CKPT 001] Entered efi_main - ConOut live +RAW SERIAL UP +[CKPT 002] Serial (COM1) initialized +Monolithic build - kernel linked directly +Collecting boot information... +CmdLine: from starforth.cfg +CmdLine: parsed OK +[CKPT 004] Command line parsed +[CKPT 005] Kernel stack allocation decided +[CKPT 006] Boot info collected (ACPI table located) +GOP: linear framebuffer found +[CKPT 007] GOP: linear framebuffer found +[CKPT 008] About to enter ExitBootServices retry loop +EBS... +EBS OK +Calling kernel_main (monolithic)... + + + _____ _ _ __ _ + / ____| | | |/ / | | + | (___ | |_ __ _ _ __| ' / ___ _ __ _ __ ___| | + \___ \| __/ _` | '__| < / _ \ '__| '_ \ / _ \ | + ____) | || (_| | | | . \ __/ | | | | | __/ | + |_____/ \__\__,_|_| |_|\_\___|_| |_| |_|\___|_| + +LithosAnanke v4.0.0-alpha.3 amd64 +Architecture: amd64 +Build: Nov 8 2026 11:39:50 + +UEFI BootServices: EXITED +Console: serial line is a 16550 at port 0x00000000000003f8 (COM1, probed) + +=== StarKernel Boot Information === +Memory map entries: 128 +Total memory: 1023 MB +Usable memory: 965 MB +=================================== + +PMM initialized. +PMM statistics: + Total pages: 248627 + Free pages : 247100 + Used pages : 1527 + Total MB : 971 + Free MB : 965 + Used MB : 5 + +VMM initialized (mapped RAM, CR3 switched) +VMM initialized (mapped RAM, CR3 switched) +VMM self-test: mapped OK at 0xffff800000000000 +VMM self-test complete. + +IDT installed. + +APIC: init... +APIC: IA32_APIC_BASE MSR=0x00000000fee00900 +APIC: stale-ISR drain: 0 EOI(s) issued +APIC: initialized (xAPIC MMIO, TPR=0, SIVR=0x1FF, EOI-clear) +APIC: init done + +I/O APIC: init... +I/O APIC: base=0xfec00000, gsi_base=0, overrides=5 + override: source=00 gsi=2 flags=0x0000 + override: source=05 gsi=5 flags=0x000d + override: source=09 gsi=9 flags=0x000d + override: source=0a gsi=10 flags=0x000d + override: source=0b gsi=11 flags=0x000d +i8042: keyboard ACKed enable-scanning +i8042: IRQ1 enabled in controller config byte +I/O APIC: keyboard IRQ1 routed (masked) + +Timer: init... +Timer: init start +Timer: PM_TMR_BLK discovered from FADT at port 1544 +Timer: VM mode detected (hypervisor present). +Timer: HPET calibration disabled (VM-exit MMIO would poison timing). +Timer: WARNING: invariant TSC not present under hypervisor. +Timer: continuing in RELATIVE mode (no determinism guarantees). +Timer: RDTSCP not present; using RDTSC (less serialized). +Timer: CPUID frequency unavailable; trying PM Timer... +Timer: trust=1 (0=NONE,1=REL,2=ABS), TSC=2096783777 Hz +Timer: init done + +Kernel heap initialized. +Heap statistics: + Total bytes: 536870872 + Free bytes: 536870872 + Used bytes: 0 + Peak bytes: 0 + Heap base addr: 24641536 + Heap end addr: 561512448 + +Heartbeat: init... +APIC Timer: calibrating... +APIC Timer: apic_hz=1004527536, tick_hz=100, initial_count=10045275 +APIC Timer: configured (masked, ready to start) +Heartbeat: init done +Kernel initialization complete. +Boot successful! + +Boot disk: a StarshipOS stick +System: StarForth v4 (system=v4) +StarForth v4: one host node, the F18-derived engine +V4: capsule v4:sys:map-64.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:map-64.f18 capsule_hash=0x949eb6a1e9260e49 +V4: capsule v4:sys:core.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:core.f18 capsule_hash=0xb8f167892ec18c28 +V4: capsule v4:sys:input.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:input.f18 capsule_hash=0x85d3ec486d929a79 +V4: capsule v4:sys:dict.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:dict.f18 capsule_hash=0x1379bd3b5de811dc +V4: capsule v4:sys:codegen.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:codegen.f18 capsule_hash=0x36d2ae84d2911b90 +V4: capsule v4:sys:compile.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:compile.f18 capsule_hash=0x11145c4c2ab819d8 +V4: capsule v4:sys:quit.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:quit.f18 capsule_hash=0x43cadf3b21ddbf3e +V4: capsule v4:sys:forth.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:forth.f18 capsule_hash=0x16cab4a1268b85da +V4: capsule v4:sys:numout.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:numout.f18 capsule_hash=0x85a240ad3fb2b299 +V4: capsule v4:sys:words.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:words.f18 capsule_hash=0xb1d381f927d9f14e +V4: capsule v4:sys:system.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:system.f18 capsule_hash=0xd92203664c2915bd +V4: capsule v4:sys:qmath.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:qmath.f18 capsule_hash=0xdb4140713dd857f3 +V4: capsule v4:sys:blocks.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:blocks.f18 capsule_hash=0x76307ef48678dc2a +V4: capsule v4:sys:log.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:log.f18 capsule_hash=0xfc6540e6b824a52b +V4: capsule v4:sys:acl.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:acl.f18 capsule_hash=0x6845aa048db7eb22 +V4: capsule v4:sys:end.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:end.f18 capsule_hash=0x5ef01312c07b79cc +PARITY:V4_ROM words=2372 rom_hash=0x87b23d3ae2643c8d instructions=59145258 +V4: capsule v4:forth79.4th signature: missing (unsigned) +PARITY:V4_CAPSULE name=v4:forth79.4th capsule_id=0x4055641ee17d176b capsule_hash=0x4055641ee17d176b dict_hash=0x033e1c05c09a1df8 +PARITY:V4_POST tests=538 pass=538 fail=0 +PARITY:V4_SYSTEM word_count=317 dict_hash=0xfec8c47cfc6f437f +PARITY:OK +POST: PASSED +[HADES][INFO ] [KRELTSC: 0] blk: raw device LBN 2048..3071 (1024 blocks) +PCI: init... +PCI: ECAM mapped (amd64) +virtio-rng: no device on PCI bus 0 +rng: backend = rdrand +entropy: ready +virtio-input: no device on PCI bus 0 +Starting heartbeat... +APIC Timer: started (LVT=0x00020020 ICR=10045275) +I/O APIC: keyboard IRQ1 unmasked +Heartbeat running. +blkio_usb: MSC device ready +[HADES][INFO ] [KRELTSC: 11039524176] blk: disk 'StarForth Volume' v2 LBN 3072..1140720 (1137649 user +Artemis: the stick's partition attached +[HADES][INFO ] [KRELTSC: 11055967512] blk: disk 'StarForth Volume' v2 LBN 1140721..1524262 (383542 us +[HADES][INFO ] [KRELTSC: 11080259828] MINT verify: identity reads back correctly +[Hera] Zuse: genesis minted onto attached thumbdrive +[zuse@Hera] ok>  \ No newline at end of file diff --git a/logs/20261108-114628/amd64/qemu-amd64-20261108-114628.log b/logs/20261108-114628/amd64/qemu-amd64-20261108-114628.log new file mode 100644 index 00000000..8f579321 --- /dev/null +++ b/logs/20261108-114628/amd64/qemu-amd64-20261108-114628.log @@ -0,0 +1,163 @@ +[=3h[=3h[=3hBdsDxe: loading Boot0001 "UEFI QEMU QEMU USB HARDDRIVE 1-0000:00:03.0-1" from PciRoot(0x0)/Pci(0x3,0x0)/USB(0x0,0x0) +BdsDxe: starting Boot0001 "UEFI QEMU QEMU USB HARDDRIVE 1-0000:00:03.0-1" from PciRoot(0x0)/Pci(0x3,0x0)/USB(0x0,0x0) +[=3hStarKernel UEFI Loader +Loading kernel from ESP... +[CKPT 001] Entered efi_main - ConOut live +RAW SERIAL UP +[CKPT 002] Serial (COM1) initialized +Monolithic build - kernel linked directly +Collecting boot information... +CmdLine: from starforth.cfg +CmdLine: parsed OK +[CKPT 004] Command line parsed +[CKPT 005] Kernel stack allocation decided +[CKPT 006] Boot info collected (ACPI table located) +GOP: linear framebuffer found +[CKPT 007] GOP: linear framebuffer found +[CKPT 008] About to enter ExitBootServices retry loop +EBS... +EBS OK +Calling kernel_main (monolithic)... + + + _____ _ _ __ _ + / ____| | | |/ / | | + | (___ | |_ __ _ _ __| ' / ___ _ __ _ __ ___| | + \___ \| __/ _` | '__| < / _ \ '__| '_ \ / _ \ | + ____) | || (_| | | | . \ __/ | | | | | __/ | + |_____/ \__\__,_|_| |_|\_\___|_| |_| |_|\___|_| + +LithosAnanke v4.0.0-alpha.3 amd64 +Architecture: amd64 +Build: Nov 8 2026 11:39:50 + +UEFI BootServices: EXITED +Console: serial line is a 16550 at port 0x00000000000003f8 (COM1, probed) + +=== StarKernel Boot Information === +Memory map entries: 128 +Total memory: 1023 MB +Usable memory: 965 MB +=================================== + +PMM initialized. +PMM statistics: + Total pages: 248627 + Free pages : 247100 + Used pages : 1527 + Total MB : 971 + Free MB : 965 + Used MB : 5 + +VMM initialized (mapped RAM, CR3 switched) +VMM initialized (mapped RAM, CR3 switched) +VMM self-test: mapped OK at 0xffff800000000000 +VMM self-test complete. + +IDT installed. + +APIC: init... +APIC: IA32_APIC_BASE MSR=0x00000000fee00900 +APIC: stale-ISR drain: 0 EOI(s) issued +APIC: initialized (xAPIC MMIO, TPR=0, SIVR=0x1FF, EOI-clear) +APIC: init done + +I/O APIC: init... +I/O APIC: base=0xfec00000, gsi_base=0, overrides=5 + override: source=00 gsi=2 flags=0x0000 + override: source=05 gsi=5 flags=0x000d + override: source=09 gsi=9 flags=0x000d + override: source=0a gsi=10 flags=0x000d + override: source=0b gsi=11 flags=0x000d +i8042: keyboard ACKed enable-scanning +i8042: IRQ1 enabled in controller config byte +I/O APIC: keyboard IRQ1 routed (masked) + +Timer: init... +Timer: init start +Timer: PM_TMR_BLK discovered from FADT at port 1544 +Timer: VM mode detected (hypervisor present). +Timer: HPET calibration disabled (VM-exit MMIO would poison timing). +Timer: WARNING: invariant TSC not present under hypervisor. +Timer: continuing in RELATIVE mode (no determinism guarantees). +Timer: RDTSCP not present; using RDTSC (less serialized). +Timer: CPUID frequency unavailable; trying PM Timer... +Timer: trust=1 (0=NONE,1=REL,2=ABS), TSC=2100298892 Hz +Timer: init done + +Kernel heap initialized. +Heap statistics: + Total bytes: 536870872 + Free bytes: 536870872 + Used bytes: 0 + Peak bytes: 0 + Heap base addr: 24641536 + Heap end addr: 561512448 + +Heartbeat: init... +APIC Timer: calibrating... +APIC Timer: apic_hz=1009708644, tick_hz=100, initial_count=10097086 +APIC Timer: configured (masked, ready to start) +Heartbeat: init done +Kernel initialization complete. +Boot successful! + +Boot disk: a StarshipOS stick +System: StarForth v4 (system=v4) +StarForth v4: one host node, the F18-derived engine +V4: capsule v4:sys:map-64.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:map-64.f18 capsule_hash=0x949eb6a1e9260e49 +V4: capsule v4:sys:core.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:core.f18 capsule_hash=0xb8f167892ec18c28 +V4: capsule v4:sys:input.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:input.f18 capsule_hash=0x85d3ec486d929a79 +V4: capsule v4:sys:dict.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:dict.f18 capsule_hash=0x1379bd3b5de811dc +V4: capsule v4:sys:codegen.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:codegen.f18 capsule_hash=0x36d2ae84d2911b90 +V4: capsule v4:sys:compile.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:compile.f18 capsule_hash=0x11145c4c2ab819d8 +V4: capsule v4:sys:quit.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:quit.f18 capsule_hash=0x43cadf3b21ddbf3e +V4: capsule v4:sys:forth.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:forth.f18 capsule_hash=0x16cab4a1268b85da +V4: capsule v4:sys:numout.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:numout.f18 capsule_hash=0x85a240ad3fb2b299 +V4: capsule v4:sys:words.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:words.f18 capsule_hash=0xb1d381f927d9f14e +V4: capsule v4:sys:system.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:system.f18 capsule_hash=0xd92203664c2915bd +V4: capsule v4:sys:qmath.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:qmath.f18 capsule_hash=0xdb4140713dd857f3 +V4: capsule v4:sys:blocks.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:blocks.f18 capsule_hash=0x76307ef48678dc2a +V4: capsule v4:sys:log.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:log.f18 capsule_hash=0xfc6540e6b824a52b +V4: capsule v4:sys:acl.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:acl.f18 capsule_hash=0x6845aa048db7eb22 +V4: capsule v4:sys:end.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:end.f18 capsule_hash=0x5ef01312c07b79cc +PARITY:V4_ROM words=2372 rom_hash=0x87b23d3ae2643c8d instructions=59145258 +V4: capsule v4:forth79.4th signature: missing (unsigned) +PARITY:V4_CAPSULE name=v4:forth79.4th capsule_id=0x4055641ee17d176b capsule_hash=0x4055641ee17d176b dict_hash=0x033e1c05c09a1df8 +PARITY:V4_POST tests=538 pass=538 fail=0 +PARITY:V4_SYSTEM word_count=317 dict_hash=0xfec8c47cfc6f437f +PARITY:OK +POST: PASSED +[HADES][INFO ] [KRELTSC: 0] blk: raw device LBN 2048..3071 (1024 blocks) +PCI: init... +PCI: ECAM mapped (amd64) +virtio-rng: no device on PCI bus 0 +rng: backend = rdrand +entropy: ready +virtio-input: no device on PCI bus 0 +Starting heartbeat... +APIC Timer: started (LVT=0x00020020 ICR=10097086) +I/O APIC: keyboard IRQ1 unmasked +Heartbeat running. +blkio_usb: MSC device ready +[HADES][INFO ] [KRELTSC: 11167758802] blk: disk 'StarForth Volume' v2 LBN 3072..1140720 (1137649 user +Artemis: the stick's partition attached +[HADES][INFO ] [KRELTSC: 11192111492] blk: disk 'StarForth Volume' v2 LBN 1140721..1524262 (383542 us +[Hera] Zuse: identity confirmed from attached thumbdrive +[zuse@Hera] ok>  \ No newline at end of file diff --git a/logs/20261108-114806/amd64/qemu-amd64-20261108-114806.log b/logs/20261108-114806/amd64/qemu-amd64-20261108-114806.log new file mode 100644 index 00000000..da9b25f4 --- /dev/null +++ b/logs/20261108-114806/amd64/qemu-amd64-20261108-114806.log @@ -0,0 +1,164 @@ +[=3h[=3h[=3hBdsDxe: loading Boot0001 "UEFI QEMU QEMU USB HARDDRIVE 1-0000:00:03.0-1" from PciRoot(0x0)/Pci(0x3,0x0)/USB(0x0,0x0) +BdsDxe: starting Boot0001 "UEFI QEMU QEMU USB HARDDRIVE 1-0000:00:03.0-1" from PciRoot(0x0)/Pci(0x3,0x0)/USB(0x0,0x0) +[=3hStarKernel UEFI Loader +Loading kernel from ESP... +[CKPT 001] Entered efi_main - ConOut live +RAW SERIAL UP +[CKPT 002] Serial (COM1) initialized +Monolithic build - kernel linked directly +Collecting boot information... +CmdLine: from starforth.cfg +CmdLine: parsed OK +[CKPT 004] Command line parsed +[CKPT 005] Kernel stack allocation decided +[CKPT 006] Boot info collected (ACPI table located) +GOP: linear framebuffer found +[CKPT 007] GOP: linear framebuffer found +[CKPT 008] About to enter ExitBootServices retry loop +EBS... +EBS OK +Calling kernel_main (monolithic)... + + + _____ _ _ __ _ + / ____| | | |/ / | | + | (___ | |_ __ _ _ __| ' / ___ _ __ _ __ ___| | + \___ \| __/ _` | '__| < / _ \ '__| '_ \ / _ \ | + ____) | || (_| | | | . \ __/ | | | | | __/ | + |_____/ \__\__,_|_| |_|\_\___|_| |_| |_|\___|_| + +LithosAnanke v4.0.0-alpha.3 amd64 +Architecture: amd64 +Build: Nov 8 2026 11:48:00 + +UEFI BootServices: EXITED +Console: serial line is a 16550 at port 0x00000000000003f8 (COM1, probed) + +=== StarKernel Boot Information === +Memory map entries: 128 +Total memory: 1023 MB +Usable memory: 965 MB +=================================== + +PMM initialized. +PMM statistics: + Total pages: 248627 + Free pages : 247100 + Used pages : 1527 + Total MB : 971 + Free MB : 965 + Used MB : 5 + +VMM initialized (mapped RAM, CR3 switched) +VMM initialized (mapped RAM, CR3 switched) +VMM self-test: mapped OK at 0xffff800000000000 +VMM self-test complete. + +IDT installed. + +APIC: init... +APIC: IA32_APIC_BASE MSR=0x00000000fee00900 +APIC: stale-ISR drain: 0 EOI(s) issued +APIC: initialized (xAPIC MMIO, TPR=0, SIVR=0x1FF, EOI-clear) +APIC: init done + +I/O APIC: init... +I/O APIC: base=0xfec00000, gsi_base=0, overrides=5 + override: source=00 gsi=2 flags=0x0000 + override: source=05 gsi=5 flags=0x000d + override: source=09 gsi=9 flags=0x000d + override: source=0a gsi=10 flags=0x000d + override: source=0b gsi=11 flags=0x000d +i8042: keyboard ACKed enable-scanning +i8042: IRQ1 enabled in controller config byte +I/O APIC: keyboard IRQ1 routed (masked) + +Timer: init... +Timer: init start +Timer: PM_TMR_BLK discovered from FADT at port 1544 +Timer: VM mode detected (hypervisor present). +Timer: HPET calibration disabled (VM-exit MMIO would poison timing). +Timer: WARNING: invariant TSC not present under hypervisor. +Timer: continuing in RELATIVE mode (no determinism guarantees). +Timer: RDTSCP not present; using RDTSC (less serialized). +Timer: CPUID frequency unavailable; trying PM Timer... +Timer: trust=1 (0=NONE,1=REL,2=ABS), TSC=2088414797 Hz +Timer: init done + +Kernel heap initialized. +Heap statistics: + Total bytes: 536870872 + Free bytes: 536870872 + Used bytes: 0 + Peak bytes: 0 + Heap base addr: 24641536 + Heap end addr: 561512448 + +Heartbeat: init... +APIC Timer: calibrating... +APIC Timer: apic_hz=1003877646, tick_hz=100, initial_count=10038776 +APIC Timer: configured (masked, ready to start) +Heartbeat: init done +Kernel initialization complete. +Boot successful! + +Boot disk: a StarshipOS stick +System: StarForth v4 (system=v4) +StarForth v4: one host node, the F18-derived engine +V4: capsule v4:sys:map-64.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:map-64.f18 capsule_hash=0x949eb6a1e9260e49 +V4: capsule v4:sys:core.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:core.f18 capsule_hash=0xb8f167892ec18c28 +V4: capsule v4:sys:input.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:input.f18 capsule_hash=0x85d3ec486d929a79 +V4: capsule v4:sys:dict.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:dict.f18 capsule_hash=0x1379bd3b5de811dc +V4: capsule v4:sys:codegen.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:codegen.f18 capsule_hash=0x36d2ae84d2911b90 +V4: capsule v4:sys:compile.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:compile.f18 capsule_hash=0x11145c4c2ab819d8 +V4: capsule v4:sys:quit.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:quit.f18 capsule_hash=0x43cadf3b21ddbf3e +V4: capsule v4:sys:forth.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:forth.f18 capsule_hash=0x16cab4a1268b85da +V4: capsule v4:sys:numout.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:numout.f18 capsule_hash=0x85a240ad3fb2b299 +V4: capsule v4:sys:words.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:words.f18 capsule_hash=0xb1d381f927d9f14e +V4: capsule v4:sys:system.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:system.f18 capsule_hash=0xd92203664c2915bd +V4: capsule v4:sys:qmath.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:qmath.f18 capsule_hash=0xdb4140713dd857f3 +V4: capsule v4:sys:blocks.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:blocks.f18 capsule_hash=0x76307ef48678dc2a +V4: capsule v4:sys:log.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:log.f18 capsule_hash=0xfc6540e6b824a52b +V4: capsule v4:sys:acl.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:acl.f18 capsule_hash=0x6845aa048db7eb22 +V4: capsule v4:sys:end.f18 signature: missing (unsigned) +PARITY:V4_F18 name=v4:sys:end.f18 capsule_hash=0x5ef01312c07b79cc +PARITY:V4_ROM words=2372 rom_hash=0x87b23d3ae2643c8d instructions=59145258 +V4: capsule v4:forth79.4th signature: missing (unsigned) +PARITY:V4_CAPSULE name=v4:forth79.4th capsule_id=0x4055641ee17d176b capsule_hash=0x4055641ee17d176b dict_hash=0x033e1c05c09a1df8 +PARITY:V4_POST tests=538 pass=538 fail=0 +PARITY:V4_SYSTEM word_count=317 dict_hash=0xfec8c47cfc6f437f +PARITY:OK +POST: PASSED +[HADES][INFO ] [KRELTSC: 0] blk: raw device LBN 2048..3071 (1024 blocks) +PCI: init... +PCI: ECAM mapped (amd64) +virtio-rng: no device on PCI bus 0 +rng: backend = rdrand +entropy: ready +virtio-input: no device on PCI bus 0 +Starting heartbeat... +APIC Timer: started (LVT=0x00020020 ICR=10038776) +I/O APIC: keyboard IRQ1 unmasked +Heartbeat running. +blkio_usb: MSC device ready +[HADES][INFO ] [KRELTSC: 11034915752] blk: disk 'StarForth Volume' v2 LBN 3072..1140720 (1137649 user +Artemis: the stick's partition attached +[HADES][INFO ] [KRELTSC: 11059137126] blk: disk 'StarForth Volume' v2 LBN 1140721..1524262 (383542 us +[HADES][INFO ] [KRELTSC: 11093785878] MINT verify: identity reads back correctly +[Hera] Zuse: genesis minted onto attached thumbdrive +[zuse@Hera] ok>  \ No newline at end of file diff --git a/scripts/check_images.sh b/scripts/check_images.sh index 284a2b8b..6f8a6f82 100755 --- a/scripts/check_images.sh +++ b/scripts/check_images.sh @@ -73,6 +73,11 @@ same() { # same IMG N FILE -- partition N holds FILE's bytes, and is exactly i cmp -s -i "$((s * 512)):0" -n "$((z * 512))" "$1" "$3" } +# bam IMG N -- the BAM of partition N's Artemis volume, in 4 KiB devblocks (mkartemis --check) +bam() { artemis_check "$1" "$2" 2>/dev/null | sed -n 's/.* bam \([0-9]*\) .*/\1/p'; } +# the BAM sized for the 256 GiB growth cap (plan 2026-10-29-stick-5, R1): choose_B of 2^26 devblocks +CAP_BAM=6144 + uuid() { artemis_check "$1" "$2" 2>/dev/null | sed -n 's/.*disk_uuid \([0-9a-f]*\).*/\1/p'; } echo "== building" @@ -95,6 +100,7 @@ check "the ESP holds startup.nsh" mdir -i "$STICK@@$OFF" ::/startup.nsh check "starforth.cfg's first word is system=v4" eq "$(mtype -i "$STICK@@$OFF" ::/starforth.cfg 2>/dev/null | awk '{print $1; exit}')" "system=v4" check "the identity partition is all zeros" zeros "$STICK" 2 check "Artemis: STFR v2, signature ok" artemis_check "$STICK" 3 +check "Artemis: its BAM sized for 256 GiB ($CAP_BAM devblocks)" eq "$(bam "$STICK" 3)" "$CAP_BAM" echo "== the data stick ($DATA)" check "it exists, 1536 MiB" eq "$(stat -c %s "$DATA" 2>/dev/null)" "$((1536 * 1048576))" @@ -105,6 +111,7 @@ check "whole MiB, contiguous, Artemis to the end" geometry "$DATA" check "sfdisk --verify: the GPT is clean" sfdisk --verify "$DATA" check "the identity partition is all zeros" zeros "$DATA" 1 check "Artemis: STFR v2, signature ok" artemis_check "$DATA" 2 +check "Artemis: its BAM sized for 256 GiB ($CAP_BAM devblocks)" eq "$(bam "$DATA" 2)" "$CAP_BAM" U1=$(uuid "$DATA" 2) check "the data stick builds again" make -f kernel/Makefile ARCH=amd64 datastick U2=$(uuid "$DATA" 2) diff --git a/scripts/qemu_session.py b/scripts/qemu_session.py index f11bdf0b..30e17700 100755 --- a/scripts/qemu_session.py +++ b/scripts/qemu_session.py @@ -53,6 +53,12 @@ the stick's, plan 2026-10-26-stick-1-screen-and-keyboard.md): identity confirmed, no genesis, the prompt (plan 2026-10-29-stick-5, Task 1) stick_genesis --target qemu-stick, the PC stick as built (no STICK_PAIR): its first boot mints the proxy Zuse and reaches [zuse@Hera] ok> with nothing set up (plug and play) + stick_grow --target qemu-stick --stick-gib 16: the first boot grows Artemis to fill the stick + (over 12000000 user blocks), mints, the prompt, its time POST -> prompt printed; the + second boot of the same copy is not grown again and recognises Zuse; sfdisk --verify + on the copy is clean (plan 2026-10-29-stick-5, Task 2) + stick_small --target qemu-stick --stick-gib 4: under 8 GB -- not grown, said so; Artemis at the + image's size; the prompt stick_artemis ARTDISK= (no virtio disk): Artemis and Zuse from the Zuse stick alone -- the stick's Artemis partition attached first (785938 user blocks), then its identity (48724); [zuse@Hera] ok> (plan 2026-10-27-stick-4-one-disk.md, Task 4) @@ -88,6 +94,7 @@ ap.add_argument("--label", default=None) ap.add_argument("--make", default="") ap.add_argument("--no-zuse", action="store_true") ap.add_argument("--target", default="qemu") # qemu-stick: boot the PC stick (amd64) +ap.add_argument("--stick-gib", type=int, default=None) # qemu-stick: the copy extended to N GiB a = ap.parse_args() NO_ZUSE_MODES = {"gpt_zuse", "gpt_hotplug", "gpt_foreign", "gpt_bad_crc", "gpt_bad_entries", "gpt_no_header", @@ -95,7 +102,7 @@ NO_ZUSE_MODES = {"gpt_zuse", "gpt_hotplug", "gpt_foreign", "gpt_bad_crc", "gpt_b "alttab_after_logout", "alttab_before_pull", "emergency_pull", "screen_dark_until_login", "screen_console_after_login", "screen_dark_after_logout", "kbd_typeahead", "stick_boot", "stick_v3", "stick_zuse", "screen_boot", "genesis", - "stick_genesis"} + "stick_genesis", "stick_grow", "stick_small"} label = a.label or f"{a.mode}-{a.arch}" work = os.path.join(ROOT, "build", "qemu-session", label) shutil.rmtree(work, ignore_errors=True) @@ -135,6 +142,10 @@ if a.mode == "screen_boot": make_args.append("KERNEL_ARGS=screen=boot") if a.mode == "stick_zuse": make_args.append(f"STICK_PAIR={work}") # the PC stick with this session's copy of the pair +if a.stick_gib: + make_args.append(f"STICK_GIB={a.stick_gib}") +if a.mode in ("stick_grow", "stick_small"): + make_args.append("KERNEL_ARGS=--log-level=info") # the blk: disk lines the sizes are read from if a.mode == "genesis": # a fresh data stick, made once into this session's directory and booted twice: the second # boot is the same copy, so it finds what the first wrote (plan 2026-10-29-stick-5, Task 1) @@ -464,6 +475,49 @@ elif m in ("genesis", "stick_genesis"): check("7 ok (second boot)", wait_for(PROMPT, 60, n) and re.search(r"7\s+ok", text()[-400:]) is not None) check("no fault (second boot)", count(r"EXCEPTION|PANIC|panic") == 0) +elif m in ("stick_grow", "stick_small"): + def artemis_blocks(): + u = re.findall(r"blk: disk .*?\((\d+) us", text()) + return int(u[0]) if u else None + t0 = time.time() + if m == "stick_grow": + check("Artemis: grown to fill the stick", wait_for(r"Artemis: grown to fill the stick", 300), + near=r"Artemis: |GPT: ") + else: + check("Artemis: the stick is under 8 GB -- not grown", + wait_for(r"Artemis: the stick is under 8 GB -- not grown", 300), near=r"Artemis: |GPT: ") + check("Zuse: genesis minted onto attached thumbdrive", + wait_for(r"Zuse: genesis minted onto attached thumbdrive", 300), near=r"Artemis: |Zuse: ") + check("[zuse@Hera] ok>", wait_for(PROMPT, 120)) + print(f"TIME: POST to the prompt, first boot: {time.time() - t0:.0f} s", flush=True) + b1 = artemis_blocks() + if m == "stick_grow": + check(f"Artemis over 12000000 user blocks ({b1})", b1 is not None and b1 > 12000000) + else: + check(f"Artemis at the image's size, 1000000..1200000 user blocks ({b1})", + b1 is not None and 1000000 < b1 < 1200000) + check("no fault", count(r"EXCEPTION|PANIC|panic") == 0) + if m == "stick_grow": + shutdown() + print("-- the second boot, the same copy of the stick", flush=True) + boot([x for x in make_args if x != "clean"] + ["STICK_FRESH=0"]) + check("POST: PASSED (second boot)", wait_for(r"POST: PASSED", 900)) + check("Zuse: identity confirmed (second boot)", + wait_for(r"Zuse: identity confirmed from attached thumbdrive", 300), near=r"Artemis: |Zuse: ") + check("[zuse@Hera] ok> (second boot)", wait_for(PROMPT, 120)) + check("not grown again", count(r"Artemis: grown") == 0) + b2 = artemis_blocks() + check(f"the same Artemis size ({b1} -> {b2})", b2 == b1) + check("no fault (second boot)", count(r"EXCEPTION|PANIC|panic") == 0) + shutdown() + sf = shutil.which("sfdisk") or "/usr/sbin/sfdisk" + run = os.path.join(ROOT, "build", a.arch, "kernel", "stick-run.img") + v = subprocess.run([sf, "--verify", run], capture_output=True, text=True) + print(v.stdout.strip() + v.stderr.strip(), flush=True) + check("sfdisk --verify on the grown copy: clean", + v.returncode == 0 and "No errors detected" in v.stdout + v.stderr) + boot_done = True + elif m == "stick_v3": t = text() check("Boot disk: a StarshipOS stick", re.search(r"Boot disk: a StarshipOS stick", t) is not None) @@ -708,7 +762,8 @@ else: check(f"known mode {m}", False) print(f"RESULT: {'PASS' if ok else 'FAIL'}", flush=True) -shutdown() +if not globals().get("boot_done"): + shutdown() for f in ("v3/include/version.h", "capsules/BLOCK_MAP.md"): subprocess.run(["git", "checkout", "-q", "--", f], cwd=ROOT) sys.exit(0 if ok else 2)