Skip to content

Commit

Permalink
Change code using SANDBOX ENVAR to use CLI variables start sim scripts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
crgeddes authored and dcrowell77 committed Jan 5, 2019
1 parent 1830d18 commit f8189b1
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/build/simics/startup.simics
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit f8189b1

Please sign in to comment.