mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
parent
09d81759ee
commit
5d75e6676d
@ -288,7 +288,7 @@ proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id
|
||||
return
|
||||
}
|
||||
if {[is_serial_available]} {
|
||||
spawn_serial $wait_for_re $timeout_value
|
||||
spawn_serial $wait_for_re $timeout_value "L4 Bootstrapper"
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id
|
||||
return
|
||||
}
|
||||
if {[is_serial_available]} {
|
||||
spawn_serial $wait_for_re $timeout_value
|
||||
spawn_serial $wait_for_re $timeout_value "Kernel started!"
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1448,6 +1448,8 @@ extern "C" void kernel()
|
||||
/* kernel initialization */
|
||||
} else {
|
||||
|
||||
Genode::printf("Kernel started!\n");
|
||||
|
||||
/* compose kernel CPU context */
|
||||
static Cpu::Context kernel_context;
|
||||
kernel_context.ip = (addr_t)kernel;
|
||||
|
22
tool/run
22
tool/run
@ -671,16 +671,13 @@ proc exit {{status 0}} {
|
||||
##
|
||||
# Execute scenario expecting output via serial device
|
||||
#
|
||||
proc spawn_serial { wait_for_re timeout_value} {
|
||||
proc spawn_serial { wait_for_re timeout_value kernel_msg } {
|
||||
global spawn_id
|
||||
global serial_cmd
|
||||
global run_target
|
||||
|
||||
if {$wait_for_re == "forever"} {
|
||||
set timeout -1
|
||||
} else {
|
||||
set timeout_value [expr $timeout_value + 30]
|
||||
}
|
||||
set retry 3
|
||||
while { $retry != 0 } {
|
||||
|
||||
if {[regexp "reset" $run_target]} {
|
||||
power_plug_reset
|
||||
@ -688,6 +685,19 @@ proc spawn_serial { wait_for_re timeout_value} {
|
||||
|
||||
eval spawn $serial_cmd
|
||||
set serial_spawn_id $spawn_id
|
||||
|
||||
set timeout 30
|
||||
expect {
|
||||
$kernel_msg { break; }
|
||||
eof { puts stderr "Serial command process died unexpectedly"; incr retry -1; }
|
||||
timeout { puts stderr "Boot process timed out"; close; incr retry -1; }
|
||||
}
|
||||
}
|
||||
if { $retry == 0 } {
|
||||
puts stderr "Boot process failed 3 times in series. I give up!";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
wait_for_output $wait_for_re $timeout_value $serial_spawn_id
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user