From 8ddb1c78853d67c91c7e09075761af6155a92436 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 3 May 2024 15:38:20 +0100 Subject: [PATCH] git.sh fix: only download submodules for coreboot In practise, both cbmk and lbmk only need coreboot submodules, but the pico sources download them too, and some of them may not be FSDG compatible. So, this change will be Canoeboot-specific, and only download submodules for coreboot as a result. The required submodules are defined already in config/git, so pico-serprog and stm32-vserprog will work just fine. To be sure: this patch restores behaviour from Canoeboot at release 20231107. Canoeboot inherited some improvements from lbmk and I forgot to adapt the code for this. This behaviour is intentional, as part of Canoeboot's design. Signed-off-by: Leah Rowe --- include/git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/git.sh b/include/git.sh index ba42156..c55b365 100755 --- a/include/git.sh +++ b/include/git.sh @@ -104,7 +104,7 @@ git_prep() git -C "$tmpgit" reset --hard $rev || $err "git -C $_loc: !reset $rev" git_am_patches "$tmpgit" "$_patchdir" || $err "!am $_loc $_patchdir" - if [ "$project" != "coreboot" ] || [ $# -gt 2 ]; then + if [ "$project" = "coreboot" ] && [ $# -gt 2 ]; then [ ! -f "$tmpgit/.gitmodules" ] || git -C "$tmpgit" submodule \ update --init || $err "git_prep $_loc: !submod" if [ "$project" = "coreboot" ] && [ -n "$xtree" ] && \