commit 0937fc8b935e2e4f641ca4898e835dcc2bdce566 parent 14045825f3601924ae7f2fef2624eed08b508d51 Author: Daniel Barlow <dan@telent.net> Date: Fri, 23 Jan 2026 23:57:45 +0000 ota flash: print number of blocks Diffstat:
| M | otaclient.py | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/otaclient.py b/otaclient.py @@ -57,9 +57,13 @@ def hexy(h): def ddec(h): return "".join("{:02d} ".format(x) for x in bytearray(h)) -for i in range(0, 2 + len(rom_image)//BLOCK_SIZE): +# header block 0 plus n full blocks plus partial block at end +num_blocks = 2 + len(rom_image)//BLOCK_SIZE +print(f"{num_blocks} blocks to send") + +for i in range(0, num_blocks): h = hash_for_block(i) - print(f"block {i} {len(data_for_block(i))}") + print(f"block {i}") sock.send(linked_block(i))