legacy/bootloader: update combine script

pull/801/head
Pavol Rusnak 4 years ago
parent 06003d0e01
commit 0b3d0c6681
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -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))

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

Loading…
Cancel
Save