Skip to content

ci: native arm64 runners (untested, isolated from action-plan branch) - #19

Draft
dubpixel wants to merge 2 commits into
mainfrom
ci/native-arm64-runners
Draft

ci: native arm64 runners (untested, isolated from action-plan branch)#19
dubpixel wants to merge 2 commits into
mainfrom
ci/native-arm64-runners

Conversation

@dubpixel

@dubpixel dubpixel commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

Switches both image builders (armbian-builder.yaml, raspios-builder.yaml) from ubuntu-latest (x86_64, QEMU-emulated chroot) to ubuntu-24.04-arm (native arm64, free for public repos). Packer's arm-image plugin already skips its QEMU/binfmt steps when image_arch matches the host's runtime arch -- added image_arch = "arm64" to dpx-buttonode.pkr.hcl to trigger that, and removed the now-dead qemu-user-static install steps.

Deliberately kept off fix/action-plan-batch -- this is a separate, unverified change, and if it breaks the build it shouldn't be confused with a regression in the hardware fixes already tested there.

Test plan

  • A test build actually succeeds on ubuntu-24.04-arm (about to run one)
  • Build time comparison vs. a recent x86_64+QEMU run for the same board/variant
  • Resulting image boots and behaves identically to an x86_64-built one

🤖 Generated with Claude Code

dubpixel and others added 2 commits September 5, 2026 13:46
Both image builds ran on ubuntu-latest (x86_64) and emulated the whole
chroot provisioning stage via qemu-aarch64-static -- every apt-get/dpkg
call inside the mounted arm64 image ran through QEMU user-mode
translation, which is commonly 5-10x slower than native for that kind
of CPU-bound work.

Packer's arm-image plugin already supports skipping this: it only adds
the QEMU/binfmt steps when `!ImageArch.IsNative()`
(pkg/builder/builder.go). Set image_arch = "arm64" in the shared
dpx-buttonode.pkr.hcl and switched both builder workflows to
ubuntu-24.04-arm (free, GitHub-hosted, native arm64) -- with host arch
matching image_arch, the plugin skips QEMU entirely on its own, no
custom logic needed. Removed the now-unnecessary qemu-user-static
install steps.

Verified before touching CI: Packer itself installs via HashiCorp's own
apt repo (multi-arch, resolves correctly on arm64), and
packer-plugin-arm-image v0.2.7 publishes a linux_arm64 build.

Isolated on its own branch off main, not mixed into the action-plan
hardware-fix branch -- this is unverified until a real CI run confirms
it, and a broken build here shouldn't be confused with a regression in
the already-tested fixes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removing it broke the build outright: packer-plugin-arm-image's
Prepare() unconditionally resolves a qemu_binary path via
exec.LookPath, regardless of whether the emulation is actually needed
later -- only its separate Run()-time IsNative() check decides that.
Without the binary present, Prepare() falls back to an "embedded qemu"
feature that's amd64-only and fails outright on arm64:

  embedded qemu is not available - currently, embedded qemu is only
  available for linux amd64. please download qemu-user-static manually

Confirmed via a live test build (33982012810) that failed exactly this
way. Re-added the install -- it's a fast package install, not the slow
part we're trying to avoid, and the plugin's own IsNative() check still
skips actually invoking it during the chroot provisioning.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant