From 42eac07beb4da42a182d2a87d6b2e928fc9a31cf Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Wed, 18 Oct 2017 15:15:15 +0100 Subject: edk2-build.sh: import OpenSSL by default Since now needed for more than just Secure Boot (overdrive capsule update), import OpenSSL to CryptoPkg by default unless --no-openssl is specified. Also do this only once, rather than checking for each platform. Signed-off-by: Leif Lindholm --- edk2-build.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/edk2-build.sh b/edk2-build.sh index 20686f6..3e218b3 100755 --- a/edk2-build.sh +++ b/edk2-build.sh @@ -20,6 +20,7 @@ WORKSPACE= EDK2_DIR= PLATFORMS_DIR= NON_OSI_DIR= +IMPORT_OPENSSL=TRUE OPENSSL_CONFIGURED=FALSE # Number of threads to use for build @@ -71,10 +72,6 @@ function do_build echo "PLATFORM_PACKAGES_PATH=$PLATFORM_PACKAGES_PATH" fi - if [[ "${PLATFORM_BUILDFLAGS}" =~ "SECURE_BOOT_ENABLE=TRUE" ]]; then - import_openssl - fi - set_cross_compile CROSS_COMPILE="$TEMP_CROSS_COMPILE" @@ -226,6 +223,17 @@ function prepare_build echo " !!! BaseTools failed to build !!! " >&2 exit 1 fi + + if [ "$IMPORT_OPENSSL" = "TRUE" ]; then + cd $EDK2_DIR + import_openssl + if [ $? -ne 0 ]; then + echo "Importing OpenSSL failed - aborting!" >&2 + echo " specify --no-openssl to attempt build anyway." >&2 + exit 1 + fi + cd $WORKSPACE + fi } @@ -313,6 +321,9 @@ while [ "$1" != "" ]; do usage exit ;; + --no-openssl) + IMPORT_OPENSSL=FALSE + ;; -n | --non-osi-dir) shift NON_OSI_DIR="`readlink -f $1`" -- cgit v1.2.3