From 182ee8e4163b79984b6c775688f1b27e9a62d514 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 20 Oct 2023 08:03:45 +0100 Subject: update/trees: don't run make if mode=fetch this fixes a regression caused by a previous revision Signed-off-by: Leah Rowe --- config/git/pico-serprog | 20 ++++++++++++++++++++ config/git/rpi-pico-serprog | 20 -------------------- include/git.sh | 13 ++++++++----- script/update/trees | 12 +++++++++--- 4 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 config/git/pico-serprog delete mode 100644 config/git/rpi-pico-serprog diff --git a/config/git/pico-serprog b/config/git/pico-serprog new file mode 100644 index 00000000..18df2a66 --- /dev/null +++ b/config/git/pico-serprog @@ -0,0 +1,20 @@ +{pico-serprog}{ + rev: c8c16e9c11fe9e5b7230ff358f79de3f1951e1d9 + loc: pico-serprog + url: https://codeberg.org/libreboot/pico-serprog + bkup_url: https://notabug.org/libreboot/pico-serprog + depend: rpi-pico-sdk + depend: rpi-pico-tinyusb +} + +{rpi-pico-sdk}{ + rev: 6a7db34ff63345a7badec79ebea3aaef1712f374 + loc: pico-sdk + url: https://github.com/raspberrypi/pico-sdk +} + +{rpi-pico-tinyusb}{ + rev: 86c416d4c0fb38432460b3e11b08b9de76941bf5 + loc: pico-sdk/lib/tinyusb + url: https://github.com/hathach/tinyusb.git +} diff --git a/config/git/rpi-pico-serprog b/config/git/rpi-pico-serprog deleted file mode 100644 index 18df2a66..00000000 --- a/config/git/rpi-pico-serprog +++ /dev/null @@ -1,20 +0,0 @@ -{pico-serprog}{ - rev: c8c16e9c11fe9e5b7230ff358f79de3f1951e1d9 - loc: pico-serprog - url: https://codeberg.org/libreboot/pico-serprog - bkup_url: https://notabug.org/libreboot/pico-serprog - depend: rpi-pico-sdk - depend: rpi-pico-tinyusb -} - -{rpi-pico-sdk}{ - rev: 6a7db34ff63345a7badec79ebea3aaef1712f374 - loc: pico-sdk - url: https://github.com/raspberrypi/pico-sdk -} - -{rpi-pico-tinyusb}{ - rev: 86c416d4c0fb38432460b3e11b08b9de76941bf5 - loc: pico-sdk/lib/tinyusb - url: https://github.com/hathach/tinyusb.git -} diff --git a/include/git.sh b/include/git.sh index 2976ff33..7f4b1f40 100755 --- a/include/git.sh +++ b/include/git.sh @@ -13,9 +13,11 @@ fetch_project_trees() [ -d "src/${project}/${project}" ] || fetch_from_upstream fetch_config [ -z "${rev}" ] && err "fetch_project_trees $target: undefined rev" - [ -d "src/${project}/${tree}" ] && \ + if [ -d "src/${project}/${tree}" ]; then printf "download/%s %s (%s): exists\n" \ - "${project}" "${tree}" "${_target}" 1>&2 && return 0 + "${project}" "${tree}" "${_target}" 1>&2 + return 0 + fi prepare_new_tree } @@ -60,9 +62,10 @@ prepare_new_tree() git_reset_rev "src/${project}/${tree}" "${rev}" ( x_ cd "src/${project}/${tree}" - [ ! -f ".gitmodules" ] || \ - git submodule update --init --checkout || \ - err "prepare_new_tree ${project}/${tree}: can't update git modules" + if [ -f ".gitmodules" ]; then + git submodule update --init --checkout || \ + err "prepare_new_tree ${project}/${tree}: !submodules" + fi ) git_am_patches "$PWD/src/$project/$tree" "$PWD/$cfgsdir/$tree/patches" } diff --git a/script/update/trees b/script/update/trees index a71dbec0..88f22c31 100755 --- a/script/update/trees +++ b/script/update/trees @@ -45,7 +45,10 @@ build_projects() { [ $# -gt 0 ] && x_ ./update trees ${_f} ${@} - [ "${mode}" = "fetch" ] && fetch_project_repo && return 0 + if [ "${mode}" = "fetch" ]; then + fetch_project_repo + return 0 + fi codedir="src/${project}" [ -d "${codedir}" ] || x_ ./update trees -f "${project}" @@ -131,7 +134,10 @@ handle_src_tree() romtype="normal" target_dir="${cfgsdir}/${target}" - [ "${mode}" = "fetch" ] && fetch_project_trees && return 1 + if [ "${mode}" = "fetch" ]; then + fetch_project_trees + return 1 + fi x_ mkdir -p "${elfdir}/${target}" eval "$(setvars "" arch tree)" @@ -159,7 +165,7 @@ handle_src_tree() [ "$project" != "coreboot" ] && [ "$project" != "u-boot" ] && return 0 # u-boot and coreboot are both compiled with coreboot's crossgcc - [ -z ${mode} ] || return 0 + [ -z "${mode}" ] || return 0 check_cross_compiler } -- cgit v1.2.1