echo "usage: `/bin/basename $tool` -s <sam start method> <installdir>"
echo ' -s <sam start method> : td(traditonal) for "$build/bin/sam -c $RC -R $ckpt"'
echo ' sb(simulate boot) for "$build/bin/simulate -p n2 -s -Dpop= -c $RC -I system.rc"'
echo ' sr(simulate restore) for "$build/bin/simulate -Dpop= -R $ckpt"'
echo " Get the start.ver file with the specified 'sam start method' and put it in directory <installdir>."
while getopts hs
: OPT
; do
shift `/bin/expr $OPTIND - 1`
if [ "$startmethod" = " " ]; then
echo "Error: I need one -s argument."
set build [lindex \$argv 0]
set ckpt [lindex \$argv 2]
echo 'open SAM "$build/bin/sam -c $RC -R $ckpt"' >>$installfile
echo 'open SAM "$build/bin/simulate -p n2 -s -Dpop= -c $RC -I system.rc"' >>$installfile
echo 'open SAM "$build/bin/simulate -Dpop= -R $ckpt"' >>$installfile
pattern SAM "(guest|hyper)\[^\r]* /dev/(\[^\r]*)\r\n"
if { "\$expect_out(1,string)" == "guest" } {
set guest_tty "/dev/\$expect_out(2,string)"
} elseif { "\$expect_out(1,string)" == "hyper" } {
set hyper_tty "/dev/\$expect_out(2,string)"
send_error "Bad tty parse: \$expect_out(1,string)\n"
set_prompt SAM 'stop: |sam>>> '
open HYPER "-noecho /usr/bin/tip \$hyper_tty"
open GUEST "-noecho /usr/bin/tip \$guest_tty"