diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a516cc..935a84f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,6 +170,18 @@ jobs: if command -v busybox >/dev/null; then WARDEN_TEST_SH="busybox sh" bash qemu/tests/ctl-bridge-test.sh fi + - name: rig init boots through the shipped init chain (flare-edge#2210) + # warden_init_chain against stub scripts and the warden.initchain + # wiring in sbin/init; once more under busybox sh, the rig's own shell. + run: | + bash qemu/tests/init-chain-test.sh + if command -v busybox >/dev/null; then + WARDEN_TEST_SH="busybox sh" bash qemu/tests/init-chain-test.sh + fi + - name: mkimage.sh ROOTFS_OVERLAY regression test (flare-edge#2210) + # The panel's scripts land in both slots with their modes; an overlay + # reaching outside etc/ and usr/, or holding a symlink, writes no image. + run: bash qemu/tests/rootfs-overlay.sh - name: mkimage.sh SEED_DIR regression test # Only ui-drive.sh --seed (a real VM boot) exercises this hook # otherwise; this builds the same unprivileged mkfs.ext4 image and diff --git a/qemu/README.md b/qemu/README.md index 1958847..c240ad7 100644 --- a/qemu/README.md +++ b/qemu/README.md @@ -95,6 +95,18 @@ does on a panel instead of rejecting every attempt. `qemu_stage_rootfs()` the executable bit, so the checked-out source file's own mode depends on the checking-out umask and cannot be trusted to arrive non-world-readable. +`--append warden.initchain` boots the UI the way a panel does (flare-edge +#2210). The caller lays the panel's own scripts over the rootfs with +`ROOTFS_OVERLAY= mkimage.sh` (only `etc/` and `usr/` at its top, no +symlinks). Stage-2 init then starts `/etc/init.d/S00`-`S09` with `start` +before the bus (S03warden-accounts creates the platform accounts, and the +bus hands `cred/ui` to `warden-ui`), and `S10`-`S99` after the payload +daemons in place of its direct root start of `warden-ui`. S99lvgl then runs +`warden-ui-run`, which drops the UI to its account and respawns it. Rig +differences: the splash handover is marked done (no S09splash) and +warden-ui-run passes `-b fbdev`, not the panel's `-b drm`. A chain boot +with no script prints `WARDEN-QEMU-INITCHAIN-EMPTY` and starts no UI. + A flow seed may contain `qemu-flow-setup.sh`. Stage-2 init runs it inside the disposable guest after mounting userdata and before starting daemons or the UI. A nonzero exit stops the boot. Use it only for test devices and commands @@ -116,6 +128,8 @@ All take the virt-fragment ``; `FLARE_EDGE=` where noted. | `ui-drive.sh