ci / test (push) Canceled after 0s
ci / mcdc (push) Canceled after 0s
ci / bench (push) Canceled after 0s
ci / qemu-tools (push) Canceled after 0s
ci / kernel-symbols (push) Canceled after 0s
ci / patches-apply (push) Canceled after 0s
ci / prune-artifacts (push) Canceled after 0s
ci / kernel-build (push) Canceled after 0s
ci / quality (push) Canceled after 0s
ci / badges (push) Canceled after 0s
mkimage.sh copies PAYLOAD_DIR (default qemu/payload) into /usr/bin of both slots and fails closed when it is not a directory; ui-drive.sh checks for warden-ui in the same directory. flare-edge boots the hook set (production payload plus the test-flavor UI and wthctl) for a flow that pins documents while the other flows of a batch keep reading qemu/payload (flare-edge#2054). qemu/tests/payload-dir.sh builds the images on a copy of qemu/ and reads both rootfs slots back with debugfs; wired into CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
47 lines
2.0 KiB
Markdown
47 lines
2.0 KiB
Markdown
# 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.
|
|
`PAYLOAD_DIR=<dir>` points one run (`mkimage.sh`, `tests/ui-drive.sh`) at
|
|
another directory instead, so a caller can boot its own set, such as
|
|
flare-edge's hook set for a flow that pins documents, while other runs read
|
|
this one.
|
|
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:
|
|
|
|
```sh
|
|
# flared (static musl armv7)
|
|
tools/build-flared.sh --local
|
|
# warden-modbus and friends: see tools/build-firmware.sh for the recipes
|
|
```
|
|
|
|
Then:
|
|
|
|
```sh
|
|
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.
|