diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2023-09-20 10:55:10 -0500 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2023-09-26 16:33:22 +0000 |
commit | 598a4b409fd135beaf3bb65b8c0dc6f36bd10c00 (patch) | |
tree | 1bb9425636780fca64f4d7b870ea775fad4aea48 /payloads/external/edk2 | |
parent | 9031877866fd528f1d1624f0462aeb681e68b576 (diff) |
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 <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78030
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Diffstat (limited to 'payloads/external/edk2')
-rw-r--r-- | payloads/external/edk2/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
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; \ |