From 024f0cf46c15682505b374329e18d27d9aba51ce Mon Sep 17 00:00:00 2001 From: ecarozzo Date: Sat, 26 Nov 2022 10:28:41 +0100 Subject: [PATCH] Added support to SeeedStudio Odyssey X86J5105 --- adafruit_platformdetect/board.py | 7 +++++++ adafruit_platformdetect/chip.py | 2 ++ adafruit_platformdetect/constants/boards.py | 6 ++++++ adafruit_platformdetect/constants/chips.py | 2 +- bin/detect.py | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index db7f3f6..9dfdf37 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -153,6 +153,8 @@ class Board: board_id = self._rock_pi_id() or self._armbian_id() elif chip_id == chips.ATOM_X5_Z8350: board_id = self._rock_pi_id() + elif chip_id == chips.ATOM_J4105: + board_id = self._odyssey_id() elif chip_id == chips.RK3288: board_id = self._asus_tinker_board_id() elif chip_id == chips.RK3328: @@ -529,6 +531,11 @@ class Board: return None + def _odyssey_id(self) -> Optional[str]: + """Try to detect the id of Seeed board.""" + board = boards.ODYSSEY_X86J4105 + return board + def _asus_tinker_board_id(self) -> Optional[str]: """Check what type of Tinker Board.""" board_value = self.detector.get_device_model() diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index 9377635..2e08d02 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -290,6 +290,8 @@ class Chip: linux_id = chips.PENTIUM_N3710 elif "X5-Z8350" in model_name: linux_id = chips.ATOM_X5_Z8350 + elif "J4105" in model_name: + linux_id = chips.ATOM_J4105 else: linux_id = chips.GENERIC_X86 ## print("linux_id = ", linux_id) diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index a2a6b81..63c85a6 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -172,6 +172,9 @@ ROCK_PI_5 = "ROCK_PI_5" GREATFET_ONE = "GREATFET_ONE" +#SeeedStudio boards +ODYSSEY_X86J4105 = "ODYSSEY_X86J4105" + # Udoo boards UDOO_BOLT_V3 = "UDOO_BOLT_V3" UDOO_BOLT_V8 = "UDOO_BOLT_V8" @@ -538,6 +541,9 @@ _ROCK_PI_IDS = (ROCK_PI_S, ROCK_PI_4, ROCK_PI_X, ROCK_PI_E, RADXA_ZERO, ROCK_PI_ # UDOO _UDOO_BOARD_IDS = {UDOO_BOLT_V8: ("SC40-2000-0000-C0|C",), UDOO_X86: ("dummy",)} +#SeeedStudio boards +_SEEED_BOARD_IDS = (ODYSSEY_X86J4105) + # MaaXBoard boards _MAAXBOARD_IDS = ("MAAXBOARD", "MAAXBOARD_MINI") diff --git a/adafruit_platformdetect/constants/chips.py b/adafruit_platformdetect/constants/chips.py index dd62202..6a4b35f 100644 --- a/adafruit_platformdetect/constants/chips.py +++ b/adafruit_platformdetect/constants/chips.py @@ -68,6 +68,6 @@ MT8167 = "MT8167" ATOM_X5_Z8350 = "X5-Z8350" RP2040_U2IF = "RP2040_U2IF" D1_RISCV = "D1_RISCV" - +ATOM_J4105 = "ATOM_J4105" BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2835", "BCM2837"} diff --git a/bin/detect.py b/bin/detect.py index 764e8ad..5ba5c78 100755 --- a/bin/detect.py +++ b/bin/detect.py @@ -53,6 +53,7 @@ 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 a UDOO Bolt?", detector.board.UDOO_BOLT) +print("Is this a ODYSSEY X86YJ4105?", detector.board.ODYSSEY_X86J4105) print("Is this an ASUS Tinker Board?", detector.board.ASUS_TINKER_BOARD) print("Is this an STM32MP1 Board?", detector.board.any_stm32mp1) print(