Add BeagleBone AI Detection

This commit is contained in:
Melissa LeBlanc-Williams 2021-01-18 11:19:27 -08:00
parent f7f06c37cd
commit 01b3d6ecfd
4 changed files with 14 additions and 0 deletions

View file

@ -75,6 +75,8 @@ class Board:
board_id = self._pi_id()
elif chip_id == chips.AM33XX:
board_id = self._beaglebone_id()
elif chip_id == chips.DRA74X:
board_id = self._bbai_id()
elif chip_id == chips.GENERIC_X86:
board_id = boards.GENERIC_LINUX_PC
elif chip_id == chips.SUN8I:
@ -232,6 +234,13 @@ class Board:
# pylint: enable=no-self-use
def _bbai_id(self):
"""Try to detect id of a Beaglebone AI related board."""
board_value = self.detector.get_device_model()
if "BeagleBone AI" in board_value:
return boards.BEAGLEBONE_AI
return None
# pylint: disable=too-many-return-statements
def _armbian_id(self):
"""Check whether the current board is an OrangePi board."""

View file

@ -239,6 +239,8 @@ class Chip:
if not linux_id:
if "AM33XX" in hardware:
linux_id = chips.AM33XX
elif "DRA74X" in hardware:
linux_id = chips.DRA74X
elif "sun8i" in hardware:
linux_id = chips.SUN8I
elif "ODROIDC" in hardware:

View file

@ -12,6 +12,7 @@ BEAGLEBONE_BLACK_INDUSTRIAL = "BEAGLEBONE_BLACK_INDUSTRIAL"
BEAGLEBONE_ENHANCED = "BEAGLEBONE_ENHANCED"
BEAGLEBONE_USOMIQ = "BEAGLEBONE_USOMIQ"
BEAGLEBONE_AIR = "BEAGLEBONE_AIR"
BEAGLEBONE_AI = "BEAGLEBONE_AI"
BEAGLEBONE_POCKETBONE = "BEAGLEBONE_POCKETBONE"
BEAGLELOGIC_STANDALONE = "BEAGLELOGIC_STANDALONE"
OSD3358_DEV_BOARD = "OSD3358_DEV_BOARD"
@ -253,6 +254,7 @@ _BEAGLEBONE_IDS = (
BEAGLEBONE_ENHANCED,
BEAGLEBONE_USOMIQ,
BEAGLEBONE_AIR,
BEAGLEBONE_AI,
BEAGLEBONE_POCKETBONE,
BEAGLELOGIC_STANDALONE,
OSD3358_DEV_BOARD,

View file

@ -1,5 +1,6 @@
"""Definition of chips."""
AM33XX = "AM33XX"
DRA74X = "DRA74X"
IMX6ULL = "IMX6ULL"
IMX8MX = "IMX8MX"
BCM2XXX = "BCM2XXX"