-
Notifications
You must be signed in to change notification settings - Fork 47
/
autoinstall-intel.ps1
307 lines (235 loc) · 12 KB
/
autoinstall-intel.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# Chromebook Intel Driver AutoInstaller
# Copyright 2024, CoolStar. All Rights Reserved
# Get the ID and security principal of the current user account
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
# Get the security principal for the Administrator role
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator
# Check to see if we are currently running "as Administrator"
if ($myWindowsPrincipal.IsInRole($adminRole))
{
Echo "Run As Admin -- OK"
}
else
{
# We are not running "as Administrator" - so relaunch as administrator
# Create a new process object that starts PowerShell
$newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
# Specify the current script path and name as a parameter
$newProcess.Arguments = "-ExecutionPolicy Bypass " + $myInvocation.MyCommand.Definition + " " + $PWD.Path;
# Indicate that the process should be elevated
$newProcess.Verb = "runas";
# Start the new process
[System.Diagnostics.Process]::Start($newProcess);
# Exit from the current, unelevated, process
exit
}
If ($args.count -gt 0){
Set-Location $args[0]
}
$Chip = "Unknown"
If (Get-PnpDevice -PresentOnly -InstanceID "ACPI\INT34BB\0" 2>$NULL){
$Chip = "CML"
Echo "Detected Comet Lake"
}
If (Get-PnpDevice -PresentOnly -InstanceID "ACPI\INT34C8\0" 2>$NULL){
$Chip = "JSL"
Echo "Detected Jasper Lake"
}
If (Get-PnpDevice -PresentOnly -InstanceID "ACPI\INT34C5\0" 2>$NULL){
$Chip = "TGL"
Echo "Detected Tiger Lake"
}
If (Get-PnpDevice -PresentOnly -InstanceID "ACPI\INTC1055\0" 2>$NULL){
$Chip = "ADL"
Echo "Detected Alder Lake"
}
If (Get-PnpDevice -PresentOnly -InstanceID "ACPI\INTC1056\0" 2>$NULL){
$Chip = "ADL"
Echo "Detected Alder Lake"
}
If (Get-PnpDevice -PresentOnly -InstanceID "ACPI\INTC1057\0" 2>$NULL){
$Chip = "ADL-N"
Echo "Detected Alder Lake-N"
}
If (Get-PnpDevice -PresentOnly -InstanceID "ACPI\INTC1085\0" 2>$NULL){
$Chip = "ADL"
Echo "Detected Raptor Lake"
}
If ($Chip -Eq "Unknown"){
Echo "Failed to detect chipset. Make sure the GPIO controller is present in coreboot."
}
Remove-Item -Path CBookDriversTmp -Recurse 2>$NULL
New-Item -Name CBookDriversTmp -ItemType "Directory"
Set-Location CBookDriversTmp
If ($Chip -Eq "CML"){
Echo "Downloading Comet Lake LPSS drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/c/msdownload/update/driver/drvs/2021/11/6205d33d-a420-4dfc-9724-27999a3de111_ad6c425b1e3f5f70df82554d8300a80e1cca3921.cab" -OutFile lpss.cab
Echo "Downloading Comet Lake Chipset drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2019/07/35853dc6-14f2-45e1-94f0-d2289e36d2f2_618696f00ecf5b12783ed6577f6ba18a9c6cb560.cab" -OutFile chipset.cab
Echo "Downloading Comet Lake DPTF drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2022/07/0f500713-d36b-41e2-b9f0-85b56150532f_95f94116ea27c6994603bcce31eef0e314da9c16.cab" -OutFile dptf.cab
Echo "Expanding Drivers"
Expand lpss.cab -F:* . >$NULL
Expand chipset.cab -F:* . >$NULL
Expand dptf.cab -F:* . >$NULL
Echo "Installing CML System Driver"
pnputil /add-driver CometLakePCH-LPSystem.inf /install
Echo "Installing CML System (Northpeak) Driver"
pnputil /add-driver CometLakePCH-LPSystemNorthpeak.inf /install
Echo "Installing CML System (Thermal) Driver"
pnputil /add-driver CometLakePCH-LPSystemThermal.inf /install
Echo "Installing GPIO Driver"
pnputil /add-driver iaLPSS2_GPIO2_CNL.inf /install
Echo "Installing I2C Driver"
pnputil /add-driver iaLPSS2_I2C_CNL.inf /install
Echo "Installing SPI Driver"
pnputil /add-driver iaLPSS2_SPI_CNL.inf /install
Echo "Installing UART Driver"
pnputil /add-driver iaLPSS2_UART2_CNL.inf /install
Echo "Installing DPTF ACPI Driver"
pnputil /add-driver dptf_acpi.inf /install
Echo "Installing DPTF CPU Driver"
pnputil /add-driver dptf_cpu.inf /install
}
If ($Chip -Eq "JSL"){
Echo "Downloading Jasper Lake LPSS drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2021/11/55c24871-140a-45f1-a1c2-40d466d71df3_6de29adb1d4df234bb10a4b875ec38cefe264641.cab" -OutFile lpss.cab
Echo "Downloading Jasper Lake Chipset drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2021/11/24195e7c-f5e9-48f0-9df5-4362d4d23641_00e2dfeee8162ff1c69438a0d3b4e92033607d72.cab" -OutFile chipset.cab
Echo "Downloading Jasper Lake DPTF drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2022/07/0f500713-d36b-41e2-b9f0-85b56150532f_95f94116ea27c6994603bcce31eef0e314da9c16.cab" -OutFile dptf.cab
Echo "Downloading Intel GNA drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2023/11/51c140fd-d772-4a85-ac52-78a857df6d61_3bc0d593fc7d061deda5c8fe99225fec05f0ba89.cab" -OutFile gna.cab
Echo "Expanding Drivers"
Expand lpss.cab -F:* . >$NULL
Expand chipset.cab -F:* . >$NULL
Expand dptf.cab -F:* . >$NULL
Expand gna.cab -F:* . >$NULL
Echo "Installing JSL System Driver"
pnputil /add-driver JasperLakePCH-NSystem.inf /install
Echo "Installing JSL System (Northpeak) Driver"
pnputil /add-driver JasperLakePCH-NSystemNorthpeak.inf /install
Echo "Installing JSL System (LPSS) Driver"
pnputil /add-driver JasperLakePCH-NSystemLPSS.inf /install
Echo "Installing GPIO Driver"
pnputil /add-driver iaLPSS2_GPIO2_JSL.inf /install
Echo "Installing I2C Driver"
pnputil /add-driver iaLPSS2_I2C_JSL.inf /install
Echo "Installing SPI Driver"
pnputil /add-driver iaLPSS2_SPI_JSL.inf /install
Echo "Installing UART Driver"
pnputil /add-driver iaLPSS2_UART2_JSL.inf /install
Echo "Installing DPTF ACPI Driver"
pnputil /add-driver dptf_acpi.inf /install
Echo "Installing DPTF CPU Driver"
pnputil /add-driver dptf_cpu.inf /install
Echo "Installing Intel GNA Driver"
pnputil /add-driver gna.inf /install
}
If ($Chip -Eq "TGL"){
Echo "Downloading Tiger Lake LPSS drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2021/09/872123fa-1ca0-4616-b9c2-8652e3f02bba_a23e217ed5a22e229fd01e5fc3d5be09cc0deb13.cab" -OutFile lpss.cab
Echo "Downloading Tiger Lake Chipset drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/c/msdownload/update/driver/drvs/2021/07/99abf585-18e9-4f46-ac90-4510d48d2828_dea3cc1763220f7f71fba28a9a6a6fe6f05775ca.cab" -OutFile chipset.cab
Echo "Downloading Jasper Lake DPTF drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2022/07/0f500713-d36b-41e2-b9f0-85b56150532f_95f94116ea27c6994603bcce31eef0e314da9c16.cab" -OutFile dptf.cab
Echo "Downloading Intel GNA drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2023/11/51c140fd-d772-4a85-ac52-78a857df6d61_3bc0d593fc7d061deda5c8fe99225fec05f0ba89.cab" -OutFile gna.cab
Echo "Expanding Drivers"
Expand lpss.cab -F:* . >$NULL
Expand chipset.cab -F:* . >$NULL
Expand dptf.cab -F:* . >$NULL
Expand gna.cab -F:* . >$NULL
Echo "Installing TGL System Driver"
pnputil /add-driver TigerlakePCH-LPSystem.inf /install
Echo "Installing TGL System (USB Function) Driver"
pnputil /add-driver TigerlakePCH-LPUSBFunctionController.inf /install
Echo "Installing TGL System (LPSS) Driver"
pnputil /add-driver TigerlakePCH-LPSystemLPSS.inf /install
Echo "Installing GPIO Driver"
pnputil /add-driver iaLPSS2_GPIO2_TGL.inf /install
Echo "Installing I2C Driver"
pnputil /add-driver iaLPSS2_I2C_TGL.inf /install
Echo "Installing SPI Driver"
pnputil /add-driver iaLPSS2_SPI_TGL.inf /install
Echo "Installing UART Driver"
pnputil /add-driver iaLPSS2_UART2_TGL.inf /install
Echo "Installing DPTF ACPI Driver"
pnputil /add-driver dptf_acpi.inf /install
Echo "Installing DPTF CPU Driver"
pnputil /add-driver dptf_cpu.inf /install
Echo "Installing Intel GNA Driver"
pnputil /add-driver gna.inf /install
}
If ($Chip -Eq "ADL"){
Echo "Downloading Alder/Raptor Lake LPSS drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2022/11/51e4af59-23b4-412f-be73-8ef9e216c578_b019bda8c590dd1ef8f1c479605a5d1264746e57.cab" -OutFile lpss.cab
Echo "Downloading Alder Lake Chipset drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/c/msdownload/update/driver/drvs/2021/12/be4c97d3-f9d5-447b-81f3-edc826675887_633ce7865357186e59cd113fd9083203715ac64e.cab" -OutFile chipset.cab
Echo "Downloading Alder/Raptor Lake IPF drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2023/11/facfb05f-6415-49e4-bb5b-3a4b2d2c0510_0b751a0c360fd4ec4adaa8dcb7105b4ffedf1621.cab" -OutFile ipf.cab
Echo "Downloading Intel GNA drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2023/11/51c140fd-d772-4a85-ac52-78a857df6d61_3bc0d593fc7d061deda5c8fe99225fec05f0ba89.cab" -OutFile gna.cab
Echo "Expanding Drivers"
Expand lpss.cab -F:* . >$NULL
Expand chipset.cab -F:* . >$NULL
Expand ipf.cab -F:* . >$NULL
Expand gna.cab -F:* . >$NULL
Echo "Installing ADL System Driver"
pnputil /add-driver AlderLakePCH-PSystem.inf /install
Echo "Installing ADL System (Northpeak) Driver"
pnputil /add-driver AlderLakePCH-PSystemNorthpeak.inf /install
Echo "Installing ADL System (LPSS) Driver"
pnputil /add-driver AlderLakePCH-PSystemLPSS.inf /install
Echo "Installing GPIO Driver"
pnputil /add-driver iaLPSS2_GPIO2_ADL.inf /install
Echo "Installing I2C Driver"
pnputil /add-driver iaLPSS2_I2C_ADL.inf /install
Echo "Installing SPI Driver"
pnputil /add-driver iaLPSS2_SPI_ADL.inf /install
Echo "Installing UART Driver"
pnputil /add-driver iaLPSS2_UART2_ADL.inf /install
Echo "Installing IPF ACPI Driver"
pnputil /add-driver ipf_acpi.inf /install
Echo "Installing IPF CPU Driver"
pnputil /add-driver ipf_cpu.inf /install
Echo "Installing Intel GNA Driver"
pnputil /add-driver gna.inf /install
}
If ($Chip -Eq "ADL-N"){
Echo "Downloading Alder Lake-N LPSS drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2022/11/4831f32e-196f-4644-867f-2747cc7b85df_726f194a9fd7b5f21126cbb70b54f62f178c87ea.cab" -OutFile lpss.cab
Echo "Downloading Alder Lake-N Chipset drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/c/msdownload/update/driver/drvs/2022/09/203c7385-2d15-49db-8a5f-b0056fccc411_0f9a65ffbab916fbbf43015bd6af4395729cc08c.cab" -OutFile chipset.cab
Echo "Downloading Alder/Raptor Lake IPF drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2023/11/facfb05f-6415-49e4-bb5b-3a4b2d2c0510_0b751a0c360fd4ec4adaa8dcb7105b4ffedf1621.cab" -OutFile ipf.cab
Echo "Downloading Intel GNA drivers"
Invoke-WebRequest "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2023/11/51c140fd-d772-4a85-ac52-78a857df6d61_3bc0d593fc7d061deda5c8fe99225fec05f0ba89.cab" -OutFile gna.cab
Echo "Expanding Drivers"
Expand lpss.cab -F:* . >$NULL
Expand chipset.cab -F:* . >$NULL
Expand ipf.cab -F:* . >$NULL
Expand gna.cab -F:* . >$NULL
Echo "Installing ADL-N System Driver"
pnputil /add-driver AlderLakePCH-NSystem.inf /install
Echo "Installing ADL-N System (Northpeak) Driver"
pnputil /add-driver AlderLakePCH-NSystemNorthpeak.inf /install
Echo "Installing ADL-N System (ISH) Driver"
pnputil /add-driver AlderLakePCH-NSystemISH.inf /install
Echo "Installing GPIO Driver"
pnputil /add-driver iaLPSS2_GPIO2_ADL_N.inf /install
Echo "Installing I2C Driver"
pnputil /add-driver iaLPSS2_I2C_ADL_N.inf /install
Echo "Installing SPI Driver"
pnputil /add-driver iaLPSS2_SPI_ADL_N.inf /install
Echo "Installing UART Driver"
pnputil /add-driver iaLPSS2_UART2_ADL_N.inf /install
Echo "Installing IPF ACPI Driver"
pnputil /add-driver ipf_acpi.inf /install
Echo "Installing IPF CPU Driver"
pnputil /add-driver ipf_cpu.inf /install
Echo "Installing Intel GNA Driver"
pnputil /add-driver gna.inf /install
}
Echo "Done"