2015-01-08 21:08:48 +00:00
|
|
|
set qemu_spawn_id ""
|
|
|
|
set qemu_args [get_cmd_arg --qemu-args ""]
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Enable run scripts to extend 'qemu_arg' via 'append' without bothering
|
|
|
|
# about the required whitespace in front of the custom arguments.
|
|
|
|
#
|
|
|
|
append qemu_args " "
|
|
|
|
|
|
|
|
|
|
|
|
proc qemu_args { } {
|
|
|
|
global qemu_args
|
|
|
|
return $qemu_args
|
|
|
|
}
|
|
|
|
|
2020-04-02 19:20:50 +00:00
|
|
|
proc append_qemu_nic_args { { extra_netdev_args "" } } {
|
|
|
|
global qemu_args
|
|
|
|
append qemu_args " -netdev user,id=net0"
|
|
|
|
|
|
|
|
if { $extra_netdev_args ne "" } {
|
|
|
|
append qemu_args ",$extra_netdev_args"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-08 21:08:48 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
# Check whether Qemu support is available
|
|
|
|
#
|
|
|
|
proc is_qemu_available { } {
|
2021-08-18 14:17:03 +00:00
|
|
|
set qemu_args_file [file join "board" [board] "qemu_args"]
|
|
|
|
|
|
|
|
set repo [repository_contains $qemu_args_file]
|
|
|
|
|
|
|
|
if {$repo == ""} {
|
2015-01-08 21:08:48 +00:00
|
|
|
puts stderr "skipping execution because platform is not supported by qemu"
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return true
|
|
|
|
}
|