#!/bin/bash # Rebuild the live station kernel (hosttrans + nfs + usbnet-station) and make it current-glr.json. Arg 1 = note. set -e cd /build/brintos/linux-in-the-browser C=distros/common/linux-6.12/config PATH=/build/brintos/brintium/bin:$PATH make kernel KERNEL_CONFIG_FRAGMENTS="$PWD/$C/nfs.fragment $PWD/$C/hosttrans.fragment $PWD/$C/usbnet-station.fragment" JOBS=16 > ~/k-last.log 2>&1 || { echo "kernel build FAILED"; grep -nE "error|Error" ~/k-last.log | head -5; exit 1; } A=/build/brintos/rust/appliance-boot/dist K=$(ls -t distros/common/linux-6.12/build/vmlinux-*.wasm | head -1) KS=$(sha256sum "$K" | cut -d' ' -f1) cp "$K" "$A/kernel/vmlinux-$KS.wasm" cp "$A/kernel/current-glr.json" "$A/kernel/current-glr.json.bak-$(date +%H%M%S)" printf '{ "url": "/kernel/vmlinux-%s.wasm", "sha256": "%s", "bytes": %s, "note": "%s" }\n' "$KS" "$KS" "$(stat -c %s "$K")" "$1" > "$A/kernel/current-glr.json" cat "$A/kernel/current-glr.json" cd /build/brintos/rust/appliance-boot && node precompress.mjs | tail -1