File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def check_board_asset_tag_value(self):
127
127
128
128
try :
129
129
with open ("/sys/devices/virtual/dmi/id/board_asset_tag" , "r" ) as tag_file :
130
- tag = tag_file .read ()
130
+ tag = tag_file .read (). strip ()
131
131
except FileNotFoundError :
132
132
pass
133
133
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ def id(self):
118
118
board_id = self ._clockwork_pi_id ()
119
119
elif chip_id == chips .RK3308 :
120
120
board_id = self ._rock_pi_id ()
121
- elif self .board_asset_tag == "SC40-2000-0000-C0|C" :
121
+ elif self .board_asset_tag == boards . _UDOO_BOLT_BOARD_ASSET_TAG
122
122
board_id = boards .UDOO_BOLT
123
123
124
124
return board_id
@@ -395,6 +395,11 @@ def any_clockwork_pi_board(self):
395
395
"""Check whether the current board is any Clockwork Pi device."""
396
396
return self .CLOCKWORK_CPI3
397
397
398
+ @property
399
+ def any_udoo_board (self ):
400
+ """Check to see if the current board is an UDOO board"""
401
+ return self .id in boards ._UDOO_BOARD_IDS
402
+
398
403
@property
399
404
def any_embedded_linux (self ):
400
405
"""Check whether the current board is any embedded Linux device."""
@@ -414,6 +419,7 @@ def any_embedded_linux(self):
414
419
self .any_pynq_board ,
415
420
self .any_rock_pi_board ,
416
421
self .any_clockwork_pi_board ,
422
+ self .any_udoo_board ,
417
423
]
418
424
)
419
425
Original file line number Diff line number Diff line change 95
95
96
96
GREATFET_ONE = "GREATFET_ONE"
97
97
98
- UDOO_BOLT = "UDOO_BOLT"
99
-
100
98
# pylint: enable=bad-whitespace
101
99
102
100
# OrangePI
336
334
337
335
# Pine64 boards and devices
338
336
_PINE64_DEV_IDS = (PINE64 , PINEBOOK , PINEPHONE )
337
+
338
+ UDOO_BOLT = "UDOO_BOLT"
339
+ _UDOO_BOLT_BOARD_ASSET_TAG = "SC40-2000-0000-C0|C"
340
+
341
+ # UDOO
342
+ _UDOO_BOARD_IDS = (
343
+ UDOO_BOLT ,
344
+ _UDOO_BOLT_BOARD_ASSET_TAG ,
345
+ )
You can’t perform that action at this time.
0 commit comments