@@ -153,6 +153,8 @@ def id(self) -> Optional[str]:
153
153
board_id = self ._rock_pi_id () or self ._armbian_id ()
154
154
elif chip_id == chips .ATOM_X5_Z8350 :
155
155
board_id = self ._rock_pi_id ()
156
+ elif chip_id == chips .ATOM_J4105 :
157
+ board_id = self ._j4105_id ()
156
158
elif chip_id == chips .RK3288 :
157
159
board_id = self ._asus_tinker_board_id ()
158
160
elif chip_id == chips .RK3328 :
@@ -529,6 +531,19 @@ def _udoo_id(self) -> Optional[str]:
529
531
530
532
return None
531
533
534
+ def _j4105_id (self ) -> Optional [str ]:
535
+ """Try to detect the id of J4105 board."""
536
+ try :
537
+ with open (
538
+ "/sys/devices/virtual/dmi/id/board_name" , "r" , encoding = "utf-8"
539
+ ) as board_name :
540
+ board_value = board_name .read ().rstrip ()
541
+ if board_value == "ODYSSEY-X86J4105" :
542
+ return boards .ODYSSEY_X86J4105
543
+ return None
544
+ except FileNotFoundError :
545
+ return None
546
+
532
547
def _asus_tinker_board_id (self ) -> Optional [str ]:
533
548
"""Check what type of Tinker Board."""
534
549
board_value = self .detector .get_device_model ()
@@ -712,6 +727,11 @@ def any_udoo_board(self) -> bool:
712
727
"""Check to see if the current board is an UDOO board"""
713
728
return self .id in boards ._UDOO_BOARD_IDS
714
729
730
+ @property
731
+ def any_seeed_board (self ) -> bool :
732
+ """Check to see if the current board is an SEEED board"""
733
+ return self .id in boards ._SEEED_BOARD_IDS
734
+
715
735
@property
716
736
def any_asus_tinker_board (self ) -> bool :
717
737
"""Check to see if the current board is an ASUS Tinker Board"""
@@ -775,6 +795,7 @@ def lazily_generate_conditions():
775
795
yield self .any_rock_pi_board
776
796
yield self .any_clockwork_pi_board
777
797
yield self .any_udoo_board
798
+ yield self .any_seeed_board
778
799
yield self .any_asus_tinker_board
779
800
yield self .any_stm32mp1
780
801
yield self .any_lubancat
0 commit comments