bristlemouth / bm_protocol

Primary Bristlemouth firmware repository
https://www.bristlemouth.org/
Apache License 2.0
10 stars 7 forks source link

[CI] Rename output files #70

Closed towynlin closed 8 months ago

towynlin commented 8 months ago

When running:

python tools/scripts/release/release.py \
  bridge_v1_0-bridge-dbg.elf \
  cmake-build/bridge/src \
  --eng_build \
  -o bridge_debug

I get output including the following:

GIT_SHA: 0DCF1942
Source version: v0.9.1-5-g0dcf1942
Contents of README.txt:

# Firmware update instructions (ENG-v0.9.1-5-g0dcf1942)

...

In the output, you need to find the Node ID of the node you want to update.
Once you have it, place a copy of the `bridge_debug-ENG-v0.9.1-5-g0dcf1942.elf.dfu.bin` file on the SD card,
and rename it to `update_<NODE_ID>.bin`, for example `update_2b64cf4c62a575a0.bin`.

...

To flash the image, run this command in the directory that has the firmware image:
`dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x8000000:leave -D bridge_debug-ENG-v0.9.1-5-g0dcf1942.elf.unified.bin`

**DO NOT INTERRUPT THE DFU PROCESS!**

Release archived in cmake-build/bridge/src/release/bridge_debug-ENG-v0.9.1-5-g0dcf1942.zip

showing that the readme content is being replaced with the intended renaming. Additionally the zip file, the extracted folder, and the binary files inside that folder are all renamed as well.

And the auto_build.py script runs to completion for all the given configs, creating the renamed zip files:

(bristlemouth) zac@532nm bm_protocol % python tools/scripts/release/auto_build.py tools/scripts/release/configs/default.yml                                 
Loading configs from tools/scripts/release/configs/default.yml
Building: bootloader_signing_required
Building: bootloader_development
Building: bridge_debug
Building: bridge_release
Building: aanderaa_debug
Building: aanderaa_release
Building: hello_world_debug