summaryrefslogtreecommitdiff
path: root/script/roms
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-18 01:50:40 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-18 01:50:40 +0100
commitea5b5b0720c520c632650c908c5ca6460b338d6b (patch)
tree90686c188ca3a925216528068129407d8e38d7b6 /script/roms
parentea9bdfce4b5cf1ffdd60963b0f6cd4c9f02b5def (diff)
roms: simplified serprog image copy
use eval to avoid having two mv commands Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/roms')
-rwxr-xr-xscript/roms7
1 files changed, 3 insertions, 4 deletions
diff --git a/script/roms b/script/roms
index 61f87bb1..50fda2d0 100755
--- a/script/roms
+++ b/script/roms
@@ -13,8 +13,10 @@ set -u -e
seavgabiosrom="elf/seabios/default/libgfxinit/vgabios.bin"
cfgsdir="config/coreboot"
rp2040src="src/pico-serprog"
+rp2040x="$rp2040src/build/pico_serprog.uf2"
picosdk="src/pico-sdk"
stm32src="src/stm32-vserprog"
+stm32x="$stm32src/stm32-vserprog.hex"
tmpcfg="$tmpdir/tmpcfg"
# Disable all payloads by default.
@@ -81,14 +83,11 @@ mkserprogfw()
x_ cmake -DPICO_BOARD="$2" -DPICO_SDK_PATH="$picosdk" \
-B "$rp2040src/build" "$rp2040src"
x_ cmake --build "$rp2040src/build"
- x_ mv "$rp2040src/build/pico_serprog.uf2" \
- "bin/serprog_rp2040/serprog_$2.uf2"
else
x_ make -C "$stm32src" libopencm3-just-make BOARD=$2
x_ make -C "$stm32src" BOARD=$2
- x_ mv "$stm32src/stm32-vserprog.hex" \
- "bin/serprog_stm32/serprog_$2.hex"
fi
+ eval "x_ mv \"\$${1}x\" \"bin/serprog_$1/serprog_$2.\${${1}x##*.}\""
printf "Look in bin/serprog_%s/ for images\n" "$1"
}