roms/edk2: Only initialize required submodules
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Mon, 18 Oct 2021 10:58:16 +0000 (12:58 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 20 Oct 2021 23:26:19 +0000 (16:26 -0700)
The EDK2 firmware images built to test QEMU do not require
the following submodules:

 - MdeModulePkg/Universal/RegularExpressionDxe/oniguruma
 - UnitTestFrameworkPkg/Library/CmockaLib/cmocka

The only submodules required are:

 - ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
 - BaseTools/Source/C/BrotliCompress/brotli
 - CryptoPkg/Library/OpensslLib/openssl
 - MdeModulePkg/Library/BrotliCustomDecompressLib/brotli

Adapt the buildsys machinery to only initialize the required
submodules.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20211018105816.2663195-3-philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
.gitlab-ci.d/edk2.yml
roms/Makefile.edk2
scripts/make-release

index 62497ba47fbd4ddd9b0f268186cb254d7a50d0d4..13d0f8b019f567a13326e4d26c6d048ff7a7fdc4 100644 (file)
@@ -50,7 +50,11 @@ build-edk2:
    GIT_DEPTH: 3
  script: # Clone the required submodules and build EDK2
  - git submodule update --init roms/edk2
- - git -C roms/edk2 submodule update --init
+ - git -C roms/edk2 submodule update --init --
+     ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
+     BaseTools/Source/C/BrotliCompress/brotli
+     CryptoPkg/Library/OpensslLib/openssl
+     MdeModulePkg/Library/BrotliCustomDecompressLib/brotli
  - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
  - echo "=== Using ${JOBS} simultaneous jobs ==="
  - make -j${JOBS} -C roms efi 2>&1 1>edk2-stdout.log | tee -a edk2-stderr.log >&2
index a8ed3255757fa4e57f3a53376ab6045ceb77e82f..fdae0b511f5970dbce8e4a0078da1d8af78b3c31 100644 (file)
@@ -51,7 +51,12 @@ all: $(foreach flashdev,$(flashdevs),../pc-bios/edk2-$(flashdev).fd.bz2) \
 # make-release/tarball scripts.
 submodules:
        if test -d edk2/.git; then \
-               cd edk2 && git submodule update --init --force; \
+               cd edk2 && git submodule update --init --force -- \
+                       ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \
+                       BaseTools/Source/C/BrotliCompress/brotli \
+                       CryptoPkg/Library/OpensslLib/openssl \
+                       MdeModulePkg/Library/BrotliCustomDecompressLib/brotli \
+               ; \
        fi
 
 # See notes on the ".NOTPARALLEL" target and the "+" indicator in
index a2a8cda33c0e0da3caa1f864151595cc7d8db91b..05b14ecc95ebe23dfe3c00be65142dced2f0db5b 100755 (executable)
@@ -27,7 +27,12 @@ git submodule update --init
 # don't necessarily have much control over how a submodule handles its
 # submodule dependencies, so we continue to handle these on a case-by-case
 # basis for now.
-(cd roms/edk2 && git submodule update --init)
+(cd roms/edk2 && \
+    git submodule update --init -- \
+        ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \
+        BaseTools/Source/C/BrotliCompress/brotli \
+        CryptoPkg/Library/OpensslLib/openssl \
+        MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
 popd
 tar --exclude=.git -cjf ${destination}.tar.bz2 ${destination}
 rm -rf ${destination}