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
2021-10-13 11:53:17 +02:00

12 lines
295 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(f"bootloader : {len(bl)} bytes")
print(f"firmware : {len(fw)} bytes")
print(f"combined : {len(combined)} bytes")