write-bin: Skip writing if binary has not changed.
jounathaen opened this issue · comments
First: I love espflash
! It is a great tool! Thanks for all the work!
I'm trying to optimize my flash times by putting static data into a separate partition, which works quite decent via write-bin
. But unlike flash
, write-bin
does not check the MD5 sum of the section and thus does not skip if the same data is already present at that address. This prevents me from adding the write-bin
step into the flashing script.
Desired feature:
- Add a
--skip-if-present
option towrite-bin
, that checks the md5 hash before writing and skips if it matches the data to be written.
Alternative Approaches:
- allow binary files to be flashed via
flash
as well - Default to skipping blocks in general: #588
- Default to skipping blocks in general: #588
Some initial investigation showed that it was not worth to implement that feature. I would go for adding --skip-if-present
flag or the other way, skip by default and add a --no-skip
flag like we have in the flash
subcommand.