mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-29 04:08:46 +00:00
legacy/bootloader: update combine script
This commit is contained in:
parent
06003d0e01
commit
0b3d0c6681
@ -1,11 +1,10 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
bl = open("bl.bin").read()
|
bl = open("bl.bin", "rb").read()
|
||||||
fw = open("fw.bin").read()
|
fw = open("fw.bin", "rb").read()
|
||||||
combined = bl + fw[:256] + (32768 - 256) * "\x00" + fw[256:]
|
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("bootloader : %d bytes" % len(bl))
|
||||||
print("firmware : %d bytes" % len(fw))
|
print("firmware : %d bytes" % len(fw))
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import hashlib
|
import hashlib
|
||||||
import struct
|
import struct
|
||||||
|
Loading…
Reference in New Issue
Block a user