diff options
author | Adam Muhle <armuhle@us.ibm.com> | 2012-05-22 13:49:16 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-05-30 11:24:08 -0500 |
commit | 2209239487539932f9bed10b4362dae65c131b1c (patch) | |
tree | dce9e16a02a895daddc9a468867f7e2e1223b812 /src/build | |
parent | 7ac513554e1d891433baf401c9138d7a4791c767 (diff) | |
download | talos-hostboot-2209239487539932f9bed10b4362dae65c131b1c.tar.gz talos-hostboot-2209239487539932f9bed10b4362dae65c131b1c.zip |
Tool changes to load hostboot files to new locations for simics
Tweaked our various scripts to put the hostboot images in
$sb/../images/ppc/lab/flash as that is where simics
looks for them now.
Change-Id: I3b019a460a6f5f03ad666d93724ec1d6fe1ff3c9
RTC: 35728
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1095
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-x | src/build/citest/etc/workarounds.postsimsetup | 8 | ||||
-rwxr-xr-x | src/build/simics/post_model_hook.simics | 2 | ||||
-rwxr-xr-x | src/build/tools/cpfiles.pl | 36 | ||||
-rwxr-xr-x | src/build/tools/hb | 2 |
4 files changed, 31 insertions, 17 deletions
diff --git a/src/build/citest/etc/workarounds.postsimsetup b/src/build/citest/etc/workarounds.postsimsetup index 821b936fa..fa77253c3 100755 --- a/src/build/citest/etc/workarounds.postsimsetup +++ b/src/build/citest/etc/workarounds.postsimsetup @@ -26,14 +26,6 @@ ## Workarounds that are run after start_simics is executed for the first time ## to setup the sandbox ## - -##### -echo "+++ Point Simics to our base image +++" -#ln -sf $sb/../img/hbicore.bin $sb/../simics/hostboot.bin -mkdir -p $sb/../images/ppc/lab/flash/ -ln -sf $sb/../img/hbicore.bin $sb/../images/ppc/lab/flash/hostboot.bin -##### - ##### #@fixme - Fix with RTC:41342 echo "+++ Copy centaur.act" diff --git a/src/build/simics/post_model_hook.simics b/src/build/simics/post_model_hook.simics index 656b55b8e..3a8e54be1 100755 --- a/src/build/simics/post_model_hook.simics +++ b/src/build/simics/post_model_hook.simics @@ -36,7 +36,7 @@ run-python-file simics-debug-framework.py run-python-file hb-simdebug.py #Load PNOR image into phys_mem -phys_mem.load-file ../img/simics.pnor 0x400000 +phys_mem.load-file ../images/ppc/lab/flash/simics.pnor 0x400000 phys-mem.load-file ./sysmvpd.dat 0x681000 phys-mem.load-file ./sysspd.dat 0x701000 diff --git a/src/build/tools/cpfiles.pl b/src/build/tools/cpfiles.pl index 47bd16501..cd907aa77 100755 --- a/src/build/tools/cpfiles.pl +++ b/src/build/tools/cpfiles.pl @@ -44,6 +44,7 @@ use warnings; use Cwd; use File::Basename; use File::Spec; +use File::Path; #------------------------------------------------------------------------------ # Forward Declaration @@ -185,13 +186,12 @@ if ($inDir ne "") if (basename($inDir) eq "src") { #Check if img dir exists else will copy .bin files to simics dir - $imgDir = File::Spec->catdir($inDir, "../img"); + $imgDir = File::Spec->catdir($inDir, "../images/ppc/lab/flash"); $simicsDir = File::Spec->catdir($inDir, "../simics"); - unless (-d ($inDir."/../img")) + unless (-d ($imgDir)) { - $imgDir = $simicsDir; - print "No img directory found in sandbox. Copying .bin files"; - print " to simics directory\n"; + print "Creating path to image/ppc/lab/flash directory in sandbox.\n"; + mkpath($imgDir); } } } @@ -206,7 +206,7 @@ elsif (defined ($sandbox)) #Check if simics and img dirs exist, else exit $simicsDir = File::Spec->catdir($sandbox, "simics"); - $imgDir = File::Spec->catdir($sandbox, "img"); + $imgDir = File::Spec->catdir($sandbox, "images/ppc/lab/flash"); print "simics dir = $simicsDir\n img dir = $imgDir\n"; unless ((-d $simicsDir) && (-d $imgDir)) @@ -355,7 +355,29 @@ while ( my ($key, $value) = each(%files) ) if ("s" eq $env) #simics { - # create a sym-link to the appropriate pnor binary + # create a sim-link from hostboot name for PNOR to name simics uses. + print "Linking in simics_".$machine.".pnor to name used by simics\n"; + $command = sprintf("ln -sf %s/simics_%s.pnor %s/%s.pnor", $imgDir, $machine, $imgDir, lc($machine) ); + print "$command\n"; + `$command`; + if( $? != 0 ) + { + print "ERROR : exiting\n"; + exit(-1); + } + + # create a sym-link to hostboot.bin for simics + print "Linking hbicore.bin to hostboot.bin\n"; + $command = sprintf("ln -sf %s/hbicore.bin %s/hostboot.bin", $imgDir, $imgDir ); + print "$command\n"; + `$command`; + if( $? != 0 ) + { + print "ERROR : exiting\n"; + exit(-1); + } + + # create a sym-link to the appropriate pnor binary for simics post script loading PNOR to fake pnor print "Linking in simics_".$machine.".pnor\n"; $command = sprintf("ln -sf %s/simics_%s.pnor %s/simics.pnor", $imgDir, $machine, $imgDir ); print "$command\n"; diff --git a/src/build/tools/hb b/src/build/tools/hb index 5e2e513a6..5714bfb5a 100755 --- a/src/build/tools/hb +++ b/src/build/tools/hb @@ -309,7 +309,7 @@ hb_simsetup() execute_in_sandbox "export BACKING_BUILD=\$bb && ./workarounds.postsimsetup" "ppc" rm ${SANDBOXBASE}/src/workarounds.postsimsetup - mkdir ${SANDBOXBASE}/img + mkdir -p ${SANDBOXBASE}/images/ppc/lab/flash # Put a starter copy of errl to simics directory; refresh w/ "hb errlparser" cd ${SANDBOXBASE}/simics |