Merge pull request #305 from Xenokrates/bananapro

Added support for board 'Lemaker Banana Pro'
This commit is contained in:
Melissa LeBlanc-Williams 2023-07-28 09:44:02 -07:00 committed by GitHub
commit af62ea4713
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 2 deletions

View file

@ -342,7 +342,7 @@ class Board:
# pylint: disable=too-many-return-statements
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 = None
@ -384,6 +384,8 @@ class Board:
board = boards.BANANA_PI_M2_BERRY
elif board_value == "bananapim5":
board = boards.BANANA_PI_M5
elif board_value == "bananapipro":
board = boards.LEMAKER_BANANA_PRO
elif board_value == "orangepizeroplus2-h5":
board = boards.ORANGE_PI_ZERO_PLUS_2H5
elif board_value == "orangepizeroplus":
@ -860,6 +862,11 @@ class Board:
"""Check whether the current board is any BananaPi-family system."""
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
def any_maaxboard(self) -> bool:
"""Check whether the current board is any BananaPi-family system."""
@ -937,6 +944,7 @@ class Board:
yield self.any_stm32mp1
yield self.any_lubancat
yield self.any_bananapi
yield self.any_lemaker
yield self.any_maaxboard
yield self.any_tisk_board
yield self.any_siemens_simatic_iot2000

View file

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

View file

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