Skip to content

Commit da8460f

Browse files
committed
Adding support for BPI-M2-Berry Board
1 parent 9082e33 commit da8460f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ def _tisk_id(self) -> Optional[str]:
337337
def _armbian_id(self) -> Optional[str]:
338338
"""Check whether the current board is an OrangePi board."""
339339
board_value = self.detector.get_armbian_release_field("BOARD")
340+
print(self.detector.get_device_model())
340341
board = None
341342

342343
if board_value == "orangepipc":
@@ -373,6 +374,8 @@ def _armbian_id(self) -> Optional[str]:
373374
board = boards.BANANA_PI_M2_ZERO
374375
elif board_value == "bananapim2plus":
375376
board = boards.BANANA_PI_M2_PLUS
377+
elif board_value == "bananapim2berry":
378+
board = boards.BANANA_PI_M2_BERRY
376379
elif board_value == "bananapim5":
377380
board = boards.BANANA_PI_M5
378381
elif board_value == "orangepizeroplus2-h5":

adafruit_platformdetect/constants/boards.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
# Banana Pi boards
6666
BANANA_PI_M2_ZERO = "BANANA_PI_M2_ZERO"
6767
BANANA_PI_M2_PLUS = "BANANA_PI_M2_PLUS"
68+
BANANA_PI_M2_BERRY = "BANANA_PI_M2_BERRY"
6869
BANANA_PI_M5 = "BANANA_PI_M5"
6970

7071
# NVIDIA Jetson boards
@@ -238,7 +239,7 @@
238239
_NANOPI_IDS = (NANOPI_NEO_AIR, NANOPI_DUO2, NANOPI_NEO)
239240

240241
# BananaPI
241-
_BANANA_PI_IDS = (BANANA_PI_M2_ZERO, BANANA_PI_M2_PLUS, BANANA_PI_M5)
242+
_BANANA_PI_IDS = (BANANA_PI_M2_ZERO, BANANA_PI_M2_PLUS, BANANA_PI_M2_BERRY, BANANA_PI_M5)
242243

243244
# LubanCat
244245
_LUBANCAT_IDS = (

0 commit comments

Comments
 (0)