diff options
author | Leah Rowe <leah@libreboot.org> | 2024-06-16 00:48:36 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-06-16 00:48:36 +0100 |
commit | 167e7447a5ffdf8937e444ea9bc8ec04bfb66427 (patch) | |
tree | f738e4277db70cc84c7bf67d321fbe5806aa8c65 /script | |
parent | 7bc9fcc34214c7235df865cbe035ea3f565ee01b (diff) |
roms: simplify the serprog build functions
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-x | script/roms | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/script/roms b/script/roms index 09aa1cb1..ca88acc6 100755 --- a/script/roms +++ b/script/roms @@ -77,25 +77,21 @@ mkserprog() build_rp2040_rom() { - board="$1" - printf "Building pico-serprog for %s\n" "$board" - x_ cmake -DPICO_BOARD="$board" -DPICO_SDK_PATH="$picosdk" \ + x_ cmake -DPICO_BOARD="$1" -DPICO_SDK_PATH="$picosdk" \ -B "$picosrc/build" "$picosrc" x_ cmake --build "$picosrc/build" x_ mv "$picosrc/build/pico_serprog.uf2" \ - "bin/serprog_rp2040/serprog_$board.uf2" - printf "output to bin/serprog_rp2040/serprog_%s.uf2\n" "$board" + "bin/serprog_rp2040/serprog_$1.uf2" + printf "output to bin/serprog_rp2040/serprog_%s.uf2\n" "$1" } build_stm32_rom() { - board="$1" - printf "Building stm32-vserprog for %s\n" "$board" - x_ make -C "$stm32src" libopencm3-just-make BOARD=$board - x_ make -C "$stm32src" BOARD=$board + x_ make -C "$stm32src" libopencm3-just-make BOARD=$1 + x_ make -C "$stm32src" BOARD=$1 x_ mv "$stm32src/stm32-vserprog.hex" \ - "bin/serprog_stm32/serprog_$board.hex" - printf "output to bin/serprog_stm32/serprog_%s.hex\n" "$board" + "bin/serprog_stm32/serprog_$1.hex" + printf "output to bin/serprog_stm32/serprog_%s.hex\n" "$1" } list_serprog_boards() |