From e2d39359bef4185f29e4f7eafe3722ee94355f68 Mon Sep 17 00:00:00 2001 From: Srikar Josyula Date: Fri, 12 Apr 2024 13:55:03 +0530 Subject: [PATCH] Removing WORKSPACE dependency from .inf files - Resolves #446 - -I compiler option now uses BSA_PATH instead of WORKSPACE. - BSA_PATH to be set by acsbuild.sh script. Signed-off-by: Srikar Josyula --- tools/scripts/acsbuild.sh | 13 +++++++++++++ uefi_app/SbsaAvs.inf | 2 +- uefi_app/SbsaAvsNist.inf | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/scripts/acsbuild.sh b/tools/scripts/acsbuild.sh index 466670c7..cdc4206b 100755 --- a/tools/scripts/acsbuild.sh +++ b/tools/scripts/acsbuild.sh @@ -22,6 +22,19 @@ then return 0 fi +# Get the path of the current shell script. Based on the script path navigate to sbsa-acs path +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +sbsa_path="$(dirname "$(dirname "$script_dir")")" +echo "sbsa-acs path is: $(realpath "$sbsa_path")" + +# Use the default bsa-acs directory +bsa_path="$sbsa_path/../bsa-acs" + +# Export BSA_PATH to bsa-acs path. This will be used in .inf files with -I compiler option. +export BSA_PATH=$(realpath "$bsa_path") +echo "bsa-acs path set to: $(realpath "$bsa_path")" + NISTStatus=1; function build_with_NIST() diff --git a/uefi_app/SbsaAvs.inf b/uefi_app/SbsaAvs.inf index 805db644..565e9bc2 100644 --- a/uefi_app/SbsaAvs.inf +++ b/uefi_app/SbsaAvs.inf @@ -227,4 +227,4 @@ [BuildOptions] GCC:*_*_*_ASM_FLAGS = -march=armv8.1-a - GCC:*_*_*_CC_FLAGS = -O0 -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/ -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/sbsa -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/common -I${WORKSPACE}/ShellPkg/Application/bsa-acs/ + GCC:*_*_*_CC_FLAGS = -O0 -I${BSA_PATH}/ -I${BSA_PATH}/val/ -I${BSA_PATH}/val/sbsa -I${BSA_PATH}/val/common \ No newline at end of file diff --git a/uefi_app/SbsaAvsNist.inf b/uefi_app/SbsaAvsNist.inf index 5304ec92..f800eb7c 100644 --- a/uefi_app/SbsaAvsNist.inf +++ b/uefi_app/SbsaAvsNist.inf @@ -231,4 +231,4 @@ [BuildOptions] GCC:*_*_*_ASM_FLAGS = -march=armv8.1-a - GCC:*_*_*_CC_FLAGS = -O0 -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/ -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/sbsa -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/common -I${WORKSPACE}/ShellPkg/Application/bsa-acs/ + GCC:*_*_*_CC_FLAGS = -O0 -I${BSA_PATH}/ -I${BSA_PATH}/val/ -I${BSA_PATH}/val/sbsa -I${BSA_PATH}/val/common