mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
parent
8c6e3c6251
commit
ac70dfd9fe
@ -149,7 +149,7 @@ proc run_boot_dir {binaries} {
|
||||
# as startup is done in 32 bit mode, GRUB expects a 32 bit image
|
||||
exec [cross_dev_prefix]objcopy -O elf32-i386 bin/$core_bin $elf_img
|
||||
}
|
||||
if {[expr [have_spec "arm"] || [have_spec "x86_32"]]} {
|
||||
if {[expr [have_spec "arm"] || [have_spec "x86_32"] || [have_spec "riscv"]]} {
|
||||
exec cp -L bin/$core_bin $elf_img
|
||||
}
|
||||
|
||||
|
29
tool/run/log/spike
Normal file
29
tool/run/log/spike
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
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 timeout 210
|
||||
set kernel_msg [run_boot_string]
|
||||
set output_spawn_id $spike_spawn_id
|
||||
|
||||
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
|
||||
}
|
26
tool/run/power_on/spike
Normal file
26
tool/run/power_on/spike
Normal file
@ -0,0 +1,26 @@
|
||||
##
|
||||
# Execute scenario using spike
|
||||
#
|
||||
source [genode_dir]/tool/run/spike.inc
|
||||
|
||||
proc is_spike_available { } {
|
||||
|
||||
if {[have_spec platform_riscv]} { return true }
|
||||
|
||||
puts stderr "skipping execution because platform is not supported by spike"
|
||||
return false
|
||||
}
|
||||
|
||||
proc run_power_on { } {
|
||||
global spike_args
|
||||
global spike
|
||||
global spike_spawn_id
|
||||
|
||||
if {![is_spike_available]} { return 0 }
|
||||
|
||||
append spike_args " [run_dir]/image.elf "
|
||||
|
||||
set spike "spike"
|
||||
eval spawn $spike $spike_args
|
||||
set spike_spawn_id $spawn_id
|
||||
}
|
1
tool/run/spike.inc
Normal file
1
tool/run/spike.inc
Normal file
@ -0,0 +1 @@
|
||||
set spike_spawn_id ""
|
Loading…
Reference in New Issue
Block a user