mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-20 21:38:26 +00:00
12 lines
237 B
Python
Executable File
12 lines
237 B
Python
Executable File
#!/usr/bin/env python
|
|
import sys
|
|
import os
|
|
|
|
fn = sys.argv[1]
|
|
fs = os.stat(fn).st_size
|
|
if fs > 32768:
|
|
raise Exception('bootloader has to be smaller than 32768 bytes')
|
|
with open(fn, 'ab') as f:
|
|
f.write(b'\x00' * (32768 - fs))
|
|
f.close()
|