ci(pi-gen): native arm64 runner skips QEMU entirely

usimd/pi-gen-action#179: Trixie + QEMU breaks on x86 runners (arch-test
"arm64: not supported"). Native arm64 runner means no qemu, no binfmt
registration dance — pi-gen runs the chroot directly. Faster too.
This commit is contained in:
Mitchell R 2026-05-20 01:42:30 +02:00
parent 5e1f8f80bc
commit e19dedfe17
No known key found for this signature in database

View file

@ -125,10 +125,13 @@ jobs:
retention-days: 14 retention-days: 14
# ---- Flashable Pi OS Trixie image (aarch64 only) ------------------------- # ---- Flashable Pi OS Trixie image (aarch64 only) -------------------------
# Native arm64 runner avoids QEMU entirely — pi-gen runs faster + sidesteps
# the Trixie binfmt regression (usimd/pi-gen-action#179). With native arm64
# the chroot's binaries match the kernel, so arch-test passes immediately.
image: image:
if: ${{ inputs.build-image }} if: ${{ inputs.build-image }}
needs: binary needs: binary
runs-on: ubuntu-latest runs-on: blacksmith-4vcpu-ubuntu-2404-arm
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
with: with:
@ -168,32 +171,6 @@ jobs:
deploy/pi-gen/stage-betterframe-client/01-install-kiosk/files/ deploy/pi-gen/stage-betterframe-client/01-install-kiosk/files/
chmod +x deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run-chroot.sh chmod +x deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run-chroot.sh
# x86 runner can't natively execute the arm64 binaries pi-gen drops
# into the chroot. tonistiigi/binfmt registers QEMU with the F flag
# (kernel preloads the static binary), making it visible inside
# pi-gen's nested container kernel-namespace-share. This is what
# docker/setup-qemu-action wraps, called directly here so we control
# the flags + can sanity-check after.
- name: Register QEMU binfmt for arm64
# Host-install qemu-user-static (Debian/Ubuntu package). It auto-
# registers binfmt_misc entries pointing at
# /usr/bin/qemu-aarch64-static. The Debian post-install also sets
# the F (fix-binary) flag so the kernel preloads the static binary
# bytes — meaning the chroot inside pi-gen doesn't need a copy.
# tonistiigi/binfmt only ships /usr/bin/qemu-aarch64 (dynamic),
# which fails inside a chroot at exec time when ld.so + libs are
# missing. Pi-gen specifically wants the -static path.
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
qemu-user-static binfmt-support
sudo update-binfmts --enable qemu-aarch64
echo "--- binfmt_misc registrations ---"
ls -la /proc/sys/fs/binfmt_misc/ || true
echo "--- qemu-aarch64 detail (interpreter should be -static) ---"
cat /proc/sys/fs/binfmt_misc/qemu-aarch64 || true
file /usr/bin/qemu-aarch64-static || true
- name: Build Pi image (pi-gen) - name: Build Pi image (pi-gen)
uses: usimd/pi-gen-action@v1 uses: usimd/pi-gen-action@v1
with: with: