Skip to content

add support for 32-bit ARM (ARMv7) builds#768

Merged
yinwm merged 7 commits intosipeed:mainfrom
avaksru:main
Feb 26, 2026
Merged

add support for 32-bit ARM (ARMv7) builds#768
yinwm merged 7 commits intosipeed:mainfrom
avaksru:main

Conversation

@avaksru
Copy link
Contributor

@avaksru avaksru commented Feb 25, 2026

📝 Description

🗣️ Type of Change

  • ✨This PR adds build support for 32-bit ARM architectures (ARMv7 and older) to expand the range of compatible devices, including Raspberry Pi 1/2/3 and other ARM-based single-board computers.

🧪 Test Environment

  • Hardware: Geniatech GTW360
  • CPU: NXP i.MX6ULL (ARM Cortex-A7 single core, industrial grade)
  • CPU Frequency: 792 MHz
  • Internal Memory: 512 MB DDR3 (options: 256 MB / 1 GB)
  • Internal Storage: 8 GB eMMC (options: 4 GB)
  • OS: OpenLumi (OpenWrt 24.10.0)>
  • Model/Provider: OpenRouter
  • Channels: auto

📸 Evidence (Optional)

Click to view Logs/Screenshots image

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

@yinwm
Copy link
Collaborator

yinwm commented Feb 25, 2026

Code Review: PR #768


Overview

This PR adds 32-bit ARM (ARMv7) build support to enable picoclaw to run on devices like Raspberry Pi 1/2/3.


Code Changes

Makefile:

+ GOOS=linux GOARCH=arm GOARM=7 $(GO) build $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME)-linux-armv7l ./$(CMD_DIR)

.goreleaser.yaml:

+ goarm:
+     - "7"
+     - "6"
+     - "5"

Issues

1. 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

  1. Unify Makefile and goreleaser config: Either ARMv7-only for both, or v5/v6/v7 for both
  2. Consider ARMv7-only: Covers most use cases
  3. Update documentation: List supported architectures

Please address these issues before merging.

@xiaket xiaket added type: enhancement New feature or request domain: ci labels Feb 25, 2026
Copy link

@nikolasdehor nikolasdehor left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Collaborator

@yinwm yinwm left a comment

Choose a reason for hiding this comment

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

LGTM

@yinwm yinwm merged commit f244076 into sipeed:main Feb 26, 2026
2 checks passed
@yinwm
Copy link
Collaborator

yinwm commented Feb 26, 2026

thanks for the pr

@Orgmar
Copy link
Contributor

Orgmar commented Feb 27, 2026

@avaksru Nice work getting PicoClaw running on ARMv7! Testing on a Geniatech GTW360 with an i.MX6ULL is a great real-world validation for the embedded use case. Expanding device compatibility is really valuable for the project.

We're putting together the PicoClaw Dev Group on Discord for contributors to collaborate. If you'd like to join, send an email to support@sipeed.com with the subject [Join PicoClaw Dev Group] avaksru and we'll get you the invite link.

liangzhang-keepmoving pushed a commit to liangzhang-keepmoving/picoclaw that referenced this pull request Mar 2, 2026
hyperwd pushed a commit to hyperwd/picoclaw that referenced this pull request Mar 5, 2026
hyperwd pushed a commit to hyperwd/picoclaw that referenced this pull request Mar 5, 2026
add support for 32-bit ARM (ARMv7) builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: ci type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants