Skip to content

Commit

Permalink
external/mambo: Add support for readline if it exists
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bsingharora authored and stewartsmith committed May 24, 2018
1 parent 2776153 commit 8cbe915
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion external/mambo/skiboot.tcl
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
}
}

0 comments on commit 8cbe915

Please sign in to comment.