diff --git a/validitysensor/init_flash.py b/validitysensor/init_flash.py index 7dfd546..61c918b 100644 --- a/validitysensor/init_flash.py +++ b/validitysensor/init_flash.py @@ -36,13 +36,26 @@ deb2604834e2bb62e890b0ce405b3b8ef2fec2aab3e22bff23f89a58ff0dc015fece5d3ed3f5496a dbd0df42d534904de00b6389f68867646e9d7c3d0b1dffd74070b2d0f2049b9f1dc7b0c9651c59be3ea891674725e1f2f7a484a941615b80211105978369cf71 ''') +flash_layout_hardcoded_0090 = [ + # id type access offset size + # lvl + PartitionInfo(1, 4, 7, 0x00001000, 0x00001000), # cert store + PartitionInfo(2, 1, 2, 0x00002000, 0x0003e000), # xpfwext + PartitionInfo(5, 5, 3, 0x00040000, 0x00008000), # ??? + PartitionInfo(6, 6, 3, 0x00048000, 0x00008000), # calibration data + PartitionInfo(4, 3, 5, 0x00050000, 0x00030000), # template database +] + +partition_signature_0090 = unhex(''' +e44f7a80d6137794d330b5d026c328a73c907f3f653d411255b7c2f8b425d870a8a53c6630ca864b84590e3c6786f0d69be4bbab5736388f8527237a0a86bbce +7ced9450c4964709e89ac535aa00787158e0a8d9b1fb75f0f7ae53d4bd11abfcf5ee67a5a71e248a426b3aff4567048fa93de65939ccfbe3f31149a82c64fbfd +6a2a6cf748e1d9bd8562cf39b1a4b307b37be223317b1b817e364f2877d29d123731314aa627cbf234e0ea69a406a4735a03a45495023ef706bdb542c949d243 +ac2c08c00abf43faa5528a0a8e49b02c507b01b6f1c9abffc669d8c84d7e4a714da32aade7928eca9698b82bee6b72c642c9add80bbd7ccc4121b80220d52b8a +''') + crypto_backend = default_backend() -def get_partition_signature(): - return partition_signature - - def with_hdr(id: int, buf: bytes): return pack('