Skip to content

Commit cbdf403

Browse files
committed
Fix Pinebook detection based on Armbian distro
1 parent 15d3b72 commit cbdf403

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

adafruit_platformdetect/board.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def id(self):
367367
board_id = ONION_OMEGA
368368
elif chip_id == ap_chip.MIPS24KEC:
369369
board_id = ONION_OMEGA2
370-
elif chip_id == ap_chip.SUN50IW1P1:
370+
elif chip_id == ap_chip.PINE64:
371371
board_id = self._pine64_id()
372372
return board_id
373373
# pylint: enable=invalid-name
@@ -423,6 +423,8 @@ def _armbian_id(self):
423423
return ORANGE_PI_R1
424424
if board_value == "orangepizero":
425425
return ORANGE_PI_ZERO
426+
if board_value == "pinebook-a64":
427+
return PINEBOOK
426428
return None
427429

428430
def _sama5_id(self):

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
BINHO = "BINHO"
2525
MIPS24KC = "MIPS24KC"
2626
MIPS24KEC = "MIPS24KEC"
27-
SUN50IW1P1 = "SUN50IW1P1"
27+
PINE64 = "PINE64"
2828

2929
class Chip:
3030
"""Attempt detection of current chip / CPU."""
@@ -128,8 +128,8 @@ def _linux_id(self): # pylint: disable=too-many-branches
128128
linux_id = S922X
129129
elif "SAMA5" in hardware:
130130
linux_id = SAMA5
131-
elif "A64" in hardware:
132-
linux_id = SUN50IW1P1
131+
elif "Pinebook" in hardware:
132+
linux_id = PINE64
133133

134134
return linux_id
135135

0 commit comments

Comments
 (0)