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/bootloader/combine/prepare.py

11 lines
299 B

#!/usr/bin/python
bl = open('bl.bin').read()
fw = open('fw.bin').read()
combined = bl + fw[:256] + (32768-256)*'\x00' + fw[256:]
open('combined.bin', 'w').write(combined)
print 'bootloader : %d bytes' % len(bl)
print 'firmware : %d bytes' % len(fw)
print 'combined : %d bytes' % len(combined)