Skip to content

Fix Orange Pi detection on non-Armbian systems (Debian)#412

Merged
makermelissa merged 1 commit intoadafruit:mainfrom
makermelissa-piclaw:fix-orangepi-zero2-debian-detection
Apr 22, 2026
Merged

Fix Orange Pi detection on non-Armbian systems (Debian)#412
makermelissa merged 1 commit intoadafruit:mainfrom
makermelissa-piclaw:fix-orangepi-zero2-debian-detection

Conversation

@makermelissa-piclaw
Copy link
Copy Markdown
Contributor

Summary

Fixes #285 — Orange Pi boards (Zero 2, Zero 3, 3 LTS) were not detected on Debian and other non-Armbian distributions because the detection path relied on _armbian_id() which reads /etc/armbian-release (not present on Debian).

Changes

1. Add _orange_pi_id() to H616 and H6 chip detection paths

The H618 path already included _orange_pi_id() as a fallback, but H616 (used by Orange Pi Zero 2) and H6 (used by Orange Pi 3 LTS) did not. Now all three share the same fallback chain.

2. Expand _orange_pi_id() with additional model strings

Added detection for device-tree model strings (/proc/device-tree/model) used by non-Armbian OSes:

Model String Variants Board Constant
OrangePi Zero2, Orange Pi Zero 2 ORANGE_PI_ZERO_2
OrangePi Zero3, Orange Pi Zero 3 ORANGE_PI_ZERO_3
Orange Pi Zero 2W (space variant) ORANGE_PI_ZERO_2W
Orange Pi 3 LTS, OrangePi 3 LTS ORANGE_PI_3_LTS

The ordering ensures the more specific Zero 2W match is checked before the broader Zero 2 match.

Add _orange_pi_id() to H616 and H6 chip detection paths so that
Orange Pi boards are detected via device-tree model strings on
non-Armbian OS distributions (e.g. Debian).

Expand _orange_pi_id() to handle Orange Pi Zero 2, Zero 3, Zero 2W
(with space variant), and 3 LTS model strings from /proc/device-tree/model.

Fixes adafruit#285
Copy link
Copy Markdown
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

Looks good.

@makermelissa makermelissa merged commit 7d4a594 into adafruit:main Apr 22, 2026
1 check passed
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.

Problem for Orange Pi zeros 2 detection on Debian

2 participants