mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add a windows version of the factory-reset command
This commit is contained in:
parent
4abb6548cd
commit
d88d552260
1 changed files with 45 additions and 0 deletions
45
tools/factory_reset.ps1
Normal file
45
tools/factory_reset.ps1
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
Write-Output "This script will do a factory reset, removing all stored data and keys."
|
||||
$title = 'Factory reset'
|
||||
$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
|
||||
}
|
||||
|
||||
Invoke-WebRequest https://ci.betrusted.io/latest/loader.bin -OutFile loader.bin
|
||||
python usb_update.py -l loader.bin
|
||||
Remove-Item /tmp/loader.bin
|
||||
|
||||
Write-Output "waiting for device to reboot"
|
||||
Start-Sleep 5
|
||||
|
||||
Invoke-WebRequest https://ci.betrusted.io/latest/xous.img -OutFile xous.img
|
||||
python usb_update.py -k xous.img
|
||||
Remove-Item xous.img
|
||||
|
||||
Write-Output "waiting for device to reboot"
|
||||
Start-Sleep 5
|
||||
|
||||
Invoke-WebRequest https://ci.betrusted.io/latest/soc_csr.bin -OutFile soc_csr.bin
|
||||
python usb_update.py --soc soc_csr.bin --force
|
||||
Remove-Item soc_csr.bin
|
||||
|
||||
Write-Output "waiting for device to reboot"
|
||||
Start-Sleep 5
|
||||
|
||||
Invoke-WebRequest https://ci.betrusted.io/latest/ec_fw.bin -OutFile ec_fw.bin
|
||||
python usb_update.py -e ec_fw.bin
|
||||
Remove-Item soc_csr.bin
|
||||
|
||||
Write-Output "waiting for device to reboot"
|
||||
Start-Sleep 5
|
||||
|
||||
Invoke-WebRequest https://ci.betrusted.io/latest/wf200_fw.bin -OutFile wf200_fw.bin
|
||||
python usb_update.py -w wf200_fw.bin
|
||||
Remove-Item wf200_fw.bin
|
||||
|
||||
Write-Output "IMPORTANT: you must run 'ecup auto' to update the EC with the staged firmware objects."
|
||||
Loading…
Reference in a new issue