embeddedTS / buildroot-ts

BR_EXTERNAL support for Technologic Systems SBCs
4 stars 2 forks source link

IR: All: Save and restore U-Boot on write failure? #68

Open ts-kris opened 2 weeks ago

ts-kris commented 2 weeks ago

With #67 potentially putting units in a state where they are unbootable, the Image Replicator tool never fully addressed handling what to do when writing U-Boot fails for some reason. While rare, it can happen. Potential avenues: 1) Save U-Boot (or rather the boot0 partition) to a temp file, as well as an md5sum, before writing U-Boot. If there is a failure, restore and verify the previous boot0 partition. 2) Create a "Critical Failure" LED state to denote that an error occurred that may render the device unbootable if power is removed. This means the tool won't try to recover from a failure, but rather let the user know that something bad happened and not just a failure that can be resolved by rerunning the process.