# Tested for nova and hw_x86_64_muen.
if {(![have_spec nova] && ![have_spec hw_x86_64_muen])} {
puts "Platform is unsupported."
exit 0
}
if {[have_include "power_on/qemu"]} {
puts "\nRun script does not support Qemu.\n"
exit 0
}
set vdi_image "${flavor}.vdi"
set raw_image "${flavor}.vmdk"
set vbox_file "vm_${flavor}.vbox"
set overlay_image "overlay_${flavor}.vdi"
set build_components {
server/input_merger
drivers/nic
drivers/audio
server/nitpicker
app/vbox_pointer
server/nit_fb
server/report_rom
server/dynamic_rom
}
set boot_modules {
input_merger
nic_drv
audio_drv
nitpicker
vbox_pointer
nit_fb
report_rom
dynamic_rom
}
set config_of_app {
}
append_if [expr $use_ps2] config_of_app {
}
append_if [expr $use_usb] config_of_app {
}
append config_of_app {
}
append_if [expr $use_ps2] config_of_app {
}
append_if [expr $use_usb] config_of_app {
}
append config_of_app {
}
append_if [expr !$use_rumpfs] config_of_app {
}
append config_of_app {
}
append_if [expr $use_vbox4] config_of_app {
}
append_if [expr $use_vbox5] config_of_app {
}
append config_of_app {
}
append config_of_app "
"
append config_of_app {
}
append_if [expr !$use_rumpfs] config_of_app {
}
append config_of_app {
}
append_if [expr $use_ram_fs] config_of_app {
}
append config_of_app "
"
append_if [expr !$use_rumpfs] config_of_app "
"
append_if [expr $use_rumpfs || $use_ram_fs] config_of_app {
}
append config_of_app {
}
append_if [expr $use_ram_fs] config_of_app {
}
append_if [expr $use_rumpfs] config_of_app {
}
append_if [expr !$use_rumpfs] config_of_app {
}
append config_of_app {
}
source ${genode_dir}/repos/ports/run/virtualbox_auto.inc
# copy vbox configuration to bin directory
exec cp ${genode_dir}/repos/ports/run/${vbox_file} bin/.
if {!$use_rumpfs} {
exec cp ${genode_dir}/repos/ports/run/${raw_image} bin/.
}
append boot_modules " ${vbox_file} "
append_if [expr !$use_rumpfs] boot_modules " ${raw_image} "
build_boot_image $boot_modules
run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamless: no, hostWindowMapping: no, graphics: no} 70
if {$use_rumpfs} {
run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: yes} 170 [output_spawn_id]
} else {
run_genode_until {\[init\] child "vbox" exited with exit value 0} 60 [output_spawn_id]
# give block driver bit time to write data to disk
sleep 5
}
# cleanup bin directory - remove vbox file
exec rm bin/${vbox_file}
if {!$use_rumpfs} {
exec rm bin/${raw_image}
}