Function run
pub fn run(archive: &Path, work_dir: &Path) -> Result<()>Expand description
Computes the new partitions from the FOTA blob and flashes them onto the proper MTD flash memory locations.
Uses work_dir for the patched images and removes it once the update is
flashed. If the removal fails, it logs a warning. It reads the written
data back and checks it against the checksums in the FOTA blob. A raw
partition is erased after its new image.
ยงErrors
Returns an error if the blob or its config is invalid, if a partition is missing or has the wrong checksum, if patching or flashing fails, or on any IO error.