genode/tool/run/log/spike
Sebastian Sumpf 7113c17100 run: update RISC-V run script support
* fix build error for bbl upon intial build
* set memory to 128 MB in spike
* support 'forever' timeout

issue #2423
2017-08-30 09:59:59 +02:00

35 lines
627 B
Plaintext

source [genode_dir]/tool/run/log.inc
source [genode_dir]/tool/run/spike.inc
proc run_log { wait_for_re timeout_value } {
global spike_spawn_id
global output_spawn_id
set kernel_msg [run_boot_string]
set output_spawn_id $spike_spawn_id
if {$wait_for_re == "forever"} {
set timeout -1
} else {
set timeout $timeout_value
}
expect {
-i $output_spawn_id $kernel_msg { }
eof {
puts stderr "Aborting, received EOF"
return false
}
timeout {
puts stderr "Boot process timed out"
close
return false
}
}
wait_for_output $wait_for_re $timeout_value $spike_spawn_id
return true
}