add support for 32-bit ARM (ARMv7) builds#768
Conversation
Comment out Docker Hub login steps in release workflow.
Comment out dockers_v2 configuration in .goreleaser.yaml
Re-enable dockers_v2 configuration for picoclaw with specified details.
Code Review: PR #768OverviewThis PR adds 32-bit ARM (ARMv7) build support to enable picoclaw to run on devices like Raspberry Pi 1/2/3. Code ChangesMakefile: + GOOS=linux GOARCH=arm GOARM=7 $(GO) build $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME)-linux-armv7l ./$(CMD_DIR).goreleaser.yaml: + goarm:
+ - "7"
+ - "6"
+ - "5"Issues1. Makefile and goreleaser are inconsistent
|
| File | ARM versions built |
|---|---|
| Makefile | ARMv7 only (GOARM=7) |
| goreleaser | ARMv5, ARMv6, ARMv7 |
Problem: make build-all and goreleaser will produce different sets of binaries.
Suggestion: Keep them consistent. Either both support only ARMv7, or both support 5/6/7.
2. Are ARMv5/v6 necessary?
ARMv5 is from 2000s, ARMv6 is from around 2007. Modern boards:
- Raspberry Pi 1/Zero: ARMv6
- Raspberry Pi 2/3: ARMv7
- Other modern boards: ARMv7+
Problem: Supporting ARMv5/v6 adds maintenance burden for a small user base.
Suggestion:
- Keep only ARMv7 (the actual test device is ARMv7)
- Add ARMv6 if needed for Raspberry Pi Zero
- Drop ARMv5 (obsolete hardware)
3. Output file naming
Makefile uses linux-armv7l, while goreleaser will generate names like linux_arm_v5, linux_arm_v6, etc. by default.
Suggestion: Verify goreleaser naming config to keep consistent with Makefile.
4. Documentation not updated
The checklist clearly shows ❌ for "I have updated the documentation accordingly."
Suggestion: At least update the README to list supported architectures.
Summary
| Aspect | Rating |
|---|---|
| Value | ⭐⭐⭐⭐ Expands hardware support |
| Code Quality | ⭐⭐⭐ Makefile/goreleaser inconsistency |
| Arch Selection | ⭐⭐⭐ ARMv5/v6 necessity questionable |
| Documentation | ⭐⭐ Not updated |
Recommendations
- Unify Makefile and goreleaser config: Either ARMv7-only for both, or v5/v6/v7 for both
- Consider ARMv7-only: Covers most use cases
- Update documentation: List supported architectures
Please address these issues before merging.
nikolasdehor
left a comment
There was a problem hiding this comment.
Minimal and focused: adds ARMv7 to both the Makefile build-all target and .goreleaser.yaml. The GOARM=7 setting is the right choice for ARMv7 (hard-float).
One thing to verify: the .goreleaser.yaml change adds goarm: ["7"] at the top level under builds, which means it applies to ALL architectures, not just arm. GoReleaser should ignore goarm for non-arm architectures, but worth double-checking. The more explicit approach would be to use an overrides block, but in practice GoReleaser handles this correctly.
Also, the Makefile should probably add auto-detection for armv7l (the common uname -m output on ARMv7 boards) similar to the aarch64 -> arm64 mapping. But that can be a follow-up.
Tested on real hardware (Geniatech GTW360 / ARM Cortex-A7) — good to see evidence of actual usage.
LGTM.
📝 Description
🗣️ Type of Change
🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
☑️ Checklist