Files
bfe-core1106-sdk/qemu/busybox
BFE EngineeringandClaude Opus 5.5 820af4baaa
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
qemu: let a job without the cross compiler use a prebuilt panel BusyBox (flare-edge#2210)
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
2026-10-29 08:34:45 -06:00
..

The panel's BusyBox, for the rig

RIG_BUSYBOX=panel (qemu/lib.sh) makes the rig run the image's own BusyBox instead of the busybox.net 1.31.0 multiarch binary, so a script that calls an applet or option the panel lacks fails in the rig as it fails on a panel (flare-edge#2210; #1903 setpriv --reuid, #2002 stat, #1349 flock -w). qemu/build-busybox.sh builds it; the default stays multiarch until the flare-edge QEMU jobs switch over.

File What it is
panel.config The image's BusyBox 1.37.0 configuration. Made from Buildroot 2025.02.8 package/busybox/busybox.config (the vendor SDK's base; its header matches the a/ side of the applet patch), with luckfox-sdk-patches/buildroot/patches/0001-busybox-applets.patch applied and then yes "" | make oldconfig in busybox-1.37.0, as Buildroot does for a config written for an older version (it adds TIME64, GETFATTR, FIND_EXEC_OK, IP_LINK_CAN and UDHCPD_BOOTP at their defaults and drops ASH_SLEEP). The time stamp line is dropped.
rig.fragment The rig's only differences: a static link, and BusyBox's own passwd, group and shadow readers (a static glibc binary cannot load NSS modules). Neither adds or removes an applet or option.
patches/ Buildroot 2025.02.8's package/busybox/*.patch, applied in order like the image build does (one of them is what makes tc build with current kernel headers). Commit-message text was changed to ASCII; the diffs are unchanged.
applets.txt busybox --list of the panel (bench a, image 417a66b), the same as flare-edge tests/fixtures/panel-busybox-applets.txt. The build fails when its applet list differs.
help.txt busybox <applet> --help of every applet of the panel, the same as flare-edge tests/fixtures/panel-busybox-help.txt (flare-edge tools/bench/busybox-help/capture.sh). qemu/tests/busybox-panel-help.sh compares the built binary with it.

The Buildroot fixups in busybox.mk that depend on the image's Buildroot options (mdev, init, watchdog, less flags, crypt SHA) are not applied here; the applet list and the per-applet help check would show any of them that changed an applet or an option. When the image's BusyBox changes, update panel.config and patches/ the same way and re-capture applets.txt and help.txt from a panel.

The inputs are pinned (source tarball sha256, these files); the output is not, because each host's compiler gives a different binary. The cache key in $OUT/busybox-armv7l-panel.key covers the tarball, these files and the compiler version.

A job without the cross compiler (a flare-edge flow job, given the binary its image build job made) sets RIG_BUSYBOX=panel BUSYBOX=<binary>. The build writes <binary>.inputs next to it: one sha256 over the source pin and these files, without the compiler (qemu_busybox_panel_inputs in qemu/lib.sh). qemu_get_busybox takes the prebuilt binary only when that file equals the value for its own tree, so a binary built from another config is refused rather than booted.