From 598a4b409fd135beaf3bb65b8c0dc6f36bd10c00 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 20 Sep 2023 10:55:10 -0500 Subject: payloads/edk2/Makefile: Improve dirty repo check, sync submodules Don't skip checking out the specified edk2 branch if the repo contains untracked files, which may be the case if the EDK2_GOP_DRIVER option is selected. Also ensure the submodule pointers are correct when checking out. TEST=build google/panther with GOP driver option and edk2 payload 2x, switching branches between builds and ensure the correct branch is used each time and submodules are synced with branch. Change-Id: If7040bd5c49209b37a4b308485bf59352197d3b6 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/78030 Tested-by: build bot (Jenkins) Reviewed-by: Martin L Roth Reviewed-by: Sean Rhodes --- payloads/external/edk2/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'payloads') diff --git a/payloads/external/edk2/Makefile b/payloads/external/edk2/Makefile index e9dbab464e..f30d92fee2 100644 --- a/payloads/external/edk2/Makefile +++ b/payloads/external/edk2/Makefile @@ -194,9 +194,10 @@ $(EDK2_PATH): $(WORKSPACE) echo " $(CONFIG_EDK2_TAG_OR_REV) is not a valid git reference"; \ exit 1; \ fi; \ - if git status --ignore-submodules=dirty | grep -q clean; then \ + if git status --ignore-submodules=dirty | grep -q -e clean -e "nothing added"; then \ echo " Checking out $(project_name) revision $(CONFIG_EDK2_TAG_OR_REV)"; \ git checkout --detach $(CONFIG_EDK2_TAG_OR_REV) -f; \ + git submodule update --checkout --recursive; \ else \ echo " Working directory not clean; will not overwrite"; \ fi; \ -- cgit v1.2.3