1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 14:58:09 +00:00

legacy/bootloader: update combine script

This commit is contained in:
Pavol Rusnak 2020-01-23 13:01:03 +01:00
parent 06003d0e01
commit 0b3d0c6681
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 5 additions and 8 deletions

View File

@ -1,11 +1,10 @@
#!/usr/bin/env python
from __future__ import print_function
#!/usr/bin/env python3
bl = open("bl.bin").read()
fw = open("fw.bin").read()
combined = bl + fw[:256] + (32768 - 256) * "\x00" + fw[256:]
bl = open("bl.bin", "rb").read()
fw = open("fw.bin", "rb").read()
combined = bl + 32768 * b"\xff" + fw
open("combined.bin", "w").write(combined)
open("combined.bin", "wb").write(combined)
print("bootloader : %d bytes" % len(bl))
print("firmware : %d bytes" % len(fw))

View File

@ -1,6 +1,4 @@
#!/usr/bin/env python3
from __future__ import print_function
import argparse
import hashlib
import struct