From f8189b1d81d83c05d64bd61fa0dc4ed4a1047af4 Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Fri, 4 Jan 2019 11:45:30 -0600 Subject: Change code using SANDBOX ENVAR to use CLI variables start sim scripts The PHYP simics environment does not use an ODE sandbox for running simics. They are using the hostboot startup scripts though. Hostboot cannot rely on any artifacts from the sandbox such as sandbox related ENV variables in these scripts. Change-Id: I1e736149bb341d880c92905447614619d0d7b65c CQ: SW453636 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70101 Tested-by: Jenkins Server Reviewed-by: CALEB SCHLOSSIN Tested-by: Jenkins OP Build CI Reviewed-by: Matt Derksen Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/build/simics/startup.simics | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/build/simics') diff --git a/src/build/simics/startup.simics b/src/build/simics/startup.simics index f7ed4765d..bf86020ec 100755 --- a/src/build/simics/startup.simics +++ b/src/build/simics/startup.simics @@ -1,10 +1,21 @@ -# Initialize HB search paths. -$sandbox_base = (shell "printenv SANDBOXBASE") -$script_dir = $sandbox_base + "/obj/ppc/simu/scripts" -add-directory $script_dir +# $hb_script_to_run is only set in Axone Standalone and onwards +# we need to add the script directory in the Axone standalone model +# for the older models the directory is already in the path +if defined hb_script_to_run { + $hb_script_location = (python "''.join(map('/'.__add__,\""+$hb_script_to_run+"\"[1:].split('/')[0:-1]))") + $script_dir = (python "''.join(map('/'.__add__,\""+$hb_script_location+"\"[1:].split('/')[0:-1]))") + add-directory $script_dir +} + $hb_startup_path = (lookup-file hbfw/startup.simics) -$hb_script_location = (python "''.join(map('/'.__add__,\""+$hb_startup_path+"\"[1:].split('/')[0:-1]))") + +# if we are in older simics models (before Axone standalone) +# we must now set $hb_script_location as it is not above +if not defined hb_script_location { + $hb_script_location = (python "''.join(map('/'.__add__,\""+$hb_startup_path+"\"[1:].split('/')[0:-1]))") +} + python "os.environ['HB_TOOLPATH'] = \""+$hb_script_location+"\"" $machine_name = (shell "printenv MACHINE") -- cgit v1.2.1