roms: simplify the serprog build functions

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-06-16 00:48:36 +01:00 committed by Leah Rowe
parent 9897bc748d
commit dd59f2daba
1 changed files with 7 additions and 11 deletions

View File

@ -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()