Make update-module-firmware.js more robust and able to recover bricked modules (including the left half) by utilizing the newly added wait-for-kboot-idle.js

This commit is contained in:
László Monda
2018-01-10 03:15:19 +01:00
parent bd5be98d99
commit b6bdd1486c
3 changed files with 24 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ const blhostBuspal = `${blhostUsb} --buspal i2c,${i2cAddress},100k`;
config.verbose = true;
exec(`${usbDir}/send-kboot-command-to-module.js ping ${moduleSlot}`);
exec(`${usbDir}/jump-to-module-bootloader.js ${moduleSlot}`);
exec(`${usbDir}/wait-for-kboot-idle.js`);
exec(`${usbDir}/reenumerate.js buspal`);
execRetry(`${blhostBuspal} get-property 1`);
exec(`${blhostBuspal} flash-erase-all-unsecure`);