You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/legacy/bootloader/combine/prepare.py

12 lines
295 B

#!/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")