Files
bfe-core1106-sdk/qemu/payload
BFE EngineeringandClaude Opus 5.5 5494b87dc3
ci / test (push) Successful in 28s
ci / prune-artifacts (push) Skipped
ci / patches-apply (push) Successful in 1m2s
ci / mcdc (push) Successful in 29s
ci / bench (push) Successful in 12s
ci / mcdc (pull_request) Successful in 11s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / kernel-build (push) Skipped
ci / quality (push) Successful in 27s
ci / badges (push) Skipped
ci / qemu-tools (pull_request) Successful in 1m9s
ci / patches-apply (pull_request) Successful in 57s
ci / test (pull_request) Successful in 26s
ci / bench (pull_request) Successful in 16s
ci / quality (pull_request) Successful in 1m29s
ci / kernel-symbols (pull_request) Successful in 6m50s
ci / qemu-tools (push) Successful in 2m15s
ci / kernel-symbols (push) Successful in 4m42s
ci / badges (pull_request) Skipped
qemu: start the device bus when the payload carries a broker
A panel runs one mosquitto on /run/warden/bus/bus.sock (flare-edge S10bus)
and every daemon and the UI talk over it; the rig had no broker, so the
Rust warden-modbus and the UI's bus client could not run there (flare-edge
#1754, the #1050 QEMU half). Stage-2 init now starts the broker before the
payload daemons when the payload carries a static mosquitto, with the
panel's paths: the socket under sock/ with the bus.sock link, and a fresh
0400 credential file per bus user under cred/. The rig broker takes any
user and loads no plugin (the rig is a test instrument; a static broker
loads none). A payload without a broker boots as before.

qemu/tests/init-rig-bus-test.sh covers no broker, a listening broker (layout,
modes, config), a broker that exits or never listens, bad user names and the
init order, under sh and busybox sh; with WARDEN_TEST_MOSQUITTO_DIR a real
mosquitto carries a message between two users logged in by credential file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
2026-10-26 15:32:51 -06:00
..

Guest Payloads

Drop static musl armv7 binaries in this directory (contents are gitignored; binaries are never committed); qemu/mkimage.sh copies everything in this directory (except this README) into /usr/bin/ of both rootfs slots. Static musl is the same target the device uses for its Rust daemons, so the exact production binaries run unmodified in the VM.

Typical payload, built in a flare-edge checkout:

# flared (static musl armv7)
tools/build-flared.sh --local
# warden-modbus and friends: see tools/build-firmware.sh for the recipes

Then:

cp <flare-edge>/target/armv7-unknown-linux-musleabihf/release/warden-flared qemu/payload/

Or take them from a panel that already runs them: every daemon is a static musl binary, so flare-edge tools/rig-pull-daemons.sh --host <panel> copies /usr/bin/warden-* straight into this directory (recording the panel's release and each md5 in PULLED.txt), minus warden-ui, which the rig needs as the fbdev+evdev build.

A mosquitto here (the static armhf broker of flare-edge tools/mosquitto-build.sh armhf) gives the guest the panel's device bus: stage-2 init starts it on /run/warden/bus/bus.sock before any daemon and writes a credential file per bus user to /run/warden/bus/cred/<user> (warden_rig_bus in qemu/rootfs/etc/warden-lib.sh; the broker log is /tmp/mosquitto.log). Without it the guest has no bus, as before.

Stage-2 init starts every warden-* daemon it finds here, in the panel's own S-number order (ai, automation, modbus, mikrotik, asic, starlink, stratum, flared), then warden-ui (the UI also needs --display on|headless + the virt.fragment kernel for /dev/fb0). Logs land in /tmp/<name>.log inside the guest, readable over the control bridge with ctl @cat /tmp/<name>.log. An empty payload is valid: the image boots busybox-only.