Skip to content

Commit 6f66962

Browse files
authored
Update build firmware.sh to add no bootloader build by default (#315)
1 parent 7447f04 commit 6f66962

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

build_firmware.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ echo "
4040
"
4141

4242

43+
echo -e "${INFO}
44+
═════════════════════ Building firmware without bootloader ════════════════
45+
${ENDCOLOR}"
46+
make clean
47+
make disco
48+
cp ./bin/specter-diy.bin ./release/disco-nobootloader.bin
49+
cp ./bin/specter-diy.hex ./release/disco-nobootloader.hex
50+
echo -e "Standard firmware without bootloader saved to release/disco-nobootloader.{bin,hex}"
51+
echo -e "The BIN image can be flashed directly to a development board without the secure bootloader."
52+
4353
echo -e "${INFO}
4454
═════════════════════ Adding signature to the binary ══════════════════════
4555
${ENDCOLOR}"

docs/build.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ To launch a simulator either run `bin/micropython_unix simulate.py` or simly run
123123

124124
If something is not working you can clean up with `make clean`
125125

126+
### Automated build script
127+
128+
The top-level `build_firmware.sh` helper runs the full secure build, including the bootloader and signed upgrade package. It
129+
also creates `release/disco-nobootloader.{bin,hex}`, which contain the plain firmware without the secure bootloader. The
130+
`disco-nobootloader.bin` image is identical to the `nix build` output and can be flashed directly to a development board when
131+
you need a faster iteration loop.
132+
126133
## Run Unittests
127134

128135
Currently unittests work only on linuxport, and there are... not many... Contributions are very welcome!

docs/reproducible-build.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ docker build -t diy .
2222
docker run -ti -v `pwd`:/app diy
2323
```
2424

25+
The container runs `./build_firmware.sh`, which now also drops `release/disco-nobootloader.{bin,hex}` alongside the signed
26+
artifacts. The `disco-nobootloader.bin` image matches the standard `nix build` output and can be flashed directly to a
27+
development board when you want to skip the secure bootloader during testing.
28+
2529
At the end of the build you will be presented with a base32 encoded hash of the firmware upgrade file that should be signed and asked to provide signatures.
2630

2731
Get signatures from the description of the github release and enter one by one in the same order as provided in the release.

0 commit comments

Comments
 (0)