scansw: remove pre-built armhf binary; fix Pi 5 aarch64 support#19
Open
dmz006 wants to merge 1 commit into
Open
scansw: remove pre-built armhf binary; fix Pi 5 aarch64 support#19dmz006 wants to merge 1 commit into
dmz006 wants to merge 1 commit into
Conversation
The repo shipped a pre-built 32-bit ARM (armhf) `scansw` binary: ELF 32-bit LSB executable, ARM, EABI5 ... dynamically linked, interpreter /lib/ld-linux-armhf.so.3 On a Raspberry Pi 5 running 64-bit Raspberry Pi OS (aarch64), `make` sees the binary as already built and skips compilation. The result is an armhf binary that fails at runtime with "Exec format error" when the GPIO driver tries to exec it, causing all lamp/switch functionality to silently fail. Fix: add `scansw` to .gitignore so `make` always compiles from source. The source already supports Pi 5's RP1 chip — no code changes needed. `pinctrl/gpiochip_rp1.c` handles the new GPIO interface correctly on both armhf and aarch64; the binary just had to be compiled for the right architecture. This was found while building a Docker/container image for arm64 (see upstream issue obsolescence#15). Removing the binary unblocks all Pi 5 + 64-bit OS users without changing anything for existing 32-bit installs. Users with the old binary in their working tree: delete it and rerun `make` in this directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The repo ships a pre-built 32-bit ARM (armhf)
scanswbinary:On a Raspberry Pi 5 running 64-bit Raspberry Pi OS (
aarch64),makesees the binary as already built and skips compilation. The result is an armhf binary that fails at runtime withExec format errorwhen the GPIO driver tries to exec it — all lamp and switch functionality silently fails. The lamps never light up and the boot-select encoder does nothing.Root cause
scanswis committed to the repo but not listed in.gitignore. Whenmakeruns it checks whether the output file exists, seesscansw, and skips the compile step — even though the existing binary is the wrong architecture.Fix
This PR:
scanswto a.gitignorein thescanswitch/directory so the binary is never committed again andmakealways compiles from source.git rm --cached).README.mdfor Pi 5 / 64-bit OS users.No source code changes. The C code already supports Pi 5's RP1 chip via
pinctrl/gpiochip_rp1.c— it just needed to be compiled for the right architecture.Tested
rm scansw && makeinsrc/11_pidp_server/scanswitch/produces an aarch64 binaryRelated
Impact on 32-bit users
None. Existing armhf users who have
scanswin their working tree won't notice any change —git pullwill simply stop tracking the binary andmakewill rebuild it (correctly, for armhf) the next time it runs.