2017-02-01 09:07:47 -08:00
|
|
|
#!/usr/bin/env python
|
2014-10-23 09:09:41 -07:00
|
|
|
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:
|
2017-07-19 03:52:36 -07:00
|
|
|
f.write(b'\xFF' * (32768 - fs))
|
2014-10-23 09:09:41 -07:00
|
|
|
f.close()
|