fix update scripts to prevent device from self-resetting during updates

This commit is contained in:
bunnie 2022-04-20 16:57:10 +08:00
parent e6ef6f81e9
commit 15105cd0b2
3 changed files with 33 additions and 32 deletions

View file

@ -14,10 +14,7 @@ if ($decision -eq 0) {
Exit Exit
} }
Invoke-WebRequest https://ci.betrusted.io/latest-ci/loader.bin -OutFile loader.bin python usb_update.py --disable-boot
python usb_update.py -l loader.bin
Remove-Item loader.bin
Write-Output "waiting for device to reboot" Write-Output "waiting for device to reboot"
Start-Sleep 5 Start-Sleep 5
@ -28,13 +25,6 @@ Remove-Item xous.img
Write-Output "waiting for device to reboot" Write-Output "waiting for device to reboot"
Start-Sleep 5 Start-Sleep 5
Invoke-WebRequest https://ci.betrusted.io/latest-ci/soc_csr.bin -OutFile soc_csr.bin
python usb_update.py -s soc_csr.bin
Remove-Item soc_csr.bin
Write-Output "waiting for device to reboot"
Start-Sleep 5
Invoke-WebRequest https://ci.betrusted.io/latest-ci/ec_fw.bin -OutFile ec_fw.bin Invoke-WebRequest https://ci.betrusted.io/latest-ci/ec_fw.bin -OutFile ec_fw.bin
python usb_update.py -e ec_fw.bin python usb_update.py -e ec_fw.bin
Remove-Item ec_fw.bin Remove-Item ec_fw.bin
@ -46,5 +36,14 @@ Invoke-WebRequest https://ci.betrusted.io/latest-ci/wf200_fw.bin -OutFile wf200_
python usb_update.py -w wf200_fw.bin python usb_update.py -w wf200_fw.bin
Remove-Item wf200_fw.bin Remove-Item wf200_fw.bin
Write-Output "waiting for device to reboot"
Start-Sleep 5
Invoke-WebRequest https://ci.betrusted.io/latest-ci/loader.bin -OutFile loader.bin
Invoke-WebRequest https://ci.betrusted.io/latest-ci/soc_csr.bin -OutFile soc_csr.bin
python usb_update.py --enable-boot --soc soc_csr.bin -l loader.bin
Remove-Item loader.bin
Remove-Item soc_csr.bin
Write-Output "IMPORTANT: you must select 'Install gateware update' on the Precursor device to update the SoC." Write-Output "IMPORTANT: you must select 'Install gateware update' on the Precursor device to update the SoC."
Write-Output "IMPORTANT: you must also run 'ecup auto' to update the EC with the staged firmware objects." Write-Output "IMPORTANT: you must also run 'ecup auto' to update the EC with the staged firmware objects."

View file

@ -31,9 +31,9 @@ else
LOCALE="" LOCALE=""
fi fi
wget https://ci.betrusted.io/$REVISION/loader.bin -O /tmp/loader.bin ./usb_update.py --disable-boot
./usb_update.py -l /tmp/loader.bin echo "waiting for device to reboot"
rm /tmp/loader.bin sleep 5
echo "waiting for device to reboot" echo "waiting for device to reboot"
sleep 5 sleep 5
@ -45,23 +45,26 @@ rm /tmp/xous.img
echo "waiting for device to reboot" echo "waiting for device to reboot"
sleep 5 sleep 5
wget https://ci.betrusted.io/$REVISION/soc_csr.bin -O /tmp/soc_csr.bin
./usb_update.py -s /tmp/soc_csr.bin
rm /tmp/soc_csr.bin
echo "waiting for device to reboot"
sleep 5
wget https://ci.betrusted.io/$REVISION/ec_fw.bin -O /tmp/ec_fw.bin wget https://ci.betrusted.io/$REVISION/ec_fw.bin -O /tmp/ec_fw.bin
./usb_update.py -e /tmp/ec_fw.bin ./usb_update.py -e /tmp/ec_fw.bin
rm /tmp/ec_fw.bin rm /tmp/ec_fw.bin
echo "waiting for device to reboot"
sleep 5 sleep 5
wget https://ci.betrusted.io/$REVISION/wf200_fw.bin -O /tmp/wf200_fw.bin wget https://ci.betrusted.io/$REVISION/wf200_fw.bin -O /tmp/wf200_fw.bin
./usb_update.py -w /tmp/wf200_fw.bin ./usb_update.py -w /tmp/wf200_fw.bin
rm /tmp/wf200_fw.bin rm /tmp/wf200_fw.bin
echo "waiting for device to reboot"
sleep 5
wget https://ci.betrusted.io/$REVISION/loader.bin -O /tmp/loader.bin
wget https://ci.betrusted.io/$REVISION/soc_csr.bin -O /tmp/soc_csr.bin
./usb_update.py --enable-boot --soc /tmp/soc_csr.bin -l /tmp/loader.bin
rm /tmp/loader.bin
rm /tmp/soc_csr.bin
echo " " echo " "
echo "NOTE: This script merely stages the SOC update object." echo "NOTE: This script merely stages the SOC update object."
echo "You must run 'Install gateware update' from the root menu on the device itself" echo "You must run 'Install gateware update' from the root menu on the device itself"

View file

@ -14,10 +14,7 @@ if ($decision -eq 0) {
Exit Exit
} }
Invoke-WebRequest https://ci.betrusted.io/releases/latest/loader.bin -OutFile loader.bin python usb_update.py --disable-boot
python usb_update.py -l loader.bin
Remove-Item loader.bin
Write-Output "waiting for device to reboot" Write-Output "waiting for device to reboot"
Start-Sleep 5 Start-Sleep 5
@ -28,13 +25,6 @@ Remove-Item xous.img
Write-Output "waiting for device to reboot" Write-Output "waiting for device to reboot"
Start-Sleep 5 Start-Sleep 5
Invoke-WebRequest https://ci.betrusted.io/releases/latest/soc_csr.bin -OutFile soc_csr.bin
python usb_update.py -s soc_csr.bin
Remove-Item soc_csr.bin
Write-Output "waiting for device to reboot"
Start-Sleep 5
Invoke-WebRequest https://ci.betrusted.io/releases/latest/ec_fw.bin -OutFile ec_fw.bin Invoke-WebRequest https://ci.betrusted.io/releases/latest/ec_fw.bin -OutFile ec_fw.bin
python usb_update.py -e ec_fw.bin python usb_update.py -e ec_fw.bin
Remove-Item ec_fw.bin Remove-Item ec_fw.bin
@ -46,5 +36,14 @@ Invoke-WebRequest https://ci.betrusted.io/releases/latest/wf200_fw.bin -OutFile
python usb_update.py -w wf200_fw.bin python usb_update.py -w wf200_fw.bin
Remove-Item wf200_fw.bin Remove-Item wf200_fw.bin
Write-Output "waiting for device to reboot"
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
python usb_update.py --enable-boot --soc soc_csr.bin -l loader.bin
Remove-Item loader.bin
Remove-Item soc_csr.bin
Write-Output "IMPORTANT: you must select 'Install gateware update' on the Precursor device to update the SoC." Write-Output "IMPORTANT: you must select 'Install gateware update' on the Precursor device to update the SoC."
Write-Output "IMPORTANT: you must also run 'ecup auto' to update the EC with the staged firmware objects." Write-Output "IMPORTANT: you must also run 'ecup auto' to update the EC with the staged firmware objects."