diff options
author | Christian Geddes <crgeddes@us.ibm.com> | 2019-01-04 11:45:30 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-01-04 18:27:58 -0600 |
commit | f8189b1d81d83c05d64bd61fa0dc4ed4a1047af4 (patch) | |
tree | 26a2323f891fba363e45db3483853f2c158aec16 /src/build/simics/startup.simics | |
parent | 1830d18476443222ac1ed9266f4763e275cb2647 (diff) | |
download | talos-hostboot-f8189b1d81d83c05d64bd61fa0dc4ed4a1047af4.tar.gz talos-hostboot-f8189b1d81d83c05d64bd61fa0dc4ed4a1047af4.zip |
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 <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: CALEB SCHLOSSIN <calebs@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/simics/startup.simics')
-rwxr-xr-x | src/build/simics/startup.simics | 21 |
1 files changed, 16 insertions, 5 deletions
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") |