summaryrefslogtreecommitdiff
path: root/edk2-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'edk2-build.sh')
-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`"