mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-08 11:38:10 +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
|
return
|
||||||
}
|
}
|
||||||
if {[is_serial_available]} {
|
if {[is_serial_available]} {
|
||||||
spawn_serial $wait_for_re $timeout_value
|
spawn_serial $wait_for_re $timeout_value "L4 Bootstrapper"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if {[is_serial_available]} {
|
if {[is_serial_available]} {
|
||||||
spawn_serial $wait_for_re $timeout_value
|
spawn_serial $wait_for_re $timeout_value "Kernel started!"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1448,6 +1448,8 @@ extern "C" void kernel()
|
|||||||
/* kernel initialization */
|
/* kernel initialization */
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
Genode::printf("Kernel started!\n");
|
||||||
|
|
||||||
/* compose kernel CPU context */
|
/* compose kernel CPU context */
|
||||||
static Cpu::Context kernel_context;
|
static Cpu::Context kernel_context;
|
||||||
kernel_context.ip = (addr_t)kernel;
|
kernel_context.ip = (addr_t)kernel;
|
||||||
|
34
tool/run
34
tool/run
@ -575,7 +575,7 @@ proc spawn_amt { wait_for_re timeout_value} {
|
|||||||
set exit_result [lindex $result 3]
|
set exit_result [lindex $result 3]
|
||||||
}
|
}
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
#
|
#
|
||||||
# grab output
|
# grab output
|
||||||
#
|
#
|
||||||
@ -671,23 +671,33 @@ proc exit {{status 0}} {
|
|||||||
##
|
##
|
||||||
# Execute scenario expecting output via serial device
|
# 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 spawn_id
|
||||||
global serial_cmd
|
global serial_cmd
|
||||||
global run_target
|
global run_target
|
||||||
|
|
||||||
if {$wait_for_re == "forever"} {
|
set retry 3
|
||||||
set timeout -1
|
while { $retry != 0 } {
|
||||||
} else {
|
|
||||||
set timeout_value [expr $timeout_value + 30]
|
if {[regexp "reset" $run_target]} {
|
||||||
|
power_plug_reset
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[regexp "reset" $run_target]} {
|
|
||||||
power_plug_reset
|
|
||||||
}
|
|
||||||
|
|
||||||
eval spawn $serial_cmd
|
|
||||||
set serial_spawn_id $spawn_id
|
|
||||||
wait_for_output $wait_for_re $timeout_value $serial_spawn_id
|
wait_for_output $wait_for_re $timeout_value $serial_spawn_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user