Improve v2 firmware validation and error checks (#449)

To reduce the chance that a bad firmware image is created and used, the
following functionality has been implemented:

1. Check md5 sums of local files in addition to downloaded files
2. Copy a backup of the original firmware, instead of removing it
3. Do not make an image unless all parts are present
4. Only output success message if the image file exists

The above fixes an issue where if a provided firmware zipfile is unable to
be read, the script continues on, generates a bad demo.bin file, and suggests
the file is good for loading into the camera. The above updates help prevent
this from occurring
This commit is contained in:
John Elkins
2023-07-11 21:21:13 -05:00
committed by GitHub
parent df3a8945bd
commit 46ec7dd02b
3 changed files with 34 additions and 14 deletions

View File

@@ -1 +1,2 @@
demo.bin
demo*.zip