diff options
author | Leah Rowe <vimuser@noreply.codeberg.org> | 2024-12-28 12:26:39 +0000 |
---|---|---|
committer | Leah Rowe <vimuser@noreply.codeberg.org> | 2024-12-28 12:26:39 +0000 |
commit | 4fa5f696db87e410c5361e2ad597b38f40364cc4 (patch) | |
tree | 3285fc0880cc2d8379412c9a383927bcd7a3257c /include/rom.sh | |
parent | ccc2b4d589fb3315f43443e74c861c47fa2d5ff4 (diff) | |
parent | a5e0360992d5411c098e4434c8617c234932ede8 (diff) |
Merge pull request 'rp2530' (#258) from Riku_V/lbmk:rp2530 into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/258
Diffstat (limited to 'include/rom.sh')
-rw-r--r-- | include/rom.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/rom.sh b/include/rom.sh index ec2ad650..215b9eab 100644 --- a/include/rom.sh +++ b/include/rom.sh @@ -11,7 +11,14 @@ mkserprog() basename -as .h "$serdir/"*.h > "$TMPDIR/ser" || $err "!mk $1 $TMPDIR" while read -r sertarget; do - [ "$1" = "rp2040" ] && x_ cmake -DPICO_BOARD="$sertarget" \ + [ "$1" = "rp2040" ] && + x_ rm -rf "$sersrc/build" \ + && (pt=$(x_ grep "pico_cmake_set" \ + "$picosdk/src/boards/include/boards/$sertarget.h" \ + | grep "PICO_PLATFORM" | cut -d= -f2 | tr -d [:blank:]) + mkdir -p "$sersrc/build_$pt" + ln -srf "$sersrc/build_$pt/" "$sersrc/build") \ + && x_ cmake -DPICO_BOARD="$sertarget" \ -DPICO_SDK_PATH="$picosdk" -B "$sersrc/build" "$sersrc" \ && x_ cmake --build "$sersrc/build" [ "$1" = "stm32" ] && x_ make -C "$sersrc" \ |