run: modularize run tool

devel
Josef Söntgen 8 years ago committed by Christian Helmuth
parent febca1b827
commit c706b1c0a7
  1. 201
      repos/base-fiasco/run/env
  2. 72
      repos/base-linux/run/env
  3. 144
      repos/base-nova/run/env
  4. 179
      repos/base-pistachio/run/env
  5. 17
      tool/builddir/build.mk
  6. 1011
      tool/run
  7. 141
      tool/run/README
  8. 28
      tool/run/amt.inc
  9. 49
      tool/run/boot_dir/codezero
  10. 142
      tool/run/boot_dir/fiasco
  11. 194
      tool/run/boot_dir/foc
  12. 92
      tool/run/boot_dir/hw
  13. 7
      tool/run/boot_dir/linux
  14. 90
      tool/run/boot_dir/nova
  15. 146
      tool/run/boot_dir/okl4
  16. 140
      tool/run/boot_dir/pistachio
  17. 49
      tool/run/image/disk
  18. 20
      tool/run/image/iso
  19. 47
      tool/run/image/uboot
  20. 20
      tool/run/iso.inc
  21. 7
      tool/run/load.inc
  22. 52
      tool/run/load/jtag
  23. 64
      tool/run/load/tftp
  24. 7
      tool/run/log.inc
  25. 70
      tool/run/log/amt
  26. 11
      tool/run/log/linux
  27. 17
      tool/run/log/qemu
  28. 42
      tool/run/log/serial
  29. 45
      tool/run/power_off/powerplug
  30. 131
      tool/run/power_on/amt
  31. 37
      tool/run/power_on/linux
  32. 54
      tool/run/power_on/powerplug
  33. 78
      tool/run/power_on/qemu
  34. 9
      tool/run/powerplug.inc
  35. 33
      tool/run/qemu.inc
  36. 663
      tool/run/run

@ -1,201 +0,0 @@
#
# \brief Fiasco-specific test-environment supplements
# \author Norman Feske
# \author Christian Helmuth
# \date 2010-08-26
#
# This file is meant to be used as '--include' argument for 'tool/run'.
#
##
# Install files needed to boot via PXE
#
proc install_pxe_bootloader_to_run_dir { } {
exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
}
##
# Read the location of the Fiasco user directory from 'etc/fiasco.conf'
#
proc l4_dir { } {
global _l4_dir
if {![info exists _l4_dir]} {
if {[file exists etc/fiasco.conf]} {
set _l4_dir [exec sed -n "/^L4_BUILD_DIR/s/^.*=\\s*//p" etc/fiasco.conf]
if {[file exists $_l4_dir]} { return $_l4_dir }
}
set _l4_dir "[pwd]/l4"
if {![file exists $_l4_dir]} {
puts -nonewline stderr "Error: Could neither find the L4 build directory "
puts -nonewline stderr "within '<genode-build-dir>/l4' nor at a location "
puts -nonewline stderr "specified via 'L4_BUILD_DIR = <l4v2-build-dir>' "
puts stderr "in <genode-build-dir>/etc/fiasco.conf'."
exit 1
}
}
return $_l4_dir
}
##
# Return whether the l4-buid-directory is provided from the outside
#
proc l4_dir_external { } {
if {[l4_dir] == "[pwd]/l4"} { return 0 }
return 1
}
##
# Return the location of the Fiasco kernel
#
proc fiasco { } {
return [kernel_location_from_config_file etc/fiasco.conf [pwd]/kernel/fiasco/fiasco]
}
##
# Return whether fiasco kernel is provided from the outside
#
proc fiasco_external { } {
if {[fiasco] == "[pwd]/kernel/fiasco/fiasco"} { return 0 }
return 1
}
##################################
## Test framework API functions ##
##################################
proc create_boot_directory { } {
exec rm -rf [run_dir]
exec mkdir -p [run_dir]/genode
exec mkdir -p [run_dir]/fiasco
}
proc bin_dir { } {
if {[have_spec x86_32]} { return "[l4_dir]/bin/x86_586" }
puts stderr "Error: Cannot determine bin directory"
exit 1
}
set fiasco_serial_esc_arg "-serial_esc "
proc build_boot_image {binaries} {
global fiasco_serial_esc_arg
#
# Collect contents of the ISO image
#
copy_and_strip_genode_binaries_to_run_dir $binaries
if {![fiasco_external]} { build { kernel } }
if {![l4_dir_external]} { build { bootstrap sigma0 } }
# assert existence of the L4 build directory
l4_dir
puts "using fiasco kernel [fiasco]"
exec cp [fiasco] [run_dir]/fiasco/fiasco
puts "using sigma0/bootstrap at [l4_dir]"
exec cp [bin_dir]/l4v2/sigma0 [run_dir]/fiasco
exec cp [bin_dir]/bootstrap [run_dir]/fiasco
install_iso_bootloader_to_run_dir
#
# Generate grub config file
#
# The core binary is part of the 'binaries' list but it must
# appear right after 'sigma0' as boot module. Hence the special case.
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on L4/Fiasco"
puts $fh " kernel /boot/bender"
puts $fh " module /fiasco/bootstrap -serial -modaddr=0x02000000"
puts $fh " module /fiasco/fiasco -serial -jdb_cmd=JH $fiasco_serial_esc_arg"
puts $fh " module /fiasco/sigma0"
puts $fh " module /genode/core"
puts $fh " module /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " module /genode/$binary" } }
puts $fh " vbeset 0x117 506070"
close $fh
#
# Install PXE bootloader pulsar
#
install_pxe_bootloader_to_run_dir
create_iso_image_from_run_dir
create_disk_image_from_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
puts $fh " load /fiasco/bootstrap -serial -modaddr=0x02000000"
puts $fh " load /fiasco/fiasco -serial -serial_esc -jdb_cmd=JH"
puts $fh " load /fiasco/sigma0"
puts $fh " load /genode/core"
puts $fh " load /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
#
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
exec ln -nfs "[pwd]" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
set tftp_base ""
if {[get_cmd_switch --tftp-absolute]} {
set tftp_base $::env(PXE_TFTP_DIR_BASE)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_base$::env(PXE_TFTP_DIR_OFFSET)/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}
}
proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id -1}} {
#
# If a running_spawn_id is specified, wait for the expected output
#
if {$running_spawn_id != -1} {
wait_for_output $wait_for_re $timeout_value $running_spawn_id
return
}
#
# Try to use one of the supported backends for running the scripts
#
if {[is_amt_available]} {
spawn_amt $wait_for_re $timeout_value
return
}
if {[is_qemu_available]} {
spawn_qemu $wait_for_re $timeout_value
return
}
global run_target
puts stderr "Error: Can't execute automatically on target '$run_target'"
exit -1
}

@ -1,72 +0,0 @@
#
# \brief Environment for executing Genode on Linux
# \author Norman Feske
# \date 2010-08-16
#
# For the documentation of the implemented API functions,
# please refer to the comments in 'tool/run'.
#
proc create_boot_directory { } {
exec rm -rf [run_dir]
exec mkdir -p [run_dir]
}
proc install_config {config} {
set fh [open "[run_dir]/config" "WRONLY CREAT TRUNC"]
puts $fh $config
close $fh
check_xml_syntax [run_dir]/config
}
proc build_boot_image {binaries} {
foreach binary $binaries {
exec ln -sf ../../../bin/$binary [run_dir] }
}
proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id -1}} {
#
# If a running_spawn_id is specified, wait for the expected output
#
if {$running_spawn_id != -1} {
wait_for_output $wait_for_re $timeout_value $running_spawn_id
return
}
global spawn_id
set orig_pwd [pwd]
cd [run_dir]
spawn ./core
wait_for_output $wait_for_re $timeout_value $spawn_id
cd $orig_pwd
}
##
# Umount a directory that was bind-mounted beforehand
#
# This function is used by chroot-related tests, e.g., 'os/run/chroot.run',
# 'os/run/chroot_loader.run'.
#
proc umount_and_rmdir { path } {
puts "umounting $path"
#
# Invoke umount until it returns an error. Apparently, the unmounting
# of bind-mounted mount points does not always take immediate effect
# (regardless of the -l option).
#
while {1} {
if {[catch { exec sudo umount -l $path }]} { break; }
sleep 0.25
}
catch { exec rmdir -p $path }
}

@ -1,144 +0,0 @@
#
# \brief NOVA-specific test-environment supplements
# \author Norman Feske
# \date 2010-08-31
#
# This file is meant to be used as '--include' argument for 'tool/run'.
#
##
# Install files needed to boot via PXE
#
proc install_pxe_bootloader_to_run_dir { } {
exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
}
##
# Read the location of the NOVA kernel directory from 'etc/nova.conf'
#
proc nova_kernel { } {
global _nova_kernel
if {![info exists _nova_kernel]} {
if {[file exists etc/nova.conf]} {
set _nova_kernel [exec sed -n "/^NOVA_KERNEL/s/^.*=\\s*//p" etc/nova.conf]
} else {
set _nova_kernel "[pwd]/kernel/hypervisor"
}
}
return $_nova_kernel
}
##
# Return whether nova is provided from the outside
#
proc nova_external { } {
if {[nova_kernel] == "[pwd]/kernel/hypervisor"} { return 0 }
return 1
}
##################################
## Test framework API functions ##
##################################
proc create_boot_directory { } {
exec rm -rf [run_dir]
exec mkdir -p [run_dir]/genode
}
proc build_boot_image {binaries} {
#
# Collect contents of the ISO image
#
copy_and_strip_genode_binaries_to_run_dir $binaries
if {![nova_external] && ![file exists [nova_kernel]]} { build { kernel } }
puts "using NOVA kernel at [nova_kernel]"
exec [cross_dev_prefix]objcopy -O elf32-i386 [nova_kernel] [run_dir]/hypervisor
install_iso_bootloader_to_run_dir
#
# The core binary is part of the 'binaries' list but it must
# appear right after 'sigma0' as boot module. Hence the special case.
#
# Generate grub config file
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on NOVA"
puts $fh " kernel /boot/bender"
puts $fh " module /hypervisor iommu serial novpid"
puts $fh " module /genode/core"
puts $fh " module /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " module /genode/$binary" } }
close $fh
install_pxe_bootloader_to_run_dir
create_iso_image_from_run_dir
create_disk_image_from_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
puts $fh " load /hypervisor iommu serial novpid"
puts $fh " load /genode/core"
puts $fh " load /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
#
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
exec ln -nfs "[pwd]" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
set tftp_base ""
if {[get_cmd_switch --tftp-absolute]} {
set tftp_base $::env(PXE_TFTP_DIR_BASE)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_base$::env(PXE_TFTP_DIR_OFFSET)/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}
}
proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id -1}} {
#
# If a running_spawn_id is specified, wait for the expected output
#
if {$running_spawn_id != -1} {
wait_for_output $wait_for_re $timeout_value $running_spawn_id
return
}
#
# Try to use one of the supported backends for running the scripts
#
if {[is_amt_available]} {
spawn_amt $wait_for_re $timeout_value
return
}
if {[is_serial_available]} {
spawn_serial $wait_for_re $timeout_value "NOVA Microhypervisor"
return
}
if {[is_qemu_available]} {
spawn_qemu $wait_for_re $timeout_value
return
}
}

@ -1,179 +0,0 @@
#
# \brief Pistachio-specific test-environment supplements
# \author Norman Feske
# \date 2010-08-25
#
# This file is meant to be used as '--include' argument for 'tool/run'.
#
##
# Install files needed to boot via PXE
#
proc install_pxe_bootloader_to_run_dir { } {
exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
}
##
# Read the location of the Pistachio user directory from 'etc/pistachio.conf'
#
proc pistachio_user_dir { } {
global _pistachio_user_dir
if {![info exists _pistachio_user_dir]} {
if {[file exists etc/pistachio.conf]} {
set _pistachio_user_dir [exec sed -n "/^PISTACHIO_USER_BUILD_DIR/s/^.*=\\s*//p" etc/pistachio.conf]
} else {
set _pistachio_user_dir "[pwd]/l4"
}
}
return $_pistachio_user_dir
}
##
# Read the location of the Pistachio kernel directory from 'etc/pistachio.conf'
# or return a good heuristic
#
proc pistachio_kernel { } {
global _pistachio_kernel
if {![info exists _pistachio_kernel]} {
if {[file exists etc/pistachio.conf]} {
set _pistachio_kernel [exec sed -n "/^PISTACHIO_KERNEL/s/^.*=\\s*//p" etc/pistachio.conf]
if {$_pistachio_kernel == ""} {
set _pistachio_kernel [file dirname [file dirname [pistachio_user_dir]]]/kernel/build/x86-kernel
}
} else {
set _pistachio_kernel "[pwd]/bin/kernel"
}
}
return $_pistachio_kernel
}
##
# Return whether the kernel is provided from the outside
#
proc kernel_external { } {
if {[pistachio_kernel] == "[pwd]/bin/kernel"} { return 0 }
return 1
}
##################################
## Test framework API functions ##
##################################
proc create_boot_directory { } {
exec rm -rf [run_dir]
exec mkdir -p [run_dir]/genode
exec mkdir -p [run_dir]/pistachio
}
proc build_boot_image {binaries} {
#
# Collect contents of the ISO image
#
copy_and_strip_genode_binaries_to_run_dir $binaries
if {![kernel_external] && ![file exists [pistachio_kernel]]} { build { kernel } }
exec cp [pistachio_kernel] [run_dir]/pistachio/kernel
exec cp [pistachio_user_dir]/serv/sigma0/sigma0 [run_dir]/pistachio
exec cp [pistachio_user_dir]/util/kickstart/kickstart [run_dir]/pistachio
install_iso_bootloader_to_run_dir
#
# Generate grub config file
#
# The core binary is part of the 'binaries' list but it must
# appear right after 'sigma0' as boot module. Hence the special case.
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on L4ka::Pistachio"
puts $fh " kernel /pistachio/kickstart"
puts $fh " module /pistachio/kernel"
puts $fh " module /pistachio/sigma0"
puts $fh " module /genode/core"
puts $fh " module /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " module /genode/$binary" } }
close $fh
#
# Install PXE bootloader pulsar
#
install_pxe_bootloader_to_run_dir
create_iso_image_from_run_dir
create_disk_image_from_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
puts $fh " load /pistachio/kickstart"
puts $fh " load /pistachio/kernel"
puts $fh " load /pistachio/sigma0"
puts $fh " load /genode/core"
puts $fh " load /genode/config"
puts $fh " load /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
#
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
exec ln -nfs "[pwd]" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
set tftp_base ""
if {[get_cmd_switch --tftp-absolute]} {
set tftp_base $::env(PXE_TFTP_DIR_BASE)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_base$::env(PXE_TFTP_DIR_OFFSET)/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}
}
proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id -1}} {
#
# If a running_spawn_id is specified, wait for the expected output
#
if {$running_spawn_id != -1} {
wait_for_output $wait_for_re $timeout_value $running_spawn_id
return
}
#
# Try to use one of the supported backends for running the scripts
#
if {[is_amt_available]} {
spawn_amt $wait_for_re $timeout_value
return
}
if {[is_qemu_available]} {
spawn_qemu $wait_for_re $timeout_value
return
}
global run_target
puts stderr "Error: Can't execute automatically on target '$run_target'"
exit -1
}

@ -238,14 +238,15 @@ RUN_SCRIPT = $(call select_from_repositories,run/$*.run)
run/%: $(call select_from_repositories,run/%.run) $(RUN_ENV)
$(VERBOSE)test -f "$(RUN_SCRIPT)" || (echo "Error: No run script for $*"; exit -1)
$(VERBOSE)$(GENODE_DIR)/tool/run --genode-dir $(GENODE_DIR) \
--name $* \
--specs "$(SPECS)" \
--repositories "$(REPOSITORIES)" \
--cross-dev-prefix "$(CROSS_DEV_PREFIX)" \
--qemu-args "$(QEMU_OPT)" \
--include $(RUN_ENV) $(RUN_OPT) \
--include $(RUN_SCRIPT)
$(VERBOSE)$(GENODE_DIR)/tool/run/run --genode-dir $(GENODE_DIR) \
--name $* \
--specs "$(SPECS)" \
--repositories "$(REPOSITORIES)" \
--cross-dev-prefix "$(CROSS_DEV_PREFIX)" \
--qemu-args "$(QEMU_OPT)" \
$(RUN_OPT) \
--include $(RUN_ENV) \
--include $(RUN_SCRIPT)
##
## Clean rules

1011
tool/run

File diff suppressed because it is too large Load Diff

@ -0,0 +1,141 @@
===================
The Genode run tool
===================
Introduction
############
The run tool is used to configure, build, and execute so-called run scripts.
These run scripts include a scenario or test-case of Genode components and
subsystems. Its core functionality is split into various modules to accommodate
a variety of different execution environments. These modules provide the
implementation of a given step in the sequence of execution of a run script.
These steps are:
* Building the corresponding components
* Wrapping the components in a format suitable for execution
* Preparing the target systems
* Executing the scenario
* Collecting any output
After the run script was executed successfully, the run tool will print the
string 'Run script execution successful.". This message can be used to check
for the successful completion of the run script when doing automated testing.
The categories of modules are formed by existing requirements such as automated
testing on a variety of different hardware platforms and are based
on the above-named steps:
:boot_dir:
These modules contain the functionality to populate the boot directory
and are specific to each kernel. It is mandatory to always include the
module corresponding to the used kernel.
:image modules:
These modules are used to wrap up all components used by the run script
in a specific format and thereby to prepare them for execution.
Depending on the used kernel, there are different formats. With these
modules, the creation of ISO and disk images is also handled.
:load modules:
These modules handle the way the components are transfered to the
target system. Depending on the used kernel there are various options
to pass on the components. Loading from TFTP or via JTAG is handled
by the modules of this category.
:log modules:
These modules handle how the output of a currently executed run script
is captured.
:power_on modules:
These modules are used for bringing the target system into an defined
state, e.g., by starting or rebooting the system.
:power_off modules:
These modules are used for turning the target system off after the
execution of a run script.
When executing a run script, only one module of each category must be used.
Usage
#####
To execute a run script a combination of modules may be used. The combination
is controlled via the RUN_OPT variable used by the build framework. Here are a
few common exemplary combinations:
Executing NOVA in Qemu:
!RUN_OPT = --include boot_dir/nova \
! --include exec/qemu --include log/qemu --include image/iso
Executing NOVA on a real x86 machine using AMT for resetting the target system
and for capturing the serial output while loading the files via TFTP:
!RUN_OPT = --include boot_dir/nova \
! --include power_on/amt --power-on-amt-host 10.23.42.13 \
! --power-on-amt-password 'foo!' \
! --include load/tftp --load-tftp-base-dir /var/lib/tftpboot \
! --load-tftp-offset-dir /x86 \
! --include log/amt --log-amt-host 10.23.42.13 \
! --log-amt-password 'foo!'
Executing fiasco.OC on a real x86 machine using AMT for resetting, USB serial
for output while loading the files via TFTP:
!RUN_OPT = --include boot_dir/foc \
! --include power_on/amt --amt-host 10.23.42.13 --amt-password 'foo!' \
! --include load/tftp --tftp-base-dir /var/lib/tftpboot \
! --tftp-offset-dir /x86 \
! --include log/serial --serial-cmd 'picocom -b 115200 /dev/ttyUSB0'
Executing hw on a rpi using powerplug to reset the hardware, JTAG to load the
image and USB serial to capture the output:
!RUN_OPT = --include boot_dir/hw \
! --include power_on/powerplug --power-on-powerplug-ip 10.23.42.5 \
! --power-on-powerplug-user admin \
! --power-on-powerplug-password secret \
! --power-on-powerplug-port 1
! --include power_off/powerplug --power-off-powerplug-ip 10.23.42.5 \
! --power-off-powerplug-user admin \
! --power-off-powerplug-password secret \
! --power-off-powerplug-port 1
! --include load/jtag \
! --load-jtag-debugger /usr/share/openocd/scripts/interface/flyswatter2.cfg \
! --load-jtag-board /usr/share/openocd/scripts/interface/raspberrypi.cfg \
! --include log/serial --log-serial-cmd 'picocom -b 115200 /dev/ttyUSB0'
Module overview
###############
A module consist of a expect/TCL source file located in one of the existing
directories of a category. It is named implicitly by its location and the
name of the source file, e.g. 'image/iso' is the name of the image module
that creates an ISO image.
The source file contains one mandatory procedure:
* run_<module> { <module-args> }
The procedure is called if the step at hand is executed by the
run tool. If its execution was successful, it returns true and
otherwise false. Certain modules may also call exit on failure.
A module may have arguments, which are by convention prefixed with the name
of the source file, e.g. 'power_on/amt' may have an argument called
'--power-on-amt-host'. If the argument passes on a value the value must be
made accessible by calling an equally named procedure, e.g.
'--power-on-amt-host' becomes 'proc amt_host { }'.
Thereby a run script or a run environment can access the value of the argument
in a defined way without the use of a global variable by using
'[power_on_amt_host]'. Also arguments without a value may be queried in this
way. '--image-uboot-gzip' becomes '[image_uboot_use_gzip]'.
In addition to these procedures, a module may have any number of public
procedures. They may be used after the presence of the particular module that
contains them is verified. For this reason the run tool provides a procedure
called 'have_include', that performs this check. For example the presence of
the 'load/tftp' module is checked by calling '[have_include "load/tftp"]'.

@ -0,0 +1,28 @@
##
# Check whether AMT support is available
#
proc is_amt_available { {host "" } {password "" } } {
if {![have_spec x86]} { return false }
#
# Exit execution if parameter are not set rather returning
# false because we cannot recover anyway.
#
if {[string compare $host ""] == 0} {
puts "Aborting, AMT host not specified."
exit -1
}
if {[string compare $password ""] == 0} {
puts "Aborting, AMT password not set."
exit -1
}
if {[have_installed amtterm] &&
[expr [have_installed amttool] || [have_installed wsman] ] } {
return true
}
puts "No support for Intel's AMT detected."
return false
}

@ -1,10 +1,3 @@
#
# \brief Codezero-specific test-environment supplements
# \author Norman Feske
# \date 2011-08-05
#
# This file is meant to be used as '--include' argument for 'tool/run'.
#
##
@ -34,21 +27,10 @@ proc exec_sh { command } {
}
##################################
## Test framework API functions ##
##################################
proc create_boot_directory { } {
# create only intermediate directries hosting the run directory
exec mkdir -p [run_dir]
exec rm -rf [run_dir]
exec mkdir -p [run_dir]/genode
}
proc build_boot_image {binaries} {
##
# Populate boot directory with binaries on codezero
#
proc run_boot_dir {binaries} {
if {![file exists kernel]} { build kernel }
@ -81,26 +63,3 @@ proc build_boot_image {binaries} {
# copy result to [run_dir]/image.elf (to be picked up by spawn_qemu)
exec_sh "cp [kernel_dir]/build/final.elf [run_dir]/image.elf"
}
proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id -1}} {
#
# If a running_spawn_id is specified, wait for the expected output
#
if {$running_spawn_id != -1} {
wait_for_output $wait_for_re $timeout_value $running_spawn_id
return
}
#
# Try to use one of the supported backends for running the scripts
#
if {[is_qemu_available]} {
spawn_qemu $wait_for_re $timeout_value
return
}
global run_target
puts stderr "Error: Can't execute automatically on target '$run_target'"
exit -1
}

@ -0,0 +1,142 @@
##
# Read the location of the Fiasco user directory from 'etc/fiasco.conf'
#
proc l4_dir { } {
global _l4_dir
if {![info exists _l4_dir]} {
if {[file exists etc/fiasco.conf]} {
set _l4_dir [exec sed -n "/^L4_BUILD_DIR/s/^.*=\\s*//p" etc/fiasco.conf]
if {[file exists $_l4_dir]} { return $_l4_dir }
}
set _l4_dir "[pwd]/l4"
if {![file exists $_l4_dir]} {
puts -nonewline stderr "Error: Could neither find the L4 build directory "
puts -nonewline stderr "within '<genode-build-dir>/l4' nor at a location "
puts -nonewline stderr "specified via 'L4_BUILD_DIR = <l4v2-build-dir>' "
puts stderr "in <genode-build-dir>/etc/fiasco.conf'."
exit 1
}
}
return $_l4_dir
}
##
# Return whether the l4-buid-directory is provided from the outside
#
proc l4_dir_external { } {
if {[l4_dir] == "[pwd]/l4"} { return 0 }
return 1
}
##
# Return the location of the Fiasco kernel
#
proc fiasco { } {
return [kernel_location_from_config_file etc/fiasco.conf [pwd]/kernel/fiasco/fiasco]
}
##
# Return whether fiasco kernel is provided from the outside
#
proc fiasco_external { } {
if {[fiasco] == "[pwd]/kernel/fiasco/fiasco"} { return 0 }
return 1
}
proc bin_dir { } {
if {[have_spec x86_32]} { return "[l4_dir]/bin/x86_586" }
puts stderr "Error: Cannot determine bin directory"
exit 1
}
set fiasco_serial_esc_arg "-serial_esc "
##
# Populate boot directory with binaries on fiasco
#
proc run_boot_dir {binaries} {
global fiasco_serial_esc_arg
exec mkdir -p [run_dir]/fiasco
#
# Collect contents of the ISO image
#
copy_and_strip_genode_binaries_to_run_dir $binaries
if {![fiasco_external]} { build { kernel } }
if {![l4_dir_external]} { build { bootstrap sigma0 } }
# assert existence of the L4 build directory
l4_dir
puts "using fiasco kernel [fiasco]"
exec cp [fiasco] [run_dir]/fiasco/fiasco
puts "using sigma0/bootstrap at [l4_dir]"
exec cp [bin_dir]/l4v2/sigma0 [run_dir]/fiasco
exec cp [bin_dir]/bootstrap [run_dir]/fiasco
if {[have_include "image/iso"] || [have_include "image/disk"]} {
#
# Install isolinux/GRUB files and bender
#
install_iso_bootloader_to_run_dir
#
# Generate GRUB config file
#
# The core binary is part of the 'binaries' list but it must
# appear right after 'sigma0' as boot module. Hence the special case.
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on L4/Fiasco"
puts $fh " kernel /boot/bender"
puts $fh " module /fiasco/bootstrap -serial -modaddr=0x02000000"
puts $fh " module /fiasco/fiasco -serial -jdb_cmd=JH $fiasco_serial_esc_arg"
puts $fh " module /fiasco/sigma0"
puts $fh " module /genode/core"
puts $fh " module /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " module /genode/$binary" } }
puts $fh " vbeset 0x117 506070"
close $fh
}
run_image
if {[have_include "load/tftp"]} {
#
# Install PXE bootloader pulsar
#
install_pxe_bootloader_to_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
puts $fh " load /fiasco/bootstrap -serial -modaddr=0x02000000"
puts $fh " load /fiasco/fiasco -serial -serial_esc -jdb_cmd=JH"
puts $fh " load /fiasco/sigma0"
puts $fh " load /genode/core"
puts $fh " load /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
generate_tftp_config
}
}

@ -6,14 +6,6 @@
# This file is meant to be used as '--include' argument for 'tool/run'.
#
##
# Install files needed to boot via PXE
#
proc install_pxe_bootloader_to_run_dir { } {
exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
}
##
# Return the location of the Fiasco.OC user directory
#
@ -83,20 +75,6 @@ proc reset_target { {spawn_id_arg -1} } {
send -i $spawn_id_arg "\033^^"
}
##################################
## Test framework API functions ##
##################################
proc create_boot_directory { } {
exec rm -rf [run_dir]
exec mkdir -p [run_dir]/genode
if {[have_spec x86]} {
exec mkdir -p [run_dir]/fiasco
exec mkdir -p [run_dir]/boot/grub
}
}
proc copy_and_strip_binaries {binaries} {
@ -108,10 +86,6 @@ proc copy_and_strip_binaries {binaries} {
catch {
exec [cross_dev_prefix]strip [run_dir]/genode/$binary }
}
#
# Generate config file for bootstrap
#
}
@ -126,10 +100,12 @@ proc bin_dir { } {
set fiasco_serial_esc_arg "-serial_esc "
proc build_boot_image_x86 {binaries} {
proc run_boot_dir_x86 {binaries} {
global fiasco_serial_esc_arg
exec mkdir -p [run_dir]/fiasco
copy_and_strip_binaries $binaries
set foc_targets { }
@ -149,69 +125,67 @@ proc build_boot_image_x86 {binaries} {
exec cp [bin_dir]/l4f/sigma0 [run_dir]/fiasco
exec cp [bin_dir]/bootstrap [run_dir]/fiasco
install_iso_bootloader_to_run_dir
#
# Generate grub config file
#
# The core binary is part of the 'binaries' list but it must
# appear right after 'sigma0' as boot module. Hence the special case.
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on Fiasco.OC"
puts $fh " kernel /boot/bender"
puts $fh " module /fiasco/bootstrap -modaddr=0x01100000"
puts $fh " module /fiasco/fiasco $fiasco_serial_esc_arg"
puts $fh " module /fiasco/sigma0"
puts $fh " module /genode/core"
puts $fh " module /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " module /genode/$binary" } }
puts $fh " vbeset 0x117 506070"
close $fh
install_pxe_bootloader_to_run_dir
create_iso_image_from_run_dir
create_disk_image_from_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
puts $fh " load /fiasco/bootstrap -modaddr=0x01100000"
puts $fh " load /fiasco/fiasco -serial_esc"
puts $fh " load /fiasco/sigma0"
puts $fh " load /genode/core"
puts $fh " load /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
if {[have_include "image/iso"] || [have_include "image/disk"]} {
#
# Install isolinux/GRUB files and bender
#
install_iso_bootloader_to_run_dir
#
# Generate grub config file
#
# The core binary is part of the 'binaries' list but it must
# appear right after 'sigma0' as boot module. Hence the special case.
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on Fiasco.OC"
puts $fh " kernel /boot/bender"
puts $fh " module /fiasco/bootstrap -modaddr=0x01100000"
puts $fh " module /fiasco/fiasco $fiasco_serial_esc_arg"
puts $fh " module /fiasco/sigma0"
puts $fh " module /genode/core"
puts $fh " module /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " module /genode/$binary" } }
puts $fh " vbeset 0x117 506070"
close $fh
}
#
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
exec ln -nfs "[pwd]" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
set tftp_base ""
if {[get_cmd_switch --tftp-absolute]} {
set tftp_base $::env(PXE_TFTP_DIR_BASE)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_base$::env(PXE_TFTP_DIR_OFFSET)/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
# Build image
#
run_image
if {[have_include "load/tftp"]} {
#
# Install PXE bootloader pulsar
#
install_pxe_bootloader_to_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
puts $fh " load /fiasco/bootstrap -modaddr=0x01100000"
puts $fh " load /fiasco/fiasco -serial_esc"
puts $fh " load /fiasco/sigma0"
puts $fh " load /genode/core"
puts $fh " load /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
generate_tftp_config
}
}
proc build_boot_image_arm {binaries} {
proc run_boot_dir_arm {binaries} {
global run_target
global fiasco_serial_esc_arg
@ -249,53 +223,27 @@ proc build_boot_image_arm {binaries} {
}
exec cp [bin_dir]/bootstrap.elf [run_dir]/image.elf
build_uboot_image [run_dir]/image.elf
run_image [run_dir]/image.elf
puts "\nboot image: [run_dir]/image.elf\n"
# set symbolic link to image.elf file in TFTP directory for PXE boot
if {[info exists ::env(PXE_TFTP_DIR_BASE)] &&
[info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
exec ln -sf "[pwd]/[run_dir]/image.elf" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
if {[regexp "uboot" $run_target]} {
exec ln -sf "[pwd]/[run_dir]/uImage" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/uImage"
if {[have_include "load/tftp"]} {
set tftp_base_dir [load_tftp_base_dir]
set tftp_offset_dir [load_tftp_offset_dir]
exec ln -sf [pwd]/[run_dir]/image.elf $tftp_base_dir$tftp_offset_dir
if {[have_include "image/uboot"]} {
exec ln -sf [pwd]/[run_dir]/uImage $tftp_base_dir$tftp_offset_dir/uImage
}
}
}
proc build_boot_image {binaries} {
if {[have_spec x86]} { return [build_boot_image_x86 $binaries] }
if {[have_spec arm]} { return [build_boot_image_arm $binaries] }
}
proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id -1}} {
#
# If a running_spawn_id is specified, wait for the expected output
#
if {$running_spawn_id != -1} {
wait_for_output $wait_for_re $timeout_value $running_spawn_id
return
}
#
# Try to use one of the supported backends for running the scripts
#
if {[is_amt_available]} {
spawn_amt $wait_for_re $timeout_value
return
}
if {[is_qemu_available]} {
spawn_qemu $wait_for_re $timeout_value
return
}
if {[is_serial_available]} {
spawn_serial $wait_for_re $timeout_value "L4 Bootstrapper"
return
}
global run_target
puts stderr "Error: Can't execute automatically on target '$run_target'"
exit -1
##
# Populate boot directory with binaries on fiasco.OC
#
proc run_boot_dir {binaries} {
if {[have_spec x86]} { return [run_boot_dir_x86 $binaries] }
if {[have_spec arm]} { return [run_boot_dir_arm $binaries] }
}

@ -1,58 +1,19 @@
#!/usr/bin/expect
#
# \brief Implementation of the 'tool/run' interface
# \author Martin Stein
# \date 2011-12-16
#
###############
## Utilities ##
###############
#
##
# Ensure that the next Genode build includes no target specific boot modules
#
proc clean_boot_modules { } {
exec rm -rf boot_modules.s var/libcache/boot_modules/boot_modules.o }
##########################
## 'tool/run' interface ##
##########################
proc build {targets} {
# skip targets that shall not be build
if {[get_cmd_switch --skip-build]} return
# handle false remnants of previous builds
proc run_boot_dir_hook { } {
clean_boot_modules
#
# Build all remaining targets.
# Core is build with a dummy boot-modules file first.
#
regsub -all {\s\s+} $targets " " targets
set timeout 10000
set pid [eval "spawn make $targets"]
expect { eof { } }
if {[lindex [wait $pid] end] != 0} {
puts stderr "Error: Genode build failed"
exit -1
}
}
proc create_boot_directory { } {
exec rm -rf [run_dir]
exec mkdir -p [run_dir]/genode
}
proc build_boot_image {binaries {core_type core}} {
##
# Populate boot directory with binaries on hw
#
proc run_boot_dir {binaries {core_type core}} {
if {$core_type == "test"} {
set core_bin "test-[run_name]"
set core_target "test/[run_name]"
@ -90,7 +51,7 @@ proc build_boot_image {binaries {core_type core}} {
exec echo -e \
"/**" \
"\n * This file was automatically generated by the procedure" \
"\n * 'build_boot_image' in 'base-hw/run/env'." \
"\n * 'run_boot_dir' in 'base-hw/run/env'." \
"\n */" \
"\n" \
"\n /* core includes */" \
@ -176,15 +137,14 @@ proc build_boot_image {binaries {core_type core}} {
exec cp -L bin/$core_bin $elf_img
exec [cross_dev_prefix]strip $elf_img
build_uboot_image $elf_img
run_image $elf_img
# set symbolic link to image.elf file in TFTP directory for PXE boot
if {[info exists ::env(PXE_TFTP_DIR_BASE)] &&
[info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
exec ln -sf "[pwd]/$elf_img" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
if {[have_include "load/tftp"]} {
exec ln -sf [pwd]/$elf_img [load_tftp_base_dir][load_tftp_offset_dir]
if {[regexp "uboot" $run_target]} {
exec ln -sf "[pwd]/[run_dir]/uImage" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
if {[have_include "image/uboot"]} {
exec ln -sf [pwd]/[run_dir]/uImage [load_tftp_base_dir][load_tftp_offset_dir]
}
}
@ -192,31 +152,3 @@ proc build_boot_image {binaries {core_type core}} {
exec cp $core_target/$core_bin.standalone bin/$core_bin
exec rm $core_target/$core_bin.standalone
}
proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id -1}} {
#
# If a running_spawn_id is specified, wait for the expected output
#
if {$running_spawn_id != -1} {
wait_for_output $wait_for_re $timeout_value $running_spawn_id
return
}
#
# Try to use one of the supported backends for running the scripts
#
if {[is_qemu_available]} {
spawn_qemu $wait_for_re $timeout_value
return
}
if {[is_serial_available]} {
spawn_serial $wait_for_re $timeout_value "kernel initialized"
return
}
global run_target
puts stderr "Error: Can't execute automatically on target '$run_target'"
exit -1
}

@ -0,0 +1,7 @@
##
# Populate boot directory with binaries on Linux
#
proc run_boot_dir {binaries} {
foreach binary $binaries {
exec ln -sf ../../../../bin/$binary [run_dir]/genode }
}

@ -0,0 +1,90 @@
##
# Read the location of the NOVA kernel directory from 'etc/nova.conf'
#
proc nova_kernel { } {
global _nova_kernel
if {![info exists _nova_kernel]} {
if {[file exists etc/nova.conf]} {
set _nova_kernel [exec sed -n "/^NOVA_KERNEL/s/^.*=\\s*//p" etc/nova.conf]
} else {
set _nova_kernel "[pwd]/kernel/hypervisor"
}
}
return $_nova_kernel
}
##
# Return whether nova is provided from the outside
#
proc nova_external { } {
if {[nova_kernel] == "[pwd]/kernel/hypervisor"} { return 0 }
return 1
}
##
# Populate directory with binaries on NOVA
#
proc run_boot_dir {binaries} {
#
# Collect contents of the ISO image
#
copy_and_strip_genode_binaries_to_run_dir $binaries
if {![nova_external] && ![file exists [nova_kernel]]} { build { kernel } }
puts "using NOVA kernel at [nova_kernel]"
exec [cross_dev_prefix]objcopy -O elf32-i386 [nova_kernel] [run_dir]/hypervisor
if {[have_include "image/iso"] || [have_include "image/disk"]} {
#
# Install isolinux/GRUB files and bender
#
install_iso_bootloader_to_run_dir
#
# Generate GRUB config file
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on NOVA"
puts $fh " kernel /boot/bender"
puts $fh " module /hypervisor iommu serial novpid"
puts $fh " module /genode/core"
puts $fh " module /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " module /genode/$binary" } }
close $fh
}
#
# Build image
#
run_image
if {[have_include "load/tftp"]} {
#
# Install PXE bootloader pulsar
#
install_pxe_bootloader_to_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
puts $fh " load /hypervisor iommu serial novpid"
puts $fh " load /genode/core"
puts $fh " load /genode/config"
foreach binary $binaries {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
generate_tftp_config
}
}

@ -1,24 +1,9 @@
#
# \brief OKL4-specific test-environment supplements
# \author Norman Feske
# \date 2010-08-16
#
# This file is meant to be used as '--include' argument for 'tool/run'.
#
##
# Install files needed to boot via PXE
#
proc install_pxe_bootloader_to_run_dir { } {
exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
}
##
# Get the base-okl4 repository
#
proc base_okl4_dir {} { return [repository_contains mk/spec-okl4.mk] }
##
# Read the location of the OKL4 directory from 'etc/okl4.conf'
#
@ -37,6 +22,7 @@ proc okl4_dir { } {
return $_okl4_dir
}
##
# Return the location of the OKL4 kernel
#
@ -45,6 +31,7 @@ proc okl4 { } {
return bin/kernel
}
##
# Return whether okl4 kernel is provided from the outside
#
@ -53,15 +40,6 @@ proc okl4_external { } {
return 1
}
##################################
## Test framework API functions ##
##################################
proc create_boot_directory { } {
exec rm -rf [run_dir]
exec mkdir -p [run_dir]/genode
}
set weaver_xml_template {
<machine>
@ -122,7 +100,11 @@ set weaver_xml_template {
<rootprogram file="core" virtpool="virtual" physpool="physical" />
}
proc build_boot_image {binaries} {
##
# Populate directory with binaries on OKL4
#
proc run_boot_dir {binaries} {
global weaver_xml_template
#
@ -179,86 +161,50 @@ proc build_boot_image {binaries} {
#
exec rm -r [run_dir]/genode
#
# Install GRUB
#
install_iso_bootloader_to_run_dir
#
# Install PXE bootloader pulsar
#
install_pxe_bootloader_to_run_dir
#
# Generate grub config file
#
# The core binary is part of the 'binaries' list but it must
# appear right after 'sigma0' as boot module. Hence the special case.
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "hiddenmenu"
puts $fh "\ntitle Genode on OKL4"
puts $fh " kernel /boot/bender"
puts $fh " module /image.elf"
puts $fh " vbeset 0x117"
close $fh
create_iso_image_from_run_dir
create_disk_image_from_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
# load okl4 at 256M to avoid overwritting binary, adjust by need
puts $fh " addr 0x10000000"
puts $fh " exec /boot/bender"
puts $fh " load /image.elf"
close $fh
if {[have_include "image/iso"] || [have_include "image/disk"]} {
#
# Install GRUB
#
install_iso_bootloader_to_run_dir
#
# Generate grub config file