1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

bootloader: align during docker build

This commit is contained in:
Pavol Rusnak 2017-07-19 12:52:36 +02:00
parent 1c55ec0fb3
commit 5fa82cc4cb
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ docker run -t -v $(pwd)/output:/output $IMAGETAG /bin/sh -c "\
git submodule update --init && \
CFLAGS='-std=c99' make -C vendor/libopencm3 && \
make && \
make -C bootloader && \
make -C bootloader align && \
cp bootloader/bootloader.bin /output/bootloader-$FIRMWARETAG.bin"
echo "---------------------"

View File

@ -7,5 +7,5 @@ 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(os.urandom(32768 - fs))
f.write(b'\xFF' * (32768 - fs))
f.close()