From 6d0803162b22c9b8327061430d8cf38f4bca2e3a Mon Sep 17 00:00:00 2001 From: Krystian Hebel Date: Sat, 5 Aug 2023 08:28:27 +0200 Subject: [PATCH] Makefile: fix for multiple coreboot CI builds Another approach at #1449 Signed-off-by: Krystian Hebel --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 35fe6578d..e291766d1 100644 --- a/Makefile +++ b/Makefile @@ -303,12 +303,16 @@ define define_module = elif [ "$$$$(cat "$$@")" != '$($1_repo)|$($1_commit_hash)' ]; then \ echo "Switching $1 to $($1_repo) at $($1_commit_hash)" && \ git -C "$(build)/$($1_base_dir)" reset --hard HEAD^ && \ - git -C "$(build)/$($1_base_dir)" remote set-url origin $($1_repo) && \ - git -C "$(build)/$($1_base_dir)" checkout origin > /dev/null 2>&1 && \ + echo "git fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no" && \ + git -C "$(build)/$($1_base_dir)" fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no && \ + echo "git reset --hard $($1_commit_hash)" && \ git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash) && \ + echo "git clean" && \ git -C "$(build)/$($1_base_dir)" clean -df && \ git -C "$(build)/$($1_base_dir)" clean -dffx payloads util/cbmem && \ + echo "git submodule sync" && \ git -C "$(build)/$($1_base_dir)" submodule sync && \ + echo "git submodule update" && \ git -C "$(build)/$($1_base_dir)" submodule update --init --checkout && \ echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \ fi