qemu: build the panel's own BusyBox for the rig (flare-edge#2210)
ci / quality (push) Successful in 2m25s
ci / badges (push) Skipped
ci / mcdc (push) Successful in 29s
ci / prune-artifacts (push) Skipped
ci / test (push) Successful in 13s
ci / bench (push) Successful in 10s
ci / patches-apply (push) Successful in 24s
ci / kernel-build (push) Skipped
ci / mcdc (pull_request) Successful in 21s
ci / bench (pull_request) Successful in 17s
ci / test (pull_request) Successful in 14s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / qemu-tools (push) Successful in 4m32s
ci / kernel-symbols (push) Successful in 4m28s
ci / patches-apply (pull_request) Successful in 57s
ci / qemu-tools (pull_request) Successful in 3m8s
ci / kernel-symbols (pull_request) Successful in 6m42s
ci / quality (pull_request) Successful in 2m19s
ci / badges (pull_request) Skipped

The rig runs busybox.net's 1.31.0 multiarch binary, not the image's 1.37.0
with its applet config, so a script calling an applet or option the panel
lacks (#1903 setpriv --reuid, #2002 stat, #1349 flock -w) passes in the rig
and breaks on a panel.

- qemu/busybox/panel.config: the image's config, rebuilt from Buildroot
  2025.02.8 busybox.config plus 0001-busybox-applets.patch, resolved for
  1.37.0 as Buildroot does. patches/: Buildroot's 11 busybox patches.
  rig.fragment: static link and BusyBox's own passwd readers only.
  applets.txt and help.txt: the bench a capture (image 417a66b).
- qemu/build-busybox.sh: pinned 1.37.0 source, fails on any Kconfig rewrite
  of the config, an applet list other than the panel's, or a dynamic binary.
- qemu/lib.sh: RIG_BUSYBOX=panel selects it (default stays multiarch);
  the bounded verified download is now qemu_fetch_verified.
- warden.shell uses warden_console_shell: cttyhack where it exists, else
  setsid -c on the console tty (the panel's BusyBox has no cttyhack).
- CI: offline tests in qemu-tools, a build there checked against every
  applet's --help from the panel through qemu-user, and a second boot smoke
  with the panel initramfs in kernel-build.

Refs flare-edge#2210

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
This commit is contained in:
BFE Engineering
2026-10-29 07:36:25 -06:00
co-authored by Claude Opus 5.5
parent 4d30c3083b
commit 37037926df
29 changed files with 4918 additions and 32 deletions
+32
View File
@@ -178,6 +178,18 @@ jobs:
if command -v busybox >/dev/null; then
WARDEN_TEST_SH="busybox sh" bash qemu/tests/init-chain-test.sh
fi
- name: rig debug shell works without cttyhack (flare-edge#2210)
# The panel's BusyBox has no cttyhack; warden.shell then opens the
# console tty itself. Once more under busybox sh, the rig's own shell.
run: |
bash qemu/tests/console-shell-test.sh
if command -v busybox >/dev/null; then
WARDEN_TEST_SH="busybox sh" bash qemu/tests/console-shell-test.sh
fi
- name: panel BusyBox config and build helpers (flare-edge#2210)
# panel.config carries the image's applet patch, the rig fragment only
# changes linking, Kconfig rewrites and applet drift are caught: offline.
run: bash qemu/tests/busybox-panel-test.sh
- name: ui-drive.sh / ui-shot.sh UI start wait regression test (flare-edge#2295)
# The console line that means "UI started" differs between a direct
# start and a shipped init chain boot; every marker is checked
@@ -247,6 +259,21 @@ jobs:
run: bash qemu/mkinitramfs.sh
- name: build A/B disk image
run: bash qemu/mkimage.sh
- name: cache panel BusyBox source
uses: actions/cache@v4
with:
path: qemu/out/busybox-1.37.0.tar.bz2
key: busybox-src-1.37.0
- name: build the panel BusyBox and check it against the bench capture (flare-edge#2210)
# The image's BusyBox version, applet config and Buildroot patches,
# linked static (qemu/build-busybox.sh). Its applet list and every
# applet's --help must equal the panel's own binary's (captured on
# bench a), run here through qemu-user. Then an initramfs with it.
run: |
sudo apt-get install -y -qq gcc-arm-linux-gnueabihf qemu-user
bash qemu/build-busybox.sh
QEMU_USER="qemu-arm" bash qemu/tests/busybox-panel-help.sh
RIG_BUSYBOX=panel bash qemu/mkinitramfs.sh
kernel-symbols:
# The symbol gate (rebuild M0, kernel_symbols_exist): expand the real
@@ -433,6 +460,11 @@ jobs:
bash qemu/mkinitramfs.sh
bash qemu/tests/boot-smoke.sh \
"$RUNNER_TEMP/kbuild-out/linux-6.18.46/arch/arm/boot/zImage"
# Once more with the panel's BusyBox (RIG_BUSYBOX=panel, flare-edge#2210).
OUT="$RUNNER_TEMP/panel-rig" RIG_BUSYBOX=panel bash qemu/mkinitramfs.sh
bash qemu/tests/boot-smoke.sh \
"$RUNNER_TEMP/kbuild-out/linux-6.18.46/arch/arm/boot/zImage" \
"$RUNNER_TEMP/panel-rig/initramfs.cpio.gz"
# Best-effort: the build IS the gate. Uploading the zImage/dtb to GitHub
# artifact storage can fail on an account-wide storage-quota hit (recalculated
# every 6-12h) that has nothing to do with this build. Don't red-X a good