mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
run: introduce have_board helper function
The new helper function returns a boolean value analoque to 'have_spec' if the BOARD variable corresponds to the given value. It shall replace [have_spec <board>] declarations in run-scripts. Ref #3971
This commit is contained in:
committed by
Norman Feske
parent
6cfaac182a
commit
5a123e37c9
@@ -31,7 +31,7 @@ proc run_boot_dir {binaries} {
|
||||
# Save config part of the image.elf for easy inspection
|
||||
exec cp -f [run_dir]/genode/config [run_dir].config
|
||||
|
||||
if {[board] == "pc"} {
|
||||
if {[have_board pc]} {
|
||||
|
||||
build_initrd $binaries
|
||||
|
||||
|
||||
@@ -44,9 +44,7 @@ proc append_qemu_nic_args { { extra_netdev_args "" } } {
|
||||
# XXX should by removed in favor of [have_include "exec/qemu"]
|
||||
#
|
||||
proc is_qemu_available { } {
|
||||
if {[expr [have_spec linux] && {"[board]"} == {"linux"}]} { return false }
|
||||
|
||||
if {[have_spec rpi]} {
|
||||
if {[have_board rpi] || [have_board linux]} {
|
||||
puts stderr "skipping execution because platform is not supported by qemu"
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -835,6 +835,10 @@ proc board { } {
|
||||
return $board_var
|
||||
}
|
||||
|
||||
##
|
||||
# Return whether the board equals to the given string
|
||||
#
|
||||
proc have_board {board} { global board_var; return [expr {$board_var} eq {$board}] }
|
||||
|
||||
##
|
||||
# Determine GDB executable installed at the host
|
||||
|
||||
Reference in New Issue
Block a user