Added Rock Pi S
This commit is contained in:
parent
879426c430
commit
f9ca2bd0da
5 changed files with 26 additions and 0 deletions
|
|
@ -113,6 +113,8 @@ class Board:
|
|||
board_id = self._pine64_id()
|
||||
elif chip_id == chips.A33:
|
||||
board_id = self._clockwork_pi_id()
|
||||
elif chip_id == chips.RK3308:
|
||||
board_id = self._rock_pi_id()
|
||||
return board_id
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
|
@ -289,6 +291,14 @@ class Board:
|
|||
except FileNotFoundError:
|
||||
return None
|
||||
|
||||
def _rock_pi_id(self):
|
||||
"""Check what type of Rock Pi board."""
|
||||
board_value = self.detector.get_device_model()
|
||||
board = None
|
||||
if board_value and "ROCK Pi S" in board_value:
|
||||
board = boards.ROCK_PI_S
|
||||
return board
|
||||
|
||||
def _clockwork_pi_id(self):
|
||||
"""Check what type of Clockwork Pi board."""
|
||||
board_value = self.detector.get_device_model()
|
||||
|
|
@ -367,6 +377,11 @@ class Board:
|
|||
"""Check whether the current board is any Pine64 device."""
|
||||
return self.id in boards._PINE64_DEV_IDS
|
||||
|
||||
@property
|
||||
def any_rock_pi_board(self):
|
||||
"""Check whether the current board is any Clockwork Pi device."""
|
||||
return self.ROCK_PI_S
|
||||
|
||||
@property
|
||||
def any_clockwork_pi_board(self):
|
||||
"""Check whether the current board is any Clockwork Pi device."""
|
||||
|
|
@ -389,6 +404,7 @@ class Board:
|
|||
self.any_onion_omega_board,
|
||||
self.any_pine64_board,
|
||||
self.any_pynq_board,
|
||||
self.any_rock_pi_board,
|
||||
self.any_clockwork_pi_board,
|
||||
]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -118,6 +118,9 @@ class Chip:
|
|||
if self.detector.check_dt_compatible_value("sun8i-a33"):
|
||||
return chips.A33
|
||||
|
||||
if self.detector.check_dt_compatible_value("rockchip,rk3308"):
|
||||
return chips.RK3308
|
||||
|
||||
linux_id = None
|
||||
hardware = self.detector.get_cpuinfo_field("Hardware")
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,8 @@ PINE64 = "PINE64"
|
|||
PINEBOOK = "PINEBOOK"
|
||||
PINEPHONE = "PINEPHONE"
|
||||
|
||||
ROCK_PI_S = "ROCK_PI_S"
|
||||
|
||||
# pylint: enable=bad-whitespace
|
||||
|
||||
# OrangePI
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@ MIPS24KEC = "MIPS24KEC"
|
|||
ZYNQ7000 = "ZYNQ7000"
|
||||
A64 = "A64"
|
||||
A33 = "A33"
|
||||
RK3308 = "RK3308"
|
||||
|
||||
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 Rock Pi board?", detector.board.any_rock_pi_board)
|
||||
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)
|
||||
|
|
@ -48,5 +49,8 @@ if detector.board.any_onion_omega_board:
|
|||
if detector.board.any_pine64_board:
|
||||
print("Pine64 device detected.")
|
||||
|
||||
if detector.board.any_rock_pi_board:
|
||||
print("Rock Pi device detected.")
|
||||
|
||||
if detector.board.any_clockwork_pi:
|
||||
print("Clockwork Pi device detected.")
|
||||
|
|
|
|||
Loading…
Reference in a new issue