2022-03-10 08:22:48 +00:00
|
|
|
param (
|
|
|
|
|
[string]$LOCALE="en"
|
|
|
|
|
)
|
2022-02-09 16:46:09 +00:00
|
|
|
Write-Output "This script will update Xous and stage gateware and EC firmware for self-provisioning. No secrets will be erased."
|
2022-02-28 06:07:42 +00:00
|
|
|
Write-Output "This script will use the latest release."
|
2022-02-09 16:46:09 +00:00
|
|
|
$title = 'Update to latest release'
|
|
|
|
|
$question = 'Are you sure you want to proceed?'
|
|
|
|
|
$choices = '&Yes', '&No'
|
|
|
|
|
|
|
|
|
|
$decision = $Host.UI.PromptForChoice($title, $question, $choices, 1)
|
|
|
|
|
if ($decision -eq 0) {
|
|
|
|
|
Write-Host 'confirmed'
|
|
|
|
|
} else {
|
|
|
|
|
Exit
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-20 08:57:10 +00:00
|
|
|
python usb_update.py --disable-boot
|
2022-04-20 08:59:19 +00:00
|
|
|
Write-Output "waiting for device to reconnect"
|
2022-02-09 16:46:09 +00:00
|
|
|
Start-Sleep 5
|
|
|
|
|
|
2022-03-10 08:22:48 +00:00
|
|
|
Invoke-WebRequest https://ci.betrusted.io/releases/latest/xous-$LOCALE.img -OutFile xous.img
|
2022-02-09 16:46:09 +00:00
|
|
|
python usb_update.py -k xous.img
|
|
|
|
|
Remove-Item xous.img
|
|
|
|
|
|
2022-04-20 08:59:19 +00:00
|
|
|
Write-Output "waiting for device to reconnect"
|
2022-02-09 16:46:09 +00:00
|
|
|
Start-Sleep 5
|
|
|
|
|
|
|
|
|
|
Invoke-WebRequest https://ci.betrusted.io/releases/latest/ec_fw.bin -OutFile ec_fw.bin
|
|
|
|
|
python usb_update.py -e ec_fw.bin
|
|
|
|
|
Remove-Item ec_fw.bin
|
|
|
|
|
|
2022-04-20 08:59:19 +00:00
|
|
|
Write-Output "waiting for device to reconnect"
|
2022-02-09 16:46:09 +00:00
|
|
|
Start-Sleep 5
|
|
|
|
|
|
|
|
|
|
Invoke-WebRequest https://ci.betrusted.io/releases/latest/wf200_fw.bin -OutFile wf200_fw.bin
|
|
|
|
|
python usb_update.py -w wf200_fw.bin
|
|
|
|
|
Remove-Item wf200_fw.bin
|
|
|
|
|
|
2022-04-20 08:59:19 +00:00
|
|
|
Write-Output "waiting for device to reconnect"
|
2022-04-20 08:57:10 +00:00
|
|
|
Start-Sleep 5
|
|
|
|
|
|
|
|
|
|
Invoke-WebRequest https://ci.betrusted.io/releases/latest/loader.bin -OutFile loader.bin
|
|
|
|
|
Invoke-WebRequest https://ci.betrusted.io/releases/latest/soc_csr.bin -OutFile soc_csr.bin
|
2022-04-20 09:15:46 +00:00
|
|
|
python usb_update.py --enable-boot-update -s soc_csr.bin -l loader.bin
|
2022-04-20 08:57:10 +00:00
|
|
|
Remove-Item loader.bin
|
|
|
|
|
Remove-Item soc_csr.bin
|
|
|
|
|
|
2022-04-20 09:03:02 +00:00
|
|
|
Write-Output "Please insert a paperclip into the hole in the lower right hand corner to force a full reset."
|
2022-07-16 19:13:13 +00:00
|
|
|
Write-output "Follow the on-device instructions to finalize the update process."
|