Add Clockwork Pi board
This commit is contained in:
parent
34697fef8b
commit
ee623a3eaf
5 changed files with 27 additions and 1 deletions
|
|
@ -73,6 +73,8 @@ class Board:
|
|||
board_id = self._pynq_id()
|
||||
elif chip_id == chips.A64:
|
||||
board_id = self._pine64_id()
|
||||
elif chip_id == chips.A33:
|
||||
board_id = self._clockwork_pi_id()
|
||||
return board_id
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
|
@ -252,6 +254,14 @@ class Board:
|
|||
except FileNotFoundError:
|
||||
return None
|
||||
|
||||
def _clockwork_pi_id(self):
|
||||
"""Check what type of Clockwork Pi board."""
|
||||
board_value = self.detector.get_device_model()
|
||||
board = None
|
||||
if board_value and "Clockwork CPI3" in board_value:
|
||||
board = boards.CLOCKWORK_CPI3
|
||||
return board
|
||||
|
||||
@property
|
||||
def any_96boards(self):
|
||||
"""Check whether the current board is any 96boards board."""
|
||||
|
|
@ -322,6 +332,11 @@ class Board:
|
|||
"""Check whether the current board is any Pine64 device."""
|
||||
return self.id in boards._PINE64_DEV_IDS
|
||||
|
||||
@property
|
||||
def any_clockwork_pi_board(self):
|
||||
"""Check whether the current board is any Clockwork Pi device."""
|
||||
return self.CLOCKWORK_CPI3
|
||||
|
||||
@property
|
||||
def any_embedded_linux(self):
|
||||
"""Check whether the current board is any embedded Linux device."""
|
||||
|
|
@ -331,7 +346,7 @@ class Board:
|
|||
self.any_giant_board, self.any_jetson_board, self.any_coral_board,
|
||||
self.any_odroid_40_pin, self.any_96boards, self.any_sifive_board,
|
||||
self.any_onion_omega_board, self.any_pine64_board,
|
||||
self.any_pynq_board,
|
||||
self.any_pynq_board, self.any_clockwork_pi_board
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ class Chip:
|
|||
if self.detector.check_dt_compatible_value('fu500'):
|
||||
return chips.HFU540
|
||||
|
||||
if self.detector.check_dt_compatible_value('sun8i-a33'):
|
||||
return chips.A33
|
||||
|
||||
linux_id = None
|
||||
hardware = self.detector.get_cpuinfo_field('Hardware')
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ PYBOARD = "PYBOARD"
|
|||
NODEMCU = "NODEMCU"
|
||||
GIANT_BOARD = "GIANT_BOARD"
|
||||
|
||||
# Clockwork Pi boards
|
||||
CLOCKWORK_CPI3 = "CLOCKWORK_CPI3"
|
||||
|
||||
# Orange Pi boards
|
||||
ORANGE_PI_PC = "ORANGE_PI_PC"
|
||||
ORANGE_PI_R1 = "ORANGE_PI_R1"
|
||||
|
|
|
|||
|
|
@ -24,5 +24,6 @@ MIPS24KC = "MIPS24KC"
|
|||
MIPS24KEC = "MIPS24KEC"
|
||||
ZYNQ7000 = "ZYNQ7000"
|
||||
A64 = "A64"
|
||||
A33 = "A33"
|
||||
|
||||
BCM_RANGE = {'BCM2708', 'BCM2709', 'BCM2711', 'BCM2835', 'BCM2837'}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ print("Is this a Giant Board?", detector.board.GIANT_BOARD)
|
|||
print("Is this a Coral Edge TPU?", detector.board.CORAL_EDGE_TPU_DEV)
|
||||
print("Is this a SiFive Unleashed? ", detector.board.SIFIVE_UNLEASHED)
|
||||
print("Is this a PYNQ Board?", detector.board.PYNQ_Z1 | detector.board.PYNQ_Z2)
|
||||
print("Is this a Clockwork Pi board?", detector.board.any_clockwork_pi_board)
|
||||
print("Is this an embedded Linux system?", detector.board.any_embedded_linux)
|
||||
print("Is this a generic Linux PC?", detector.board.GENERIC_LINUX_PC)
|
||||
print("Is this an OS environment variable special case?", detector.board.FTDI_FT232H |
|
||||
|
|
@ -44,3 +45,6 @@ if detector.board.any_onion_omega_board:
|
|||
|
||||
if detector.board.any_pine64_board:
|
||||
print("Pine64 device detected.")
|
||||
|
||||
if detector.board.any_clockwork_pi:
|
||||
print("Clockwork Pi device detected.")
|
||||
|
|
|
|||
Loading…
Reference in a new issue