File tree Expand file tree Collapse file tree 5 files changed +37
-3
lines changed Expand file tree Collapse file tree 5 files changed +37
-3
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ def get_armbian_release_field(self, field):
75
75
value, if found, otherwise None.
76
76
"""
77
77
field_value = None
78
+
78
79
pattern = r"^" + field + r"=(.*)"
79
80
try :
80
81
with open ("/etc/armbian-release" , "r" ) as release_file :
@@ -93,20 +94,41 @@ def get_device_model(self):
93
94
Search /proc/device-tree/model for the device model and return its value, if found,
94
95
otherwise None.
95
96
"""
97
+ model = None
98
+
96
99
try :
97
100
with open ("/proc/device-tree/model" , "r" ) as model_file :
98
101
model = model_file .read ()
99
- return model
100
102
except FileNotFoundError :
101
103
pass
102
104
105
+ return model
106
+
103
107
def get_device_compatible (self ):
104
108
"""
105
109
Search /proc/device-tree/compatible for the compatible chip name.
106
110
"""
111
+ model = None
112
+
107
113
try :
108
114
with open ("/proc/device-tree/compatible" , "r" ) as model_file :
109
115
model = model_file .read ()
110
- return model
111
116
except FileNotFoundError :
112
117
pass
118
+
119
+ return model
120
+
121
+ def check_board_asset_tag_value (self ):
122
+ """
123
+ Search /proc/device-tree/model for the device model and return its value, if found,
124
+ otherwise None.
125
+ """
126
+ tag = None
127
+
128
+ try :
129
+ with open ("/sys/devices/virtual/dmi/id/board_asset_tag" , "r" ) as tag_file :
130
+ tag = tag_file .read ()
131
+ except FileNotFoundError :
132
+ pass
133
+
134
+ return tag
Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ def id(self):
117
117
board_id = self ._clockwork_pi_id ()
118
118
elif chip_id == chips .RK3308 :
119
119
board_id = self ._rock_pi_id ()
120
+ elif chip_id == chips .RYZEN_V1605B :
121
+ board_id = boards .UDOO_BOLT
122
+
120
123
return board_id
121
124
122
125
# pylint: enable=invalid-name
Original file line number Diff line number Diff line change @@ -135,7 +135,13 @@ def _linux_id(self):
135
135
136
136
if hardware is None :
137
137
vendor_id = self .detector .get_cpuinfo_field ("vendor_id" )
138
- if vendor_id in ("GenuineIntel" , "AuthenticAMD" ):
138
+ if vendor_id == "AuthenticAMD" :
139
+ model_name = self .detector .get_cpuinfo_field ("model name" ).upper ()
140
+ if "RYZEN EMBEDDED V1605B" in model_name :
141
+ linux_id = chips .RYZEN_V1605B
142
+ else :
143
+ linux_id = chips .GENERIC_X86
144
+ elif vendor_id == "GenuineIntel" :
139
145
linux_id = chips .GENERIC_X86
140
146
141
147
compatible = self .detector .get_device_compatible ()
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
+
98
100
# pylint: enable=bad-whitespace
99
101
100
102
# OrangePI
Original file line number Diff line number Diff line change 3
3
IMX8MX = "IMX8MX"
4
4
BCM2XXX = "BCM2XXX"
5
5
ESP8266 = "ESP8266"
6
+ RYZEN_V1605B = "RYZEN_V1605B"
6
7
SAMD21 = "SAMD21"
7
8
STM32 = "STM32"
8
9
SUN8I = "SUN8I"
You can’t perform that action at this time.
0 commit comments