1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00
trezor-firmware/legacy/bootloader/combine/prepare.py

12 lines
295 B
Python
Raw Normal View History

#!/usr/bin/env python3
2017-02-04 10:20:58 +00:00
bl = open("bl.bin", "rb").read()
fw = open("fw.bin", "rb").read()
combined = bl + 32768 * b"\xff" + fw
2014-10-23 16:09:41 +00:00
open("combined.bin", "wb").write(combined)
2014-10-23 16:09:41 +00:00
print(f"bootloader : {len(bl)} bytes")
print(f"firmware : {len(fw)} bytes")
print(f"combined : {len(combined)} bytes")