1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-29 09:38:08 +00:00
trezor-firmware/legacy/bootloader/combine/prepare.py
2020-01-23 13:01:03 +01:00

12 lines
301 B
Python
Executable File

#!/usr/bin/env python3
bl = open("bl.bin", "rb").read()
fw = open("fw.bin", "rb").read()
combined = bl + 32768 * b"\xff" + fw
open("combined.bin", "wb").write(combined)
print("bootloader : %d bytes" % len(bl))
print("firmware : %d bytes" % len(fw))
print("combined : %d bytes" % len(combined))