mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix backup opcode setting
This commit is contained in:
parent
11673da5f6
commit
c33dee152d
1 changed files with 4 additions and 4 deletions
|
|
@ -498,8 +498,8 @@ def check_header(backup):
|
||||||
checksum_region_len = int.from_bytes(backup[i:i+4], 'little') * 4096
|
checksum_region_len = int.from_bytes(backup[i:i+4], 'little') * 4096
|
||||||
print("Checksum region length: 0x{:x}".format(checksum_region_len))
|
print("Checksum region length: 0x{:x}".format(checksum_region_len))
|
||||||
i += 4
|
i += 4
|
||||||
total_checksums = int.from_bytes(backup[i:i+4], 'little') + 1
|
total_checksums = int.from_bytes(backup[i:i+4], 'little')
|
||||||
print("Number of checksums, including the header checksum itself: {}".format(total_checksums))
|
print("Number of checksum blocks: {}".format(total_checksums))
|
||||||
i += 4
|
i += 4
|
||||||
header_total_size = int.from_bytes(backup[i:i+4], 'little')
|
header_total_size = int.from_bytes(backup[i:i+4], 'little')
|
||||||
print("Header total length in bytes: {}".format(header_total_size))
|
print("Header total length in bytes: {}".format(header_total_size))
|
||||||
|
|
@ -529,8 +529,8 @@ def check_header(backup):
|
||||||
# TODO: checksums on data region
|
# TODO: checksums on data region
|
||||||
|
|
||||||
op = int.from_bytes(backup[i:i+4], 'little')
|
op = int.from_bytes(backup[i:i+4], 'little')
|
||||||
print("Opcode (should be 0): {}".format(op))
|
print("Opcode (should be 1): {}".format(op))
|
||||||
if op != 0:
|
if op != 1:
|
||||||
print("Opcode is incorrect.")
|
print("Opcode is incorrect.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue