From 5fa82cc4cb9bc720ed240b1a6ceb63a3c8b97455 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 19 Jul 2017 12:52:36 +0200 Subject: [PATCH] bootloader: align during docker build --- bootloader-docker-build.sh | 2 +- bootloader/firmware_align.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootloader-docker-build.sh b/bootloader-docker-build.sh index 7387d6314..529e1528b 100755 --- a/bootloader-docker-build.sh +++ b/bootloader-docker-build.sh @@ -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 "---------------------" diff --git a/bootloader/firmware_align.py b/bootloader/firmware_align.py index 5be6e7163..b07bf0eb2 100755 --- a/bootloader/firmware_align.py +++ b/bootloader/firmware_align.py @@ -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()