2019-05-22 08:32:44 +00:00
|
|
|
assert_spec x86
|
|
|
|
|
|
|
|
if {(![have_spec nova] && ![have_spec foc])} {
|
2015-06-08 22:45:34 +00:00
|
|
|
puts "Platform is unsupported."
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2015-01-08 21:09:08 +00:00
|
|
|
if {[have_include "power_on/qemu"]} {
|
2014-09-23 11:01:47 +00:00
|
|
|
puts "\nRun script does not support Qemu.\n"
|
2015-01-08 21:09:08 +00:00
|
|
|
exit 0
|
2014-02-12 12:53:42 +00:00
|
|
|
}
|
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
if {[expr !$use_rumpfs && $use_vms > 1] } {
|
|
|
|
puts "\nConfiguration bug - have only one raw block partition.\n"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2015-02-19 10:59:31 +00:00
|
|
|
set vdi_image "${flavor}.vdi"
|
2016-10-12 13:20:04 +00:00
|
|
|
set raw_image "${flavor}.vmdk"
|
2015-02-19 10:59:31 +00:00
|
|
|
set vbox_file "vm_${flavor}.vbox"
|
|
|
|
set overlay_image "overlay_${flavor}.vdi"
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2017-08-23 12:23:33 +00:00
|
|
|
if {[info exists flavor_extension]} {
|
|
|
|
set vbox_file "vm_${flavor}${flavor_extension}.vbox"
|
|
|
|
}
|
2021-03-16 08:44:23 +00:00
|
|
|
if {![info exists use_webcam]} {
|
|
|
|
set use_webcam 0
|
|
|
|
}
|
|
|
|
if {![info exists webcam_vflip]} {
|
|
|
|
set webcam_vflip true
|
|
|
|
if {$use_webcam} {
|
|
|
|
if {[string match "win*" $flavor] } {
|
|
|
|
set webcam_vflip false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-08-23 12:23:33 +00:00
|
|
|
|
2015-03-30 16:00:43 +00:00
|
|
|
set build_components {
|
2021-01-08 16:27:24 +00:00
|
|
|
server/nic_router
|
2020-07-16 09:28:18 +00:00
|
|
|
server/event_filter
|
2023-06-20 12:07:26 +00:00
|
|
|
drivers/nic/pc
|
2015-06-03 12:39:01 +00:00
|
|
|
drivers/audio
|
2015-03-30 16:00:43 +00:00
|
|
|
server/report_rom
|
2016-10-12 13:20:04 +00:00
|
|
|
server/dynamic_rom
|
2015-03-30 16:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set boot_modules {
|
2021-01-08 16:27:24 +00:00
|
|
|
nic_router
|
2020-07-16 09:28:18 +00:00
|
|
|
event_filter
|
2023-06-20 12:07:26 +00:00
|
|
|
pc_nic_drv
|
2020-06-19 12:49:29 +00:00
|
|
|
pci_audio_drv
|
2015-03-30 16:00:43 +00:00
|
|
|
report_rom
|
2016-10-12 13:20:04 +00:00
|
|
|
dynamic_rom
|
2015-03-30 16:00:43 +00:00
|
|
|
}
|
2014-05-28 12:48:33 +00:00
|
|
|
|
2019-05-06 08:34:47 +00:00
|
|
|
set virtualbox5_binary "virtualbox5"
|
|
|
|
if {$use_vbox5_nova} { set virtualbox5_binary "virtualbox5-nova" }
|
2017-01-10 14:30:02 +00:00
|
|
|
|
2014-02-12 12:53:42 +00:00
|
|
|
set config_of_app {
|
2015-03-30 16:00:43 +00:00
|
|
|
|
2020-07-16 09:28:18 +00:00
|
|
|
<start name="event_filter">
|
2015-03-30 16:00:43 +00:00
|
|
|
<resource name="RAM" quantum="1M" />
|
|
|
|
<provides>
|
2020-07-16 09:28:18 +00:00
|
|
|
<service name="Event" />
|
2015-03-30 16:00:43 +00:00
|
|
|
</provides>
|
2021-01-13 09:15:10 +00:00
|
|
|
<config>
|
2020-04-22 14:15:56 +00:00
|
|
|
<output>
|
2021-01-13 09:15:10 +00:00
|
|
|
<merge>
|
|
|
|
<input name="ps2"/>
|
|
|
|
<input name="usb_hid"/>
|
2020-04-22 14:15:56 +00:00
|
|
|
</merge>
|
2021-01-13 09:15:10 +00:00
|
|
|
</output>
|
|
|
|
<policy label="ps2" input="ps2"/>
|
|
|
|
<policy label="usb_hid" input="usb_hid"/>
|
2020-07-16 09:28:18 +00:00
|
|
|
</config>
|
|
|
|
<route>
|
|
|
|
<service name="Event"> <child name="nitpicker"/> </service>
|
2015-03-30 16:00:43 +00:00
|
|
|
<any-service> <parent /> <any-child /> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Note: to get network access in the VM, the virtual network adapter
|
|
|
|
needs to be enabled in the .vbox file (disabled by default)
|
|
|
|
-->
|
|
|
|
<start name="nic_drv" priority="-1">
|
2023-06-20 12:07:26 +00:00
|
|
|
<binary name="pc_nic_drv"/>
|
2015-03-30 16:00:43 +00:00
|
|
|
<resource name="RAM" quantum="8M" />
|
2021-01-08 16:27:24 +00:00
|
|
|
<route>
|
|
|
|
<service name="Uplink"> <child name="nic_router"/> </service>
|
|
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="nic_router" caps="200">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
2015-03-30 16:00:43 +00:00
|
|
|
<provides>
|
2021-01-08 16:27:24 +00:00
|
|
|
<service name="Nic"/>
|
|
|
|
<service name="Uplink"/>
|
2015-03-30 16:00:43 +00:00
|
|
|
</provides>
|
2021-01-08 16:27:24 +00:00
|
|
|
<config verbose_domain_state="yes">
|
|
|
|
|
|
|
|
<policy label_prefix="vbox" domain="downlink"/>
|
|
|
|
<policy label_prefix="nic_drv" domain="uplink"/>
|
|
|
|
|
|
|
|
<domain name="uplink">
|
|
|
|
|
|
|
|
<nat domain="downlink"
|
|
|
|
tcp-ports="16384"
|
|
|
|
udp-ports="16384"
|
|
|
|
icmp-ids="16384"/>
|
|
|
|
|
|
|
|
</domain>
|
|
|
|
|
|
|
|
<domain name="downlink" interface="10.0.3.1/24" verbose_packets="no">
|
|
|
|
|
2021-08-05 11:31:13 +00:00
|
|
|
<dhcp-server ip_first="10.0.3.100" ip_last="10.0.3.200" dns_config_from="uplink"/>
|
2021-01-08 16:27:24 +00:00
|
|
|
|
|
|
|
<tcp dst="0.0.0.0/0"><permit-any domain="uplink" /></tcp>
|
|
|
|
<udp dst="0.0.0.0/0"><permit-any domain="uplink" /></udp>
|
|
|
|
<icmp dst="0.0.0.0/0" domain="uplink"/>
|
|
|
|
|
|
|
|
</domain>
|
|
|
|
|
|
|
|
</config>
|
2015-03-30 16:00:43 +00:00
|
|
|
</start>
|
|
|
|
|
2015-06-03 12:39:01 +00:00
|
|
|
<!--
|
|
|
|
Note: to use audio in the VM, the virtual audio adapter
|
|
|
|
needs to be enabled in the .vbox file (disabled by default).
|
|
|
|
(Recording is configured to use the external mic.)
|
|
|
|
-->
|
2016-04-21 12:24:16 +00:00
|
|
|
<start name="audio_drv" priority="-1">
|
2020-06-19 12:49:29 +00:00
|
|
|
<binary name="pci_audio_drv"/>
|
2015-11-16 13:04:04 +00:00
|
|
|
<resource name="RAM" quantum="9M"/>
|
2015-06-03 12:39:01 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Audio_out"/>
|
|
|
|
<service name="Audio_in"/>
|
|
|
|
</provides>
|
|
|
|
<config recording="yes">
|
|
|
|
<mixer field="outputs.master" value="255"/>
|
|
|
|
<mixer field="record.adc-0:1_source" value="sel2"/>
|
|
|
|
<mixer field="record.adc-0:1" value="255"/>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
2015-03-30 16:00:43 +00:00
|
|
|
<start name="report_rom">
|
2016-12-09 15:47:11 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
2015-03-30 16:00:43 +00:00
|
|
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
|
|
|
<config>
|
2017-11-24 17:56:25 +00:00
|
|
|
<policy label="pointer -> hover" report="nitpicker -> hover"/>
|
|
|
|
<policy label="pointer -> xray" report="nitpicker -> xray"/>}
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app {
|
2021-05-25 11:40:09 +00:00
|
|
|
<policy label="usb_hid_drv -> report" report="usb_drv -> devices"/>
|
2016-10-12 13:20:04 +00:00
|
|
|
<policy label="usb_report_filter -> devices" report="usb_drv -> devices"/>
|
|
|
|
<policy label="usb_report_filter -> usb_drv_config" report="usb_drv -> config"/>
|
2016-10-19 12:52:59 +00:00
|
|
|
<policy label="vbox1 -> usb_devices" report="usb_report_filter -> usb_devices"/>}
|
|
|
|
append_if [expr $use_cpu_load] config_of_app {
|
|
|
|
<policy label="cpu_load_display -> trace_subjects"
|
|
|
|
report="trace_subject_reporter -> trace_subjects"/>}
|
|
|
|
append config_of_app {
|
2015-03-30 16:00:43 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
2019-03-04 12:53:40 +00:00
|
|
|
<start name="nitpicker" priority="-1" caps="150">
|
2017-03-30 11:16:05 +00:00
|
|
|
<resource name="RAM" quantum="12M"/>
|
2020-07-16 09:28:18 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Gui"/> <service name="Capture"/> <service name="Event"/>
|
|
|
|
</provides>
|
2015-03-30 16:00:43 +00:00
|
|
|
<route>
|
2015-05-26 18:12:17 +00:00
|
|
|
<service name="Report"> <child name="report_rom" /> </service>
|
2020-05-08 14:21:20 +00:00
|
|
|
<service name="ROM" label="config">
|
|
|
|
<child name="dynamic-config" label="nitpicker.config"/> </service>
|
2015-03-30 16:00:43 +00:00
|
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
2017-11-24 17:56:25 +00:00
|
|
|
<start name="pointer" priority="-1">
|
2017-03-16 16:12:20 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
2017-11-28 17:40:27 +00:00
|
|
|
<provides> <service name="Report"/> </provides>
|
2017-11-24 18:53:30 +00:00
|
|
|
<config shapes="yes"/>
|
2015-03-30 16:00:43 +00:00
|
|
|
<route>
|
2020-06-11 14:06:21 +00:00
|
|
|
<service name="Gui"> <child name="nitpicker"/> </service>
|
2017-01-18 16:10:07 +00:00
|
|
|
<service name="ROM" label="hover"> <child name="report_rom"/> </service>
|
|
|
|
<service name="ROM" label="xray"> <child name="report_rom"/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
2015-03-30 16:00:43 +00:00
|
|
|
</route>
|
2016-10-19 12:52:59 +00:00
|
|
|
</start>}
|
2015-03-30 16:00:43 +00:00
|
|
|
|
2019-03-04 12:53:40 +00:00
|
|
|
if { $use_vms > 1 } {
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app {
|
2019-03-04 12:53:40 +00:00
|
|
|
<start name="wm" caps="1000">
|
|
|
|
<resource name="RAM" quantum="32M"/>
|
|
|
|
<binary name="init"/>
|
2019-06-27 17:03:03 +00:00
|
|
|
<provides>
|
2020-06-11 14:06:21 +00:00
|
|
|
<service name="Gui"/> <service name="Report"/> <service name="ROM"/>
|
2019-06-27 17:03:03 +00:00
|
|
|
</provides>
|
2019-03-04 12:53:40 +00:00
|
|
|
<route>
|
|
|
|
<service name="ROM" label="config"> <parent label="wm.config"/> </service>
|
2020-06-11 14:06:21 +00:00
|
|
|
<service name="Gui"> <child name="nitpicker"/> </service>
|
2019-03-04 12:53:40 +00:00
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
2016-10-12 13:20:04 +00:00
|
|
|
</route>
|
2016-10-19 12:52:59 +00:00
|
|
|
</start>}
|
|
|
|
}
|
2016-10-12 13:20:04 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app {
|
2019-03-04 12:53:40 +00:00
|
|
|
<start name="dynamic-config" priority="-1">
|
2016-10-12 13:20:04 +00:00
|
|
|
<binary name="dynamic_rom"/>
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="ROM"/> </provides>
|
2019-03-04 12:53:40 +00:00
|
|
|
<config verbose="yes">
|
2017-11-07 14:13:10 +00:00
|
|
|
<rom name="capslock">
|
|
|
|
<inline>
|
|
|
|
<capslock enabled="yes"/>
|
|
|
|
</inline>
|
|
|
|
<sleep milliseconds="5000"/>
|
|
|
|
<inline>
|
|
|
|
<capslock enabled="no"/>
|
|
|
|
</inline>
|
|
|
|
<sleep milliseconds="5000"/>
|
|
|
|
</rom>
|
2019-03-04 12:53:40 +00:00
|
|
|
<rom name="nitpicker.config">
|
|
|
|
<inline description="standard_mode">
|
2020-08-13 15:25:21 +00:00
|
|
|
<config>
|
2020-07-16 09:28:18 +00:00
|
|
|
<capture/> <event/>
|
2019-03-04 12:53:40 +00:00
|
|
|
<report focus="yes" hover="yes" />
|
|
|
|
|
|
|
|
<domain name="pointer" layer="1" content="client" label="no" origin="pointer" />
|
|
|
|
<domain name="cpu_load" layer="2" content="client" label="no" />
|
|
|
|
<domain name="" layer="3" content="client" label="no" focus="click" hover="always"/>
|
|
|
|
|
|
|
|
<policy label_prefix="pointer" domain="pointer"/>
|
|
|
|
<policy label_prefix="cpu_load_display" domain="cpu_load"/>
|
|
|
|
<default-policy domain=""/>
|
|
|
|
</config>
|
|
|
|
</inline>
|
|
|
|
<sleep milliseconds="50000"/>}
|
|
|
|
|
|
|
|
append_if [expr !$use_rumpfs] config_of_app {
|
|
|
|
<inline description="shutdown">
|
2020-08-13 15:25:21 +00:00
|
|
|
<config>
|
2020-07-16 09:28:18 +00:00
|
|
|
<capture/> <event/>
|
2019-03-04 12:53:40 +00:00
|
|
|
<report focus="yes" hover="yes" />
|
|
|
|
|
|
|
|
<domain name="pointer" layer="1" content="client" label="no" origin="pointer" />
|
|
|
|
<domain name="cpu_load" layer="2" content="client" label="no" />
|
|
|
|
<domain name="" layer="3" content="client" label="no" focus="click" hover="always" width="1" height="1" />
|
|
|
|
|
|
|
|
<policy label_prefix="pointer" domain="pointer"/>
|
|
|
|
<policy label_prefix="cpu_load_display" domain="cpu_load"/>
|
|
|
|
<default-policy domain=""/>
|
|
|
|
</config>
|
|
|
|
</inline>
|
|
|
|
<sleep milliseconds="500000"/>}
|
|
|
|
|
|
|
|
append config_of_app {
|
|
|
|
</rom>
|
2016-10-12 13:20:04 +00:00
|
|
|
</config>
|
|
|
|
<route>
|
2016-10-19 12:52:59 +00:00
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
2017-01-18 16:10:07 +00:00
|
|
|
<any-service> <parent /> </any-service>
|
2016-10-12 13:20:04 +00:00
|
|
|
</route>
|
2016-10-19 12:52:59 +00:00
|
|
|
</start>}
|
2015-03-30 16:00:43 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
for { set i 1} { $i <= $use_vms } { incr i} {
|
|
|
|
append config_of_app "
|
2020-12-18 13:08:06 +00:00
|
|
|
<start name=\"vbox${i}\" priority=\"-2\" caps=\"1200\">"
|
2017-01-31 14:13:58 +00:00
|
|
|
append_if [expr $use_vbox5] config_of_app "
|
|
|
|
<binary name=\"$virtualbox5_binary\" />"
|
2016-08-15 10:27:54 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app {
|
2017-06-22 14:33:53 +00:00
|
|
|
<resource name="RAM" quantum="} $vm_ram {"/>}
|
2016-10-19 12:52:59 +00:00
|
|
|
if { $use_vms eq 1 } {
|
|
|
|
append config_of_app "
|
2017-11-07 14:13:10 +00:00
|
|
|
<config ld_verbose=\"yes\" vbox_file=\"${vbox_file}\" vm_name=\"${flavor}\" xhci=\"yes\" capslock=\"NOROM\">"
|
2016-10-19 12:52:59 +00:00
|
|
|
} else {
|
|
|
|
append config_of_app "
|
|
|
|
<affinity xpos=\"[expr $i]\" width=\"2\" />
|
2017-11-07 14:13:10 +00:00
|
|
|
<config ld_verbose=\"yes\" vbox_file=\"${vbox_file}\" vm_name=\"${flavor}\" xhci=\"no\" capslock=\"NOROM\">"
|
2016-10-19 12:52:59 +00:00
|
|
|
}
|
2021-03-16 08:44:23 +00:00
|
|
|
|
|
|
|
append_if [expr $use_webcam] config_of_app {
|
2021-10-08 12:37:06 +00:00
|
|
|
<webcam vertical_flip="} $webcam_vflip {" fps="15" screen_size="false" width="640" height="480"/>}
|
2021-03-16 08:44:23 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app {
|
2020-07-23 13:14:54 +00:00
|
|
|
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc" pipe="/pipe"/>
|
2017-01-05 12:45:37 +00:00
|
|
|
<vfs>
|
|
|
|
<dir name="dev">
|
|
|
|
<log/> <rtc/>}
|
2016-10-12 13:20:04 +00:00
|
|
|
|
2020-02-28 14:38:28 +00:00
|
|
|
append_if [expr $use_serial] config_of_app { <terminal/> }
|
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append_if [expr !$use_rumpfs] config_of_app {
|
2017-01-05 12:45:37 +00:00
|
|
|
<block name="sda3" label="raw" block_buffer_count="128" />}
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app {
|
2020-07-23 13:14:54 +00:00
|
|
|
</dir>
|
|
|
|
<dir name="pipe"> <pipe/> </dir>}
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append_if [expr $use_ram_fs] config_of_app {
|
2017-01-05 12:45:37 +00:00
|
|
|
<dir name="ram"> <fs label="from_ram_fs"/> </dir>}
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app "
|
2017-01-05 12:45:37 +00:00
|
|
|
<rom name=\"${vbox_file}\"/>"
|
2016-10-19 12:52:59 +00:00
|
|
|
append_if [expr !$use_rumpfs] config_of_app "
|
2017-01-05 12:45:37 +00:00
|
|
|
<rom name=\"${raw_image}\"/>"
|
2016-10-12 13:20:04 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append_if [expr $use_rumpfs || $use_ram_fs] config_of_app {
|
2017-01-05 12:45:37 +00:00
|
|
|
<fs />}
|
2016-10-12 13:20:04 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app {
|
2017-01-05 12:45:37 +00:00
|
|
|
</vfs>
|
2014-02-12 12:53:42 +00:00
|
|
|
</config>
|
2014-09-23 11:01:47 +00:00
|
|
|
<route>}
|
|
|
|
|
2019-03-04 12:53:40 +00:00
|
|
|
append_if [expr ($use_vms > 1)] config_of_app {
|
2020-06-11 14:06:21 +00:00
|
|
|
<service name="Gui"> <child name="wm"/> </service>}
|
2019-03-04 12:53:40 +00:00
|
|
|
|
2016-10-19 12:52:59 +00:00
|
|
|
append_if [expr $use_ram_fs] config_of_app {
|
|
|
|
<service name="File_system" label="from_ram_fs"> <child name="ram_fs"/> </service>}
|
|
|
|
|
|
|
|
append_if [expr $use_rumpfs] config_of_app {
|
|
|
|
<service name="File_system"> <child name="rump_fs"/> </service>}
|
|
|
|
append_if [expr !$use_rumpfs] config_of_app {
|
2019-01-06 20:17:07 +00:00
|
|
|
<service name="Block"> <child name="part_block"/> </service>}
|
2016-10-19 12:52:59 +00:00
|
|
|
append config_of_app {
|
2019-03-04 12:53:40 +00:00
|
|
|
<service name="Report" label="shape"> <child name="pointer"/></service>
|
2015-05-26 18:12:17 +00:00
|
|
|
<service name="Report"><child name="report_rom" /></service>
|
2017-01-18 16:10:07 +00:00
|
|
|
<service name="ROM" label="usb_devices"> <child name="report_rom" /> </service>
|
2019-03-04 12:53:40 +00:00
|
|
|
<service name="ROM" label="capslock"> <child name="dynamic-config"/> </service>
|
2014-02-12 12:53:42 +00:00
|
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
|
|
</route>
|
2016-10-19 12:52:59 +00:00
|
|
|
</start>}
|
2014-02-12 12:53:42 +00:00
|
|
|
}
|
|
|
|
|
2014-05-07 09:48:19 +00:00
|
|
|
source ${genode_dir}/repos/ports/run/virtualbox_auto.inc
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2014-09-23 11:01:47 +00:00
|
|
|
# copy vbox configuration to bin directory
|
2015-02-19 10:59:31 +00:00
|
|
|
exec cp ${genode_dir}/repos/ports/run/${vbox_file} bin/.
|
|
|
|
|
2020-02-28 14:38:28 +00:00
|
|
|
if {[info exists use_vcpus]} {
|
|
|
|
exec sed -i "s/CPU count=\".*\"/CPU count=\"${use_vcpus}\"/g" bin/${vbox_file}
|
|
|
|
}
|
|
|
|
|
2016-10-12 13:20:04 +00:00
|
|
|
if {!$use_rumpfs} {
|
|
|
|
exec cp ${genode_dir}/repos/ports/run/${raw_image} bin/.
|
|
|
|
}
|
|
|
|
|
2015-02-19 10:59:31 +00:00
|
|
|
append boot_modules " ${vbox_file} "
|
2016-10-12 13:20:04 +00:00
|
|
|
append_if [expr !$use_rumpfs] boot_modules " ${raw_image} "
|
2014-09-23 11:01:47 +00:00
|
|
|
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
2019-05-22 08:32:44 +00:00
|
|
|
set wait_timeout 70
|
|
|
|
if {[have_spec foc]} { set wait_timeout 120 }
|
|
|
|
|
2020-07-20 13:48:28 +00:00
|
|
|
if {![info exists use_check_result]} {
|
|
|
|
set use_check_result 0
|
|
|
|
}
|
|
|
|
|
|
|
|
if {$use_check_result} {
|
2020-02-28 14:38:28 +00:00
|
|
|
run_genode_until {\[init -\> vbox.*].*Guest Additions capability report:.*seamless: no, hostWindowMapping: no, graphics: no} $wait_timeout
|
2019-05-22 08:32:44 +00:00
|
|
|
|
2020-02-28 14:38:28 +00:00
|
|
|
# run_genode_until forever 0 [output_spawn_id]
|
2016-10-19 12:52:59 +00:00
|
|
|
|
2020-02-28 14:38:28 +00:00
|
|
|
if {$use_rumpfs} {
|
|
|
|
set wait_timeout 170
|
|
|
|
for { set i 1 } { $i <= $use_vms } { incr i } {
|
|
|
|
if { [string match "ubuntu*" $flavor] || [string match "win10*" $flavor] } {
|
|
|
|
run_genode_until {\[init -\> vbox.*].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: no} $wait_timeout [output_spawn_id]
|
|
|
|
} else {
|
|
|
|
run_genode_until {\[init -\> vbox.*].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: yes} $wait_timeout [output_spawn_id]
|
|
|
|
}
|
2017-05-16 09:08:34 +00:00
|
|
|
}
|
2020-02-28 14:38:28 +00:00
|
|
|
} else {
|
|
|
|
run_genode_until {\[init\] child "vbox1" exited with exit value 0} 60 [output_spawn_id]
|
|
|
|
# give block driver bit time to write data to disk
|
|
|
|
sleep 5
|
2016-10-19 12:52:59 +00:00
|
|
|
}
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2020-02-28 14:38:28 +00:00
|
|
|
# cleanup bin directory - remove vbox file
|
|
|
|
exec rm bin/${vbox_file}
|
|
|
|
if {!$use_rumpfs} {
|
|
|
|
exec rm bin/${raw_image}
|
|
|
|
}
|
2016-10-12 13:20:04 +00:00
|
|
|
}
|