Added support for board 'Lemaker Banana Pro'

This commit is contained in:
Xenokrates 2023-07-20 09:43:29 +02:00
parent ec110700f4
commit b682743a30
3 changed files with 24 additions and 2 deletions

View file

@ -342,7 +342,7 @@ class Board:
# pylint: disable=too-many-return-statements # pylint: disable=too-many-return-statements
def _armbian_id(self) -> Optional[str]: def _armbian_id(self) -> Optional[str]:
"""Check whether the current board is an OrangePi board.""" """Get the current board via the ARMBIAN release field."""
board_value = self.detector.get_armbian_release_field("BOARD") board_value = self.detector.get_armbian_release_field("BOARD")
board = None board = None
@ -384,6 +384,8 @@ class Board:
board = boards.BANANA_PI_M2_BERRY board = boards.BANANA_PI_M2_BERRY
elif board_value == "bananapim5": elif board_value == "bananapim5":
board = boards.BANANA_PI_M5 board = boards.BANANA_PI_M5
elif board_value == "bananapipro":
board = boards.LEMAKER_BANANA_PRO
elif board_value == "orangepizeroplus2-h5": elif board_value == "orangepizeroplus2-h5":
board = boards.ORANGE_PI_ZERO_PLUS_2H5 board = boards.ORANGE_PI_ZERO_PLUS_2H5
elif board_value == "orangepizeroplus": elif board_value == "orangepizeroplus":
@ -854,6 +856,11 @@ class Board:
"""Check whether the current board is any BananaPi-family system.""" """Check whether the current board is any BananaPi-family system."""
return self.id in boards._BANANA_PI_IDS return self.id in boards._BANANA_PI_IDS
@property
def any_lemaker(self) -> bool:
"""Check whether the current board is any LeMaker board."""
return self.id in boards._LEMAKER_IDS
@property @property
def any_maaxboard(self) -> bool: def any_maaxboard(self) -> bool:
"""Check whether the current board is any BananaPi-family system.""" """Check whether the current board is any BananaPi-family system."""

View file

@ -70,6 +70,9 @@ BANANA_PI_M2_PLUS = "BANANA_PI_M2_PLUS"
BANANA_PI_M2_BERRY = "BANANA_PI_M2_BERRY" BANANA_PI_M2_BERRY = "BANANA_PI_M2_BERRY"
BANANA_PI_M5 = "BANANA_PI_M5" BANANA_PI_M5 = "BANANA_PI_M5"
# LeMaker boards
LEMAKER_BANANA_PRO = "LEMAKER_BANANA_PRO"
# NVIDIA Jetson boards # NVIDIA Jetson boards
JETSON_TX1 = "JETSON_TX1" JETSON_TX1 = "JETSON_TX1"
JETSON_TX2 = "JETSON_TX2" JETSON_TX2 = "JETSON_TX2"
@ -243,7 +246,11 @@ _ORANGE_PI_IDS = (
) )
# NanoPi # NanoPi
_NANOPI_IDS = (NANOPI_NEO_AIR, NANOPI_DUO2, NANOPI_NEO) _NANOPI_IDS = (
NANOPI_NEO_AIR,
NANOPI_DUO2,
NANOPI_NEO,
)
# BananaPI # BananaPI
_BANANA_PI_IDS = ( _BANANA_PI_IDS = (
@ -253,6 +260,11 @@ _BANANA_PI_IDS = (
BANANA_PI_M5, BANANA_PI_M5,
) )
# LeMaker
_LEMAKER_IDS = (
LEMAKER_BANANA_PRO,
)
# LubanCat # LubanCat
_LUBANCAT_IDS = ( _LUBANCAT_IDS = (
LUBANCAT_IMX6ULL, LUBANCAT_IMX6ULL,

View file

@ -85,6 +85,9 @@ if detector.board.any_pynq_board:
if detector.board.any_orange_pi: if detector.board.any_orange_pi:
print("Orange Pi detected.") print("Orange Pi detected.")
if detector.board.any_lemaker:
print("LeMaker board detected.")
if detector.board.any_odroid_40_pin: if detector.board.any_odroid_40_pin:
print("Odroid detected.") print("Odroid detected.")