[Skiboot] [PATCH 3/3] mambo: Make mambo_utils.tcl optional

Michael Ellerman mpe at ellerman.id.au
Fri Mar 27 15:53:12 AEDT 2015


Only source mambo_utils.tcl if we can find it. This allows using skiboot.tcl
from another directory, which is useful for automated testing.

We need to open code the body of "ton" and "c" obviously, in case we
didn't find skiboot.tcl.

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 external/mambo/skiboot.tcl | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index d32a6272f8ec..54d3e39a6e58 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -81,7 +81,12 @@ source $env(LIB_DIR)/common/epapr.tcl
 if {![info exists of::encode_compat]} {
     source $env(LIB_DIR)/common/openfirmware_utils.tcl
 }
-source mambo_utils.tcl
+
+# Only source mambo_utils.tcl if it exists in the current directory. That
+# allows running mambo in another directory to the one skiboot.tcl is in.
+if { [file exists mambo_utils.tcl] } then {
+	source mambo_utils.tcl
+}
 
 #
 # Instanciate xscom
@@ -169,9 +174,7 @@ for { set i 0 } { $i < $mconf(threads) } { incr i } {
     mysim mcm 0 cpu 0 thread $i config_on    
 }
 
-# Tools
-
 # Turbo mode & run
-ton
-c
+mysim mode turbo
+mysim go
 exit
-- 
2.1.0



More information about the Skiboot mailing list