spi_flash: Make SD updates more tolerant of flaky boards

Validation passes if either of the following succeeds (in order):
1. Active firmware's raw dictionary changed after update
2. Checksum of firmware.cur matches expected

Additionally, deletes firmware.bin if found after update succeeds.

Signed-off-by: Justin Schuh <code@justinschuh.com>
This commit is contained in:
Justin Schuh 2021-06-11 17:41:15 -07:00 committed by KevinOConnor
parent 10e72c4b6f
commit bb801905be
2 changed files with 55 additions and 22 deletions

View file

@ -408,6 +408,8 @@ class MessageParser:
except Exception as e:
logging.exception("process_identify error")
self._error("Error during identify: %s", str(e))
def get_raw_data_dictionary(self):
return self.raw_identify_data
def get_version_info(self):
return self.version, self.build_versions
def get_messages(self):