Skip to content

ci: add armv6 (Raspberry Pi B/Zero) build support#1400

Open
b0bbywan wants to merge 4 commits into
Spotifyd:masterfrom
b0bbywan:ci/armv6
Open

ci: add armv6 (Raspberry Pi B/Zero) build support#1400
b0bbywan wants to merge 4 commits into
Spotifyd:masterfrom
b0bbywan:ci/armv6

Conversation

@b0bbywan

Copy link
Copy Markdown

Spotifyd dropped support for armhf after v0.3.5. This intends to bring it back

Cross-compilation via cross doesn't work for armv6 due to C dependencies (alsa, dbus, pulseaudio) and bindgen (aws-lc-rs). Instead, build natively under QEMU using a RaspiOS container, forcing the correct rustup host triple (arm-unknown-linux-gnueabihf) since QEMU reports armv7 by default.

  • Add .github/Dockerfile.armv6 for QEMU-native builds
  • Add armv6 to the CD matrix (linux only, slim/default/full)
  • Use docker buildx with GHA layer cache in the CD workflow
  • Add dist/ to .gitignore for local build

I've successfully tested the slim and full builds on Raspberry B and B+. The first build time is quite long (more than one hour) due to QEMU virtualization. It uses a rust cache to speedup a bit. We could also push the build image on ghcr to gain a little time.

Let me know if that's ok with you or if I need to make some change.

Thanks for spotifyd !

Cross-compilation via `cross` doesn't work for armv6 due to C
dependencies (alsa, dbus, pulseaudio) and bindgen (aws-lc-rs).
Instead, build natively under QEMU using a RaspiOS container,
forcing the correct rustup host triple (arm-unknown-linux-gnueabihf)
since QEMU reports armv7 by default.

- Add .github/Dockerfile.armv6 for QEMU-native builds
- Add armv6 to the CD matrix (linux only, slim/default/full)
- Use docker buildx with GHA layer cache in the CD workflow
@b0bbywan

Copy link
Copy Markdown
Author

#1389 this issue could be fixed in that PR, let me know !

b0bbywan and others added 3 commits March 21, 2026 20:31
…ildx

aarch64 no longer uses ubuntu-22.04-arm; armv7 no longer uses `cross`.
Both now build via docker buildx + QEMU like armv6, using docker_platform
matrix entries. Artifact upload path also cleaned up (no more matrix.target).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generates a .deb per arch (amd64, arm64, armhf, armel) after each Linux
build, with the user systemd service installed in /usr/lib/systemd/user/.
Version is derived from the git tag; falls back to 0.0.0+<sha> on master.
.deb artifacts are published directly in GitHub releases alongside tar.gz.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@b0bbywan

Copy link
Copy Markdown
Author

Hello,

Just so you know, I'm working on an open-source Volumio alternative (https://beta.odio.love) that ships spotifyd as a dependency.

I noticed all ARM builds were broken due to OpenSSL 1.1 linkage (issue #1389), so I switched to native QEMU-based builds inside RaspiOS containers in my fork. This produces binaries correctly linked against OpenSSL 3, and I've tested them on real hardware (armv6, armv7, aarch64). I also publish them through my own APT repo with proper Debian packaging.

I submitted PR #1400 with the CI changes for armv6. I'd love to work together on extending this approach to all ARM targets and shipping working binaries on modern distros.

Happy to help however I can, let me know if you'd like to discuss the approach.

@robertaistleitner

Copy link
Copy Markdown

@b0bbywan thanks for your fixes on making this work on older raspberries again. I just updated my Raspberry 2B to Trixie and also upgraded to the latest spotifyd which no longer works in 0.4.2 - your build 0.4.4 (armv7-slim) from https://github.com/b0bbywan/spotifyd/releases works perfectly fine!

Comment thread .github/Dockerfile.armv6
# arm64/arm: RaspiOS (Trixie), runs natively via QEMU binfmt_misc —
# no cross-compiler needed, even for bindgen
FROM debian:trixie-slim AS base-amd64
FROM vascoguita/raspios:arm64 AS base-arm64

@MichaIng MichaIng Jul 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Raspberry Pi OS for arm64? I'd use official Debian slim really for everything but armv6. Those are marked as official Docker images, assured to remain stable, updated, slim etc. Even if Raspberry Pi OS uses the Debian repository for arm64, it adds their own Raspberry Pi repo for kernel and also some other/overlapping library packages on top, potentially causing conflicts on non RPi systems, overhead in every case, and vascoguita is not a trusted publisher.

@MichaIng

MichaIng commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Note that #1387 fixed the libssl1.1 issue for aarch64/arm64 already. #1420 would do so for armv7l/armhf, still using cross-rs, but its latest commit and edge images, which use Ubuntu 24.04 now, i.e. libssl3.

So building on Raspberry Pi OS and via QEMU remains necessary for armv6hf only, not supported by the cross-rs Ubuntu base images. It might have benefits to drop cross-rs for own QEMU-emulated builds, so everything is under local control, instead of relying on cross-rs which took years to finally bump Ubuntu base images to a usable version. And this is still no tagged release. But QEMU-emulated builds are significantly slower compared to cross-compiling. Total CD duration above 30 minutes vs below 10 minutes with cross-compiling. A single build with cross-rs takes ~5 minutes. 30 minutes seems totally acceptable though, I expected it to take longer.

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.

3 participants