diff options
| author | Stephen Cprek <smcprek@us.ibm.com> | 2017-11-06 16:51:54 -0600 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-11-19 15:40:17 -0500 |
| commit | f4d54e9c85b36d7d557003ebdfbeb3182636e904 (patch) | |
| tree | 6ebabc54b1cf9de8bdbf1a8bf11c8a3e1ddb4968 /src/build/tools/hb | |
| parent | 1f2edbc95b80c24c9eef2f0be50fbefda7b04780 (diff) | |
| download | talos-hostboot-f4d54e9c85b36d7d557003ebdfbeb3182636e904.tar.gz talos-hostboot-f4d54e9c85b36d7d557003ebdfbeb3182636e904.zip | |
Fix standalone compile and simics when secureboot compiled out
Change-Id: Ia5e50817208eee672c7899441166add7af718c02
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49329
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/tools/hb')
| -rwxr-xr-x | src/build/tools/hb | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/build/tools/hb b/src/build/tools/hb index 7771a1d4b..22e5ca7ed 100755 --- a/src/build/tools/hb +++ b/src/build/tools/hb @@ -392,8 +392,25 @@ hb_startsimics() fi needs_machine_variable - # Force simics into Secure Mode - export SECURITY_HW_POLICY="1" + + # Dynamically check config file if secureboot enabled build occurred and + # set mode accordingly + if [[ -f ${PROJECT_ROOT}/obj/genfiles/config.h ]]; then + if cat ${PROJECT_ROOT}/obj/genfiles/config.h | grep -q "CONFIG_SECUREBOOT 1"; then + echo "In secure mode" + if [ -z "${SECURITY_HW_POLICY}" ]; then + export SECURITY_HW_POLICY="1" + fi + else + if [ -z "${SECURITY_HW_POLICY}" ]; then + export SECURITY_HW_POLICY="0" + fi + echo "In unsecure mode" + fi + else + echo "File DNE ${PROJECT_ROOT}/obj/genfiles/config.h" + exit -1 + fi execute_in_sandbox \ "start_simics -machine ${MACHINE} ${SIMICSOPTIONS} $*" "ppc" } |

