Browse Source

Add support for the AML_S905X_CC board

pull/252/head
Brandon 2 years ago
parent
commit
f8d2cb88e8
4 changed files with 19 additions and 0 deletions
  1. +7
    -0
      adafruit_platformdetect/board.py
  2. +3
    -0
      adafruit_platformdetect/chip.py
  3. +8
    -0
      adafruit_platformdetect/constants/boards.py
  4. +1
    -0
      adafruit_platformdetect/constants/chips.py

+ 7
- 0
adafruit_platformdetect/board.py View File

@ -173,6 +173,8 @@ class Board:
board_id = self._tisk_id()
elif chip_id == chips.D1_RISCV:
board_id = self._armbian_id()
elif chip_id == chips.S905X:
board_id = boards.AML_S905X_CC
self._board_id = board_id
return board_id
@ -805,6 +807,11 @@ class Board:
"""Check whether the current board is a GreatFET One."""
return self.id == boards.GREATFET_ONE
@property
def aml_s905x_cc(self) -> bool:
"""Check whether the current board is a aml-s905x-cc One."""
return self.id == boards.AML_S905X_CC
def __getattr__(self, attr: str) -> bool:
"""
Detect whether the given attribute is the currently-detected board. See list


+ 3
- 0
adafruit_platformdetect/chip.py View File

@ -254,6 +254,9 @@ class Chip:
if self.detector.check_dt_compatible_value("sun20i-d1"):
return chips.D1_RISCV
if self.detector.check_dt_compatible_value("libretech,aml-s905x-cc"):
return chips.S905X
linux_id = None
hardware = self.detector.get_cpuinfo_field("Hardware")


+ 8
- 0
adafruit_platformdetect/constants/boards.py View File

@ -540,3 +540,11 @@ _SIEMENS_SIMATIC_IOT2000_IDS = (
SIEMENS_SIMATIC_IOT2050_ADV,
SIEMENS_SIMATIC_IOT2050_BASIC,
)
# Libre Computer Boards
AML_S905X_CC = "AML-S905X-CC"
# Libre Computer Boards
_LIBRE_COMPUTER_IDS = (
AML_S905X_CC
)

+ 1
- 0
adafruit_platformdetect/constants/chips.py View File

@ -21,6 +21,7 @@ SUN7I = "SUN7I"
SUN8I = "SUN8I"
S805 = "S805"
S905 = "S905"
S905X = "S905X"
S905X3 = "S905X3"
S905Y2 = "S905Y2"
S922X = "S922X"


|||||||
x
 
000:0
Loading…
Cancel
Save