summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2017-10-18 15:15:15 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2017-10-18 15:15:15 +0100
commit42eac07beb4da42a182d2a87d6b2e928fc9a31cf (patch)
tree33dde9c45110f33652d469290f3b029fcd1fb8aa
parent083912ccd8b025179c6d71be46f9ac79e44de016 (diff)
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 <leif.lindholm@linaro.org>
-rwxr-xr-xedk2-build.sh19
1 files 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`"