90c5c140 untracked v3/include/version.h, but six places still put it back
with git checkout. Git refuses the whole checkout when one path is unknown:
- scripts/nightly.sh images (set -e): the stage ended there, so the nightly
(images, publish, proofs) and release.yml (images, docs, gitea-release)
would fail. Acceptance does not run images, so it passed.
- scripts/check_images.sh (no -e), demo/build-iso.sh, demo/mint-zuse.sh
(|| true): silently put nothing back, BLOCK_MAP.md and the SBOM included.
- scripts/qemu_session.py: an error after every boot, otherwise harmless.
- boards/BRINGUP.md: the step said to put it back.
BLOCK_MAP.md stays in every put-back: a signed build (CI's) still rewrites
its Signed column. Found while setting up alpha.5; Captain Bob: fix it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
58 lines
3.0 KiB
Bash
Executable File
58 lines
3.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: LicenseRef-Starship-1.0
|
|
# Copyright (c) 2023-2026 Robert A. James
|
|
# mint-zuse.sh -- a Zuse of the demo's own, as a stick (issue #111, ruled by Captain Bob,
|
|
# 2026-11-06: "Mint Zuse for demo console").
|
|
#
|
|
# demo/mint-zuse.sh <out-dir>
|
|
#
|
|
# A fresh pair, never anyone's real Zuse: whatever a visitor does as this Zuse stays in a
|
|
# throwaway machine, and the drive's writes are discarded (qemu-args.sh). Minted the way
|
|
# disk/zuse-scratch was (disk/README.md): a blank 1 GiB Artemis disk and a blank 64 MiB identity
|
|
# drive, booted with system=v3 on amd64 -- "Zuse: genesis minted onto attached thumbdrive" --
|
|
# then booted again -- "Zuse: identity confirmed from attached thumbdrive" -- then laid out as a
|
|
# StarshipOS stick (make zusestick), which is what the v4 demo machine attaches.
|
|
#
|
|
# <out-dir> gets artemis.img and zuse-thumb-ident.img (the pair) and zusestick.img (the stick).
|
|
# Two QEMU boots, one at a time, in the foreground; their serial logs go to logs/ as any boot's.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
out=$(realpath -m "${1:?usage: demo/mint-zuse.sh <out-dir>}")
|
|
[ ! -e "$out/zuse-thumb-ident.img" ] || { echo "demo: $out already has a pair -- refusing to mint over it" >&2; exit 1; }
|
|
mkdir -p "$out"
|
|
truncate -s 1G "$out/artemis.img"
|
|
truncate -s 64M "$out/zuse-thumb-ident.img"
|
|
|
|
boot() { # boot <what to wait for> <what means it failed>: one system=v3 boot with the pair attached
|
|
local want=$1 bad=$2 mk log qmp t0
|
|
mk=$(mktemp)
|
|
make --no-print-directory -f kernel/Makefile ARCH=amd64 clean qemu QEMU_DISPLAY=none \
|
|
KERNEL_ARGS=system=v3 ARTDISK="$out/artemis.img" ZUSEDISK="$out/zuse-thumb-ident.img" > "$mk" 2>&1 &
|
|
local pid=$!
|
|
t0=$(date +%s)
|
|
until log=$(sed -n 's/^ Serial log: //p' "$mk") && [ -n "$log" ] && grep -aq -- "$want" "$log" 2>/dev/null; do
|
|
if [ -n "${log:-}" ] && grep -aq -- "$bad" "$log" 2>/dev/null; then echo "demo: '$bad'" >&2; kill $pid; exit 1; fi
|
|
kill -0 $pid 2>/dev/null || { echo "demo: the boot ended without '$want'" >&2; tail -20 "$mk" >&2; exit 1; }
|
|
[ $(( $(date +%s) - t0 )) -lt 900 ] || { echo "demo: no '$want' in 900s" >&2; kill $pid; exit 1; }
|
|
sleep 2
|
|
done
|
|
echo "demo: $want ($log, $(( $(date +%s) - t0 ))s)"
|
|
qmp=$(sed -n 's/^ QMP socket: //p' "$mk")
|
|
python3 - "$qmp" <<'PY'
|
|
import json, socket, sys
|
|
s = socket.socket(socket.AF_UNIX); s.connect(sys.argv[1]); f = s.makefile("rw")
|
|
f.readline()
|
|
for c in ({"execute": "qmp_capabilities"}, {"execute": "quit"}):
|
|
f.write(json.dumps(c) + "\n"); f.flush(); f.readline()
|
|
PY
|
|
wait $pid || true
|
|
rm -f "$mk"
|
|
}
|
|
|
|
boot "Zuse: genesis minted onto attached thumbdrive" "fence marker write FAILED"
|
|
boot "Zuse: identity confirmed from attached thumbdrive" "not recognized"
|
|
make --no-print-directory -f kernel/Makefile ARCH=amd64 zusestick ZUSE_PAIR="$out"
|
|
cp build/amd64/kernel/zusestick.img "$out/zusestick.img"
|
|
git checkout -q -- capsules/BLOCK_MAP.md 2>/dev/null || true # a signed build rewrites it; version.h is untracked (#145)
|
|
echo "demo: Zuse minted -- $out/zusestick.img"
|