1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-27 00:28:10 +00:00
trezor-firmware/legacy/bootloader/combine/prepare.py

13 lines
349 B
Python
Raw Normal View History

2017-02-04 10:20:58 +00:00
#!/usr/bin/env python
from __future__ import print_function
bl = open("bl.bin").read()
fw = open("fw.bin").read()
combined = bl + fw[:256] + (32768 - 256) * "\x00" + fw[256:]
2014-10-23 16:09:41 +00:00
open("combined.bin", "w").write(combined)
2014-10-23 16:09:41 +00:00
print("bootloader : %d bytes" % len(bl))
print("firmware : %d bytes" % len(fw))
print("combined : %d bytes" % len(combined))