diff options
author | Balbir Singh <bsingharora@gmail.com> | 2018-05-02 15:08:02 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-05-24 04:03:20 -0500 |
commit | 8cbe91569112a7ee5b741fcdee72f8195fdbb59b (patch) | |
tree | 7c1e2ed26b696d876c8ea29c20747f2220842124 /external | |
parent | 277615348ba64dbdff426206d1b6a619811163b1 (diff) | |
download | skiboot-8cbe91569112a7ee5b741fcdee72f8195fdbb59b.zip skiboot-8cbe91569112a7ee5b741fcdee72f8195fdbb59b.tar.gz skiboot-8cbe91569112a7ee5b741fcdee72f8195fdbb59b.tar.bz2 |
external/mambo: Add support for readline if it exists
Add support for tclreadline package if it is present.
This patch loads the package and uses it when the
simulation stops for any reason.
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/mambo/skiboot.tcl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl index f3684a7..7068c80 100644 --- a/external/mambo/skiboot.tcl +++ b/external/mambo/skiboot.tcl @@ -1,6 +1,17 @@ # need to get images path defined early source $env(LIB_DIR)/ppc/util.tcl +# +# Call tclreadline's Loop to move to friendlier +# commandline if one exists +# +proc readline { } { + set readline [catch { package require tclreadline }] + if { $readline == 0 } { + ::tclreadline::Loop + } +} + proc mconfig { name env_name def } { global mconf global env @@ -531,5 +542,7 @@ epapr::of2dtb mysim $mconf(epapr_dt_addr) mysim mode fastest if { [info exists env(SKIBOOT_AUTORUN)] } { - mysim go + if [catch { mysim go }] { + readline + } } |