qemu: let a job without the cross compiler use a prebuilt panel BusyBox (flare-edge#2210) #38

Merged
noah merged 2 commits from rb/ln-rig-busybox-prebuilt into rebuild 2026-10-29 09:23:28 -06:00
Owner

Refs flare-edge#2210 (second SDK half; stacked on #37, which is merged).

Why

The flare-edge flow jobs that boot the rig get the BusyBox binary from the image build job's artifact and have no cross compiler. RIG_BUSYBOX=panel always ran build-busybox.sh, so those jobs could not use the panel BusyBox. Installing the cross compiler in every flow job costs apt time per job and gives a second binary per job. Keeping the multiarch binary as a fallback is what hid flare-edge #1903, #2002 and #1349.

What

  • qemu/lib.sh: qemu_busybox_panel_inputs, one sha256 over the source pin and every committed input under qemu/busybox/ (no compiler). With RIG_BUSYBOX=panel and BUSYBOX set, qemu_get_busybox takes that binary only when BUSYBOX.inputs equals the value for this tree; otherwise it fails closed. The source pin moved here from build-busybox.sh.
  • qemu/build-busybox.sh writes <binary>.inputs next to the binary, also on the up-to-date path, and removes a stale one before a rebuild.
  • qemu/tests/busybox-panel-test.sh: 6 new cases: missing, foreign and matching .inputs, a missing binary, and a config edit and a patch edit changing the inputs.
  • CI qemu-tools also builds a panel initramfs from the prebuilt binary.
  • qemu/README.md, qemu/busybox/README.md updated.

The default stays RIG_BUSYBOX=multiarch, so no existing run changes.

Gate on bfe-mpc-0056 (lane-remote, pass 627)

  • bash qemu/build-busybox.sh: OK, same binary sha256 6d949435... as #37.
  • bash qemu/tests/busybox-panel-test.sh: all checks passed (6 new cases).
  • QEMU_USER=qemu-arm bash qemu/tests/busybox-panel-help.sh: 282 applets, list and --help equal to the panel's.
  • RIG_BUSYBOX=panel BUSYBOX=qemu/out/busybox-armv7l-panel bash qemu/mkinitramfs.sh: OK.
  • busybox-fetch, init-chain, console-shell, stage-rootfs-perms, rootfs-overlay tests: pass.
  • 4/4 mutants of the new checks caught.
  • shellcheck: the first CI run (9610) failed qemu-tools on two info notes from shellcheck 0.9.0 (SC2015 in qemu_get_busybox, SC2012 in the test). 8fc3297 rewrites both with no behaviour change. CI's exact shellcheck -x ... command is now clean on the workstation (0.10.0, which reports the same two notes on 820af4b). After 8fc3297 on 0056: build OK, busybox-panel-test all checks passed, mkinitramfs with the prebuilt binary OK, and a foreign .inputs is refused (exit 1).

The consumer is flare-edge branch rb/w31-rig-busybox-panel (SDK pin to this branch, tools/ci-stage-qemu-busybox.sh in the 5 rig jobs). It was checked end to end against this commit: the stager, the env and mkinitramfs used the prebuilt binary, and the initramfs /bin/busybox is 6d949435. Its PR opens after this merges, with the pin on the merge commit.

Generated with Claude Code
https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG

Refs flare-edge#2210 (second SDK half; stacked on #37, which is merged). ## Why The flare-edge flow jobs that boot the rig get the BusyBox binary from the image build job's artifact and have no cross compiler. `RIG_BUSYBOX=panel` always ran `build-busybox.sh`, so those jobs could not use the panel BusyBox. Installing the cross compiler in every flow job costs apt time per job and gives a second binary per job. Keeping the multiarch binary as a fallback is what hid flare-edge #1903, #2002 and #1349. ## What - `qemu/lib.sh`: `qemu_busybox_panel_inputs`, one sha256 over the source pin and every committed input under `qemu/busybox/` (no compiler). With `RIG_BUSYBOX=panel` and `BUSYBOX` set, `qemu_get_busybox` takes that binary only when `BUSYBOX.inputs` equals the value for this tree; otherwise it fails closed. The source pin moved here from `build-busybox.sh`. - `qemu/build-busybox.sh` writes `<binary>.inputs` next to the binary, also on the up-to-date path, and removes a stale one before a rebuild. - `qemu/tests/busybox-panel-test.sh`: 6 new cases: missing, foreign and matching `.inputs`, a missing binary, and a config edit and a patch edit changing the inputs. - CI qemu-tools also builds a panel initramfs from the prebuilt binary. - `qemu/README.md`, `qemu/busybox/README.md` updated. The default stays `RIG_BUSYBOX=multiarch`, so no existing run changes. ## Gate on bfe-mpc-0056 (lane-remote, pass 627) - `bash qemu/build-busybox.sh`: OK, same binary sha256 6d949435... as #37. - `bash qemu/tests/busybox-panel-test.sh`: all checks passed (6 new cases). - `QEMU_USER=qemu-arm bash qemu/tests/busybox-panel-help.sh`: 282 applets, list and `--help` equal to the panel's. - `RIG_BUSYBOX=panel BUSYBOX=qemu/out/busybox-armv7l-panel bash qemu/mkinitramfs.sh`: OK. - busybox-fetch, init-chain, console-shell, stage-rootfs-perms, rootfs-overlay tests: pass. - 4/4 mutants of the new checks caught. - shellcheck: the first CI run (9610) failed qemu-tools on two info notes from shellcheck 0.9.0 (SC2015 in `qemu_get_busybox`, SC2012 in the test). 8fc3297 rewrites both with no behaviour change. CI's exact `shellcheck -x ...` command is now clean on the workstation (0.10.0, which reports the same two notes on 820af4b). After 8fc3297 on 0056: build OK, busybox-panel-test all checks passed, mkinitramfs with the prebuilt binary OK, and a foreign `.inputs` is refused (exit 1). The consumer is flare-edge branch rb/w31-rig-busybox-panel (SDK pin to this branch, tools/ci-stage-qemu-busybox.sh in the 5 rig jobs). It was checked end to end against this commit: the stager, the env and mkinitramfs used the prebuilt binary, and the initramfs `/bin/busybox` is 6d949435. Its PR opens after this merges, with the pin on the merge commit. Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah added 1 commit 2026-10-29 08:47:14 -06:00
qemu: let a job without the cross compiler use a prebuilt panel BusyBox (flare-edge#2210)
ci / test (push) Successful in 7s
ci / bench (push) Successful in 9s
ci / mcdc (push) Successful in 22s
ci / patches-apply (push) Successful in 50s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / qemu-tools (push) Failing after 27s
ci / quality (push) Successful in 1m17s
ci / badges (push) Skipped
ci / kernel-symbols (push) Successful in 7m7s
ci / test (pull_request) Successful in 9s
ci / bench (pull_request) Successful in 11s
ci / mcdc (pull_request) Successful in 13s
ci / patches-apply (pull_request) Successful in 54s
ci / qemu-tools (pull_request) Failing after 11s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 1m27s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 4m10s
820af4baaa
The flare-edge flow jobs get the rig BusyBox from the image build job's
artifact and have no cross compiler, so RIG_BUSYBOX=panel, which always ran
build-busybox.sh, could not be used there.

- qemu/lib.sh: qemu_busybox_panel_inputs, one sha256 over the source pin
  and every committed input under qemu/busybox/ (no compiler). With
  RIG_BUSYBOX=panel and BUSYBOX set, qemu_get_busybox takes that binary only
  when BUSYBOX.inputs equals the value for this tree; otherwise it fails
  closed. The source pin moved here from build-busybox.sh.
- qemu/build-busybox.sh writes <binary>.inputs next to the binary (also on
  the up-to-date path) and removes a stale one before a rebuild.
- busybox-panel-test.sh: missing, foreign and matching .inputs, a missing
  binary, and a config or patch edit changing the inputs.
- CI qemu-tools: a panel initramfs from the prebuilt binary.

Refs flare-edge#2210

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah added 1 commit 2026-10-29 09:10:40 -06:00
qemu: clear the two shellcheck notes in the prebuilt BusyBox check (flare-edge#2210)
ci / mcdc (push) Successful in 34s
ci / kernel-build (push) Skipped
ci / quality (push) Successful in 46s
ci / bench (push) Successful in 12s
ci / test (push) Successful in 9s
ci / test (pull_request) Successful in 24s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / patches-apply (pull_request) Successful in 21s
ci / prune-artifacts (push) Skipped
ci / patches-apply (push) Successful in 41s
ci / bench (pull_request) Successful in 6s
ci / mcdc (pull_request) Successful in 29s
ci / badges (push) Skipped
ci / kernel-symbols (push) Successful in 1m48s
ci / qemu-tools (push) Successful in 5m39s
ci / quality (pull_request) Successful in 1m44s
ci / badges (pull_request) Skipped
ci / qemu-tools (pull_request) Successful in 3m42s
ci / kernel-symbols (pull_request) Successful in 6m55s
8fc32976a5
CI's shellcheck 0.9.0 failed qemu-tools on #38: SC2015 on the
`[ -f ] && [ = ] || { ... }` refusal in qemu_get_busybox (now an if), and
SC2012 on the `ls | head` that picks a patch to edit in
busybox-panel-test.sh (now find | sort | head). No behaviour change.

Refs flare-edge#2210

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah merged commit ff3d1de088 into rebuild 2026-10-29 09:23:28 -06:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blueflare/bfe-core1106-sdk#38