2011-12-22 15:19:25 +00:00
|
|
|
#
|
2018-11-12 19:31:41 +00:00
|
|
|
# \brief Using Seoul on Genode
|
2011-12-22 15:19:25 +00:00
|
|
|
# \author Norman Feske
|
2012-10-10 17:23:26 +00:00
|
|
|
# \author Markus Partheymueller
|
2013-06-03 10:05:29 +00:00
|
|
|
# \author Alexander Boettcher
|
2011-12-22 15:19:25 +00:00
|
|
|
# \date 2011-11-21
|
|
|
|
|
2020-03-12 10:38:40 +00:00
|
|
|
set use_fs_rump $use_block_vdi
|
|
|
|
set use_drv_ahci [expr $use_block_vdi || $use_block_sata]
|
|
|
|
|
2019-03-04 09:05:11 +00:00
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
import_from_depot [depot_user]/src/[base_src] \
|
|
|
|
[depot_user]/src/init \
|
|
|
|
[depot_user]/src/nitpicker
|
2020-03-12 10:38:40 +00:00
|
|
|
|
|
|
|
if {$use_fs_rump} {
|
|
|
|
import_from_depot [depot_user]/src/vfs \
|
|
|
|
[depot_user]/src/rump
|
|
|
|
}
|
|
|
|
|
|
|
|
if {$use_part_block} {
|
|
|
|
import_from_depot [depot_user]/src/part_block
|
|
|
|
}
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
|
2018-11-12 19:31:41 +00:00
|
|
|
assert_spec x86
|
|
|
|
|
2019-04-11 12:28:36 +00:00
|
|
|
set map_small "no"
|
|
|
|
set vmm_vcpu_same_cpu "no"
|
2018-11-12 19:31:41 +00:00
|
|
|
|
|
|
|
if {[have_spec sel4]} {
|
|
|
|
set map_small "yes"
|
2019-05-14 14:10:13 +00:00
|
|
|
set vmm_vcpu_same_cpu "yes"
|
2018-11-12 19:31:41 +00:00
|
|
|
|
|
|
|
# seL4 has no AMD SVM support
|
|
|
|
if {[have_include "power_on/qemu"]} {
|
|
|
|
puts "\n Run script is not supported on this platform. \n";
|
|
|
|
exit 0
|
|
|
|
}
|
2011-12-22 15:19:25 +00:00
|
|
|
}
|
|
|
|
|
2018-11-12 19:31:41 +00:00
|
|
|
if {[have_spec foc]} {
|
2019-04-11 12:28:36 +00:00
|
|
|
# The performance is considerable bad when
|
|
|
|
# vmm and vcpu is not on same physical CPU
|
|
|
|
set vmm_vcpu_same_cpu "yes"
|
2018-11-12 19:31:41 +00:00
|
|
|
|
|
|
|
# Qemu SVM has no EPT support
|
|
|
|
if {[have_include "power_on/qemu"]} {
|
|
|
|
puts "\n Run script is not supported on this platform. \n";
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
}
|
2015-04-24 14:10:04 +00:00
|
|
|
|
2015-05-28 11:43:13 +00:00
|
|
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
|
|
|
# override defaults of platform_drv.inc
|
|
|
|
proc platform_drv_priority {} { return { priority="-1"} }
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
set build_components {
|
2012-10-10 17:23:26 +00:00
|
|
|
drivers/rtc
|
|
|
|
drivers/input
|
2014-12-01 12:59:51 +00:00
|
|
|
app/seoul
|
2011-12-22 15:19:25 +00:00
|
|
|
}
|
|
|
|
|
2013-08-21 10:01:00 +00:00
|
|
|
if {$use_fancy_stuff} { set use_framebuffer 1 }
|
|
|
|
|
2020-03-12 10:38:40 +00:00
|
|
|
lappend_if $use_block_vdi build_components server/vdi_block
|
2013-06-03 10:05:29 +00:00
|
|
|
lappend_if $use_usb build_components drivers/usb
|
2019-01-06 20:17:07 +00:00
|
|
|
lappend_if $use_block_ram build_components server/ram_block
|
2020-03-12 10:38:40 +00:00
|
|
|
lappend_if $use_drv_ahci build_components drivers/ahci
|
2013-06-03 10:05:29 +00:00
|
|
|
lappend_if $use_nic_session build_components drivers/nic
|
|
|
|
lappend_if $use_nic_bridge build_components server/nic_bridge
|
2013-08-21 10:01:00 +00:00
|
|
|
lappend_if $use_framebuffer build_components drivers/framebuffer
|
2014-12-01 12:59:51 +00:00
|
|
|
lappend_if $use_fancy_stuff build_components app/status_bar
|
2013-06-03 10:05:29 +00:00
|
|
|
lappend_if $use_fancy_stuff build_components app/launchpad
|
2014-12-01 12:59:51 +00:00
|
|
|
lappend_if $use_fancy_stuff build_components server/report_rom
|
2014-09-21 08:20:20 +00:00
|
|
|
lappend_if $use_genode_iso build_components server/iso9660
|
2019-01-06 20:17:07 +00:00
|
|
|
lappend_if $use_genode_iso build_components server/rom_block
|
2018-03-02 13:52:40 +00:00
|
|
|
lappend_if $use_top build_components app/top
|
2013-02-27 16:27:33 +00:00
|
|
|
|
2015-05-28 11:43:13 +00:00
|
|
|
append_platform_drv_build_components
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
build $build_components
|
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
# write Seoul config file
|
2014-09-21 08:20:20 +00:00
|
|
|
set vm_cfg_fd [open "bin/vm_seoul.cfg" w]
|
2019-04-11 12:28:36 +00:00
|
|
|
puts $vm_cfg_fd "<config map_small=\"$map_small\" vmm_vcpu_same_cpu=\"$vmm_vcpu_same_cpu\">"
|
2019-11-15 10:07:52 +00:00
|
|
|
puts $vm_cfg_fd { <machine verbose="no">
|
2012-10-10 17:23:26 +00:00
|
|
|
<mem start="0x0" end="0x9a000"/>
|
|
|
|
<mem start="0x100000" end="0xfffff000"/>
|
|
|
|
<!--<ioio/>-->
|
|
|
|
<nullio io_base="0x80" />
|
|
|
|
<pic io_base="0x20" elcr_base="0x4d0"/>
|
|
|
|
<pic io_base="0xa0" irq="2" elcr_base="0x4d1"/>
|
|
|
|
<pit io_base="0x40" irq="0"/>
|
|
|
|
<scp io_port_a="0x92" io_port_b="0x61"/>
|
|
|
|
<kbc io_base="0x60" irq_kbd="1" irq_aux="12"/>
|
|
|
|
<keyb ps2_port="0" host_keyboard="0x10000"/>
|
|
|
|
<mouse ps2_port="1" host_mouse="0x10001"/>
|
|
|
|
<rtc io_base="0x70" irq="8"/>
|
|
|
|
<serial io_base="0x3f8" irq="0x4" host_serial="0x4711"/>
|
|
|
|
<hostsink host_dev="0x4712" buffer="80"/>
|
2018-03-14 22:04:43 +00:00
|
|
|
<vga io_base="0x03c0"/>}
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
if {!$use_multiboot} {
|
|
|
|
puts $vm_cfg_fd {
|
2012-10-10 17:23:26 +00:00
|
|
|
<vbios_disk/>
|
2013-06-03 10:05:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
puts $vm_cfg_fd {
|
2015-09-11 14:56:37 +00:00
|
|
|
<vbios_keyboard host_keyboard="0x10000"/>
|
2012-10-10 17:23:26 +00:00
|
|
|
<vbios_mem/>
|
|
|
|
<vbios_time/>
|
2013-06-03 10:05:29 +00:00
|
|
|
<vbios_reset/>}
|
|
|
|
|
|
|
|
if {$use_multiboot} {
|
2014-09-21 08:20:20 +00:00
|
|
|
if {[info exists use_multiboot_modaddr]} {
|
|
|
|
puts $vm_cfg_fd " <vbios_multiboot modaddr=\"$use_multiboot_modaddr\"/>"
|
|
|
|
} else {
|
|
|
|
puts $vm_cfg_fd { <vbios_multiboot/>}
|
2013-06-03 10:05:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
puts $vm_cfg_fd {
|
2012-10-10 17:23:26 +00:00
|
|
|
<msi/>
|
|
|
|
<ioapic/>
|
|
|
|
<pcihostbridge bus_num="0" bus_count="0x10" io_base="0xcf8"
|
|
|
|
mem_base="0xe0000000"/>
|
2014-07-16 19:43:41 +00:00
|
|
|
<pmtimer io_port="0x8000"/>}
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2014-07-16 19:43:41 +00:00
|
|
|
for {set i 0} {$i < $vcpus_to_be_used} {incr i 1} {
|
|
|
|
puts $vm_cfg_fd {
|
2013-06-03 10:05:29 +00:00
|
|
|
<vcpu/> <halifax/> <vbios/> <lapic/>}
|
2014-07-16 19:43:41 +00:00
|
|
|
}
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
if {!$use_multiboot} {
|
2015-09-09 21:38:07 +00:00
|
|
|
|
|
|
|
if {$use_model_ahci} {
|
|
|
|
puts $vm_cfg_fd {
|
2013-06-03 10:05:29 +00:00
|
|
|
<ahci mem="0xe0800000" irq="14" bdf="0x30"/>
|
|
|
|
<drive sigma0drive="0" controller="0" port="0"/>
|
2015-09-09 21:38:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if {$use_model_ide} {
|
|
|
|
puts $vm_cfg_fd {
|
|
|
|
<ide port0="0x1f0" port1="0x3f6" irq="14" bdf="0x38" disk="0"/>
|
|
|
|
}
|
2013-06-03 10:05:29 +00:00
|
|
|
}
|
|
|
|
}
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
if {$use_nic_session} {
|
|
|
|
puts $vm_cfg_fd {
|
2018-03-06 17:47:03 +00:00
|
|
|
<!-- <rtl8029 irq="9" port="0x300"/> -->
|
2013-06-03 10:05:29 +00:00
|
|
|
<intel82576vf/>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
puts $vm_cfg_fd {
|
|
|
|
</machine>
|
|
|
|
<multiboot>}
|
|
|
|
|
|
|
|
if {$use_multiboot} {
|
|
|
|
puts $vm_cfg_fd $multiboot_files
|
|
|
|
}
|
|
|
|
|
|
|
|
puts $vm_cfg_fd {
|
|
|
|
</multiboot>
|
2012-10-10 17:23:26 +00:00
|
|
|
</config>}
|
2013-06-03 10:05:29 +00:00
|
|
|
close $vm_cfg_fd
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
#
|
2013-06-03 10:05:29 +00:00
|
|
|
# Generate Genode config
|
2011-12-22 15:19:25 +00:00
|
|
|
#
|
|
|
|
|
2020-03-12 10:38:40 +00:00
|
|
|
set config {
|
2014-07-16 19:43:41 +00:00
|
|
|
<config verbose="yes" prio_levels="4">
|
2011-12-22 15:19:25 +00:00
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
2018-11-12 19:31:41 +00:00
|
|
|
<service name="VM"/>
|
2018-03-02 13:52:40 +00:00
|
|
|
<service name="LOG"/>}
|
|
|
|
|
|
|
|
append_if $use_top config {
|
|
|
|
<service name="TRACE"/>}
|
|
|
|
|
|
|
|
append config {
|
2011-12-22 15:19:25 +00:00
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
2012-10-10 17:23:26 +00:00
|
|
|
</default-route>
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
</start>
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2014-07-16 19:43:41 +00:00
|
|
|
<start name="rtc_drv" priority="-1">
|
2012-10-10 17:23:26 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Rtc"/></provides>
|
2013-02-27 16:27:33 +00:00
|
|
|
</start>}
|
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
append_if [expr !$use_usb] config {
|
2014-07-16 19:43:41 +00:00
|
|
|
<start name="ps2_drv" priority="-1">
|
2013-06-03 10:05:29 +00:00
|
|
|
<resource name="RAM" quantum="3M"/>
|
|
|
|
<provides><service name="Input"/></provides>
|
2015-04-24 14:10:04 +00:00
|
|
|
<route> <any-service><parent/> <any-child/> </any-service> </route>
|
2013-06-03 10:05:29 +00:00
|
|
|
</start> }
|
|
|
|
|
2020-03-12 10:38:40 +00:00
|
|
|
append_if $use_drv_ahci config {
|
2015-09-06 09:24:42 +00:00
|
|
|
<start name="ahci_drv" priority="-1">
|
2013-06-03 10:05:29 +00:00
|
|
|
<resource name="RAM" quantum="1M" />
|
|
|
|
<provides><service name="Block"/></provides>
|
2020-03-12 10:38:40 +00:00
|
|
|
<config>}
|
|
|
|
|
|
|
|
append_if [expr $use_block_sata && !$use_part_block] config {
|
|
|
|
<policy label="seoul -> VirtualDisk 0" device="0" writeable="yes"/>}
|
|
|
|
|
|
|
|
append_if [expr $use_block_vdi && !$use_part_block] config {
|
|
|
|
<policy label="rump_fs -> " device="0" writeable="yes"/>}
|
|
|
|
|
|
|
|
append_if [expr $use_block_vdi && $use_part_block] config {
|
|
|
|
<policy label="part_block -> " device="0" writeable="yes"/>}
|
|
|
|
|
|
|
|
append_if [expr $use_block_sata && $use_part_block] config {
|
|
|
|
<policy label="part_block -> " device="0" writeable="yes"/>}
|
|
|
|
|
|
|
|
append_if $use_drv_ahci config {
|
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
|
|
|
|
append_if $use_part_block config {
|
|
|
|
<start name="part_block" priority="-1">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
<provides><service name="Block"/></provides>
|
|
|
|
<route>
|
|
|
|
<any-service><child name="ahci_drv"/> <parent/></any-service>
|
|
|
|
</route>
|
2015-03-25 10:12:52 +00:00
|
|
|
<config>
|
2020-03-12 10:38:40 +00:00
|
|
|
<policy label="seoul -> VirtualDisk 0" partition="5" writeable="yes"/>
|
|
|
|
<policy label="rump_fs -> " partition="4" writeable="yes"/>
|
2015-03-25 10:12:52 +00:00
|
|
|
</config>
|
2013-06-03 10:05:29 +00:00
|
|
|
</start>}
|
|
|
|
|
2015-09-06 09:24:42 +00:00
|
|
|
append_if $use_block_ram config {
|
2019-01-06 20:17:07 +00:00
|
|
|
<start name="ram_block" priority="-1">
|
2019-03-04 09:05:11 +00:00
|
|
|
<resource name="RAM" quantum="262M" />
|
2015-09-06 09:24:42 +00:00
|
|
|
<provides><service name="Block"/></provides>
|
|
|
|
<config file="seoul-disc.raw" block_size="512"/>
|
|
|
|
</start>}
|
|
|
|
|
2020-03-12 10:38:40 +00:00
|
|
|
append_if $use_fs_rump config {
|
|
|
|
<start name="rump_fs" priority="-1" caps="200">
|
|
|
|
<binary name="vfs"/>
|
|
|
|
<resource name="RAM" quantum="32M"/>
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config ld_verbose="yes">
|
|
|
|
<vfs>
|
|
|
|
<rump fs="ext2fs" ram="28M"/>
|
|
|
|
</vfs>
|
|
|
|
<default-policy root="/" writeable="yes"/>
|
|
|
|
</config>
|
|
|
|
<route>
|
|
|
|
<service name="Timer"><child name="timer"/></service>}
|
|
|
|
|
|
|
|
append_if [expr $use_fs_rump && $use_part_block] config {
|
|
|
|
<service name="Block"><child name="part_block"/></service>}
|
|
|
|
append_if [expr $use_fs_rump && !$use_part_block] config {
|
|
|
|
<service name="Block"><child name="ahci_drv"/></service>}
|
|
|
|
|
|
|
|
append_if $use_fs_rump config {
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>}
|
|
|
|
|
|
|
|
append_if $use_block_vdi config {
|
|
|
|
<start name="vdi_block">
|
|
|
|
<resource name="RAM" quantum="8M"/>
|
|
|
|
<provides> <service name="Block"/> </provides>
|
|
|
|
<config file="/seoul_stress32.vdi" writeable="yes">
|
|
|
|
<vfs> <fs buffer_size="1M"/> </vfs>
|
|
|
|
<policy label="seoul -> VirtualDisk 0" writeable="yes"/>
|
|
|
|
</config>
|
|
|
|
<route>
|
|
|
|
<service name="File_system"><child name="rump_fs"/></service>
|
|
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>}
|
|
|
|
|
2014-09-21 08:20:20 +00:00
|
|
|
append_if $use_genode_iso config {
|
2019-01-06 20:17:07 +00:00
|
|
|
<start name="rom_block" priority="-1">
|
2014-09-21 08:20:20 +00:00
|
|
|
<resource name="RAM" quantum="16M" />
|
|
|
|
<provides><service name="Block"/></provides>
|
|
|
|
<config file="genode.iso" block_size="2048"/>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="iso9660" priority="-1">
|
|
|
|
<resource name="RAM" quantum="16M"/>
|
|
|
|
<provides><service name="ROM"/></provides>
|
|
|
|
<route>
|
2019-01-06 20:17:07 +00:00
|
|
|
<service name="Block"><child name="rom_block"/></service>
|
2014-09-21 08:20:20 +00:00
|
|
|
<any-service><parent/></any-service>
|
|
|
|
</route>
|
|
|
|
</start>}
|
|
|
|
|
2015-05-28 11:43:13 +00:00
|
|
|
append_platform_drv_config
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
append_if $use_nic_session config {
|
2014-07-16 19:43:41 +00:00
|
|
|
<start name="nic_drv" priority="-2">
|
2019-04-24 13:09:49 +00:00
|
|
|
<binary name="ipxe_nic_drv"/>
|
2016-11-23 16:07:49 +00:00
|
|
|
<resource name="RAM" quantum="8M"/>
|
2012-10-10 17:23:26 +00:00
|
|
|
<provides><service name="Nic"/></provides>
|
|
|
|
</start>
|
2013-06-03 10:05:29 +00:00
|
|
|
}
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
append_if [expr $use_nic_session && $use_nic_bridge] config {
|
2014-07-16 19:43:41 +00:00
|
|
|
<start name="nic_bridge" priority="-3">
|
2017-05-07 20:36:11 +00:00
|
|
|
<resource name="RAM" quantum="6M"/>
|
2012-10-10 17:23:26 +00:00
|
|
|
<provides><service name="Nic"/></provides>
|
2019-02-19 10:46:48 +00:00
|
|
|
<config> <default-policy/> </config>
|
2012-10-10 17:23:26 +00:00
|
|
|
<route>
|
|
|
|
<service name="Nic"><child name="nic_drv"/></service>
|
|
|
|
<any-service><parent/></any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
2013-06-03 10:05:29 +00:00
|
|
|
}
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-08-21 10:01:00 +00:00
|
|
|
append_if $use_framebuffer config {
|
2018-11-12 19:31:41 +00:00
|
|
|
<start name="fb_drv" priority="-1" caps="130">
|
2019-05-03 11:51:49 +00:00
|
|
|
<binary name="vesa_fb_drv"/>
|
2012-10-10 17:23:26 +00:00
|
|
|
<resource name="RAM" quantum="8M"/>
|
|
|
|
<provides><service name="Framebuffer"/></provides>
|
|
|
|
<route>
|
|
|
|
<service name="Timer"><child name="timer"/></service>
|
2015-06-08 07:05:32 +00:00
|
|
|
<service name="Platform"><any-child/></service>
|
2012-10-10 17:23:26 +00:00
|
|
|
<any-service><parent/></any-service>
|
2018-11-12 19:31:41 +00:00
|
|
|
</route>}
|
|
|
|
append_if [expr $use_framebuffer && [have_include "power_on/qemu"]] config {
|
|
|
|
<config width="1280" height="960" depth="16" buffered="yes"/>}
|
|
|
|
append_if [expr $use_framebuffer && ![have_include "power_on/qemu"]] config {
|
|
|
|
<config buffered="yes"/>}
|
|
|
|
append_if $use_framebuffer config {
|
2013-06-03 10:05:29 +00:00
|
|
|
</start> }
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
if {!$use_fancy_stuff} {
|
|
|
|
append config {
|
2019-05-14 14:10:13 +00:00
|
|
|
<start name="seoul" priority="-3" caps="800">
|
2014-05-16 22:57:41 +00:00
|
|
|
<binary name="seoul"/>}
|
2013-08-10 12:05:59 +00:00
|
|
|
append config "
|
|
|
|
<resource name=\"RAM\" quantum=\"$memory_vmm_vm\"/>"
|
|
|
|
append config {
|
2013-06-03 10:05:29 +00:00
|
|
|
<route>
|
|
|
|
<service name="Timer"><child name="timer"/></service>}
|
|
|
|
append_if [expr $use_nic_session && $use_nic_bridge] config {
|
|
|
|
<service name="Nic"> <child name="nic_bridge"/> </service>}
|
|
|
|
append_if [expr $use_nic_session && !$use_nic_bridge] config {
|
|
|
|
<service name="Nic"> <child name="nic_drv"/> </service>}
|
2014-09-21 08:20:20 +00:00
|
|
|
append_if $use_genode_iso config {
|
2018-07-04 16:48:04 +00:00
|
|
|
<service name="ROM" unscoped_label="seoul"> <parent/> </service>
|
2018-11-12 19:31:41 +00:00
|
|
|
<service name="ROM" unscoped_label="ld.lib.so"> <parent/> </service>
|
2018-03-18 21:34:00 +00:00
|
|
|
<service name="ROM" label="vm_seoul.cfg"> <parent/> </service>
|
|
|
|
<service name="ROM" label="platform_info"> <parent/> </service>
|
2014-09-21 08:20:20 +00:00
|
|
|
<service name="ROM"><child name="iso9660"/></service>}
|
2020-03-12 10:38:40 +00:00
|
|
|
append_if $use_block_vdi config {
|
|
|
|
<service name="Block"><child name="vdi_block"/></service>}
|
|
|
|
append_if [expr $use_block_sata && $use_part_block] config {
|
|
|
|
<service name="Block"><child name="part_block"/></service>}
|
2013-06-03 10:05:29 +00:00
|
|
|
append config {
|
|
|
|
<service name="Rtc"><child name="rtc_drv"/></service>
|
|
|
|
<any-service><parent/><any-child/></any-service>
|
|
|
|
</route>
|
2014-09-21 08:20:20 +00:00
|
|
|
<configfile name="vm_seoul.cfg"/>
|
2013-06-03 10:05:29 +00:00
|
|
|
</start> }
|
|
|
|
}
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-08-10 12:05:59 +00:00
|
|
|
append_if $use_usb config {
|
2017-08-25 13:36:24 +00:00
|
|
|
<start name="usb_drv" priority="-1" caps="120">
|
2019-02-08 14:09:00 +00:00
|
|
|
<resource name="RAM" quantum="12M"/>
|
2013-08-10 12:05:59 +00:00
|
|
|
<provides><service name="Input"/></provides>
|
|
|
|
<config uhci="yes" ehci="yes" xhci="yes">
|
|
|
|
<hid/>
|
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
|
2019-03-04 09:05:11 +00:00
|
|
|
append config {
|
2018-11-12 19:31:41 +00:00
|
|
|
<start name="nitpicker" priority="-1" caps="120">
|
2012-10-10 17:23:26 +00:00
|
|
|
<resource name="RAM" quantum="8M"/>
|
2014-12-01 12:59:51 +00:00
|
|
|
<config>
|
|
|
|
<report focus="yes" />
|
2015-09-30 09:30:02 +00:00
|
|
|
<domain name="pointer" layer="1" content="client" label="no" origin="pointer" />
|
|
|
|
<domain name="panel" layer="2" content="client" label="no" focus="none" />
|
2019-03-04 09:05:11 +00:00
|
|
|
<domain name="init.1" layer="3" content="client" focus="click"
|
|
|
|
hover="always" xpos="20" ypos="30" height="-20"/>
|
|
|
|
<domain name="init.2" layer="3" content="client" focus="click"
|
|
|
|
hover="always" xpos="30" ypos="40" height="-20"/>
|
|
|
|
<domain name="init.3" layer="3" content="client" focus="click"
|
|
|
|
hover="always" xpos="40" ypos="50" height="-20"/>
|
2015-09-30 09:30:02 +00:00
|
|
|
<domain name="" layer="3" content="client" focus="click"
|
2019-03-04 09:05:11 +00:00
|
|
|
hover="always" xpos="10" ypos="20" height="-20"/>
|
2016-11-24 14:28:32 +00:00
|
|
|
<policy label_prefix="pointer" domain="pointer"/>
|
|
|
|
<policy label_prefix="status_bar" domain="panel"/>
|
2019-03-04 09:05:11 +00:00
|
|
|
|
|
|
|
<policy label_prefix="launchpad -> init.1" domain="init.1"/>
|
|
|
|
<policy label_prefix="launchpad -> init.2" domain="init.2"/>
|
|
|
|
<policy label_prefix="launchpad -> init.3" domain="init.3"/>
|
|
|
|
|
2016-03-09 14:32:23 +00:00
|
|
|
<default-policy domain=""/>
|
2014-12-01 12:59:51 +00:00
|
|
|
</config>
|
2012-10-10 17:23:26 +00:00
|
|
|
<route>
|
|
|
|
<service name="Timer"> <child name="timer"/></service>
|
2013-04-29 08:51:27 +00:00
|
|
|
<service name="Framebuffer"><child name="fb_drv"/></service>
|
2015-09-30 09:30:02 +00:00
|
|
|
<service name="Report"> <child name="report_rom"/></service>
|
2013-06-03 10:05:29 +00:00
|
|
|
<any-service><parent/><any-child/></any-service>
|
2012-10-10 17:23:26 +00:00
|
|
|
</route>
|
|
|
|
<provides><service name="Nitpicker"/></provides>
|
|
|
|
</start>
|
2019-03-04 09:05:11 +00:00
|
|
|
|
2014-12-01 12:59:51 +00:00
|
|
|
<start name="pointer">
|
2018-11-12 19:31:41 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
2014-12-01 12:59:51 +00:00
|
|
|
</start>
|
2019-03-04 09:05:11 +00:00
|
|
|
|
2014-12-01 12:59:51 +00:00
|
|
|
<start name="report_rom">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
|
|
|
<config>
|
2016-11-02 10:38:20 +00:00
|
|
|
<policy label="status_bar -> focus" report="nitpicker -> focus"/>
|
2014-12-01 12:59:51 +00:00
|
|
|
</config>
|
2019-03-04 09:05:11 +00:00
|
|
|
</start>}
|
|
|
|
|
2018-11-12 19:31:41 +00:00
|
|
|
append_if $use_top config {
|
|
|
|
<start name="top">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<config period_ms="10000"/>
|
|
|
|
</start>}
|
|
|
|
|
2019-03-04 09:05:11 +00:00
|
|
|
append_if $use_fancy_stuff config {
|
|
|
|
<start name="status_bar">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" label="focus"> <child name="report_rom"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
2014-12-01 12:59:51 +00:00
|
|
|
</start>
|
2017-05-07 20:36:11 +00:00
|
|
|
<start name="launchpad" priority="-2" caps="1500">
|
2013-08-10 12:05:59 +00:00
|
|
|
<resource name="RAM" quantum="64000M"/>
|
2012-10-10 17:23:26 +00:00
|
|
|
<configfile name="launchpad-config"/>
|
|
|
|
<route>
|
|
|
|
<service name="Nic"><child name="nic_bridge"/></service>
|
2014-12-01 12:59:51 +00:00
|
|
|
<any-service><parent/><any-child/></any-service>
|
2012-10-10 17:23:26 +00:00
|
|
|
</route>
|
2013-06-03 10:05:29 +00:00
|
|
|
</start>}
|
|
|
|
|
|
|
|
append config {
|
|
|
|
</config>}
|
|
|
|
|
2013-08-10 12:05:59 +00:00
|
|
|
#
|
2013-06-03 10:05:29 +00:00
|
|
|
# Generate Launchpad config file
|
2013-08-10 12:05:59 +00:00
|
|
|
#
|
|
|
|
if {$use_fancy_stuff} {
|
|
|
|
set launchpad_cfg_fd [open "bin/launchpad-config" w]
|
|
|
|
|
|
|
|
puts $launchpad_cfg_fd "<config>
|
2017-05-07 20:36:11 +00:00
|
|
|
<launcher ram_quota=\"$memory_init\" name=\"init\" caps=\"400\" >"
|
2013-08-10 12:05:59 +00:00
|
|
|
|
|
|
|
puts $launchpad_cfg_fd {
|
2013-06-03 10:05:29 +00:00
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="Nitpicker"/>
|
|
|
|
<service name="Timer"/>
|
|
|
|
<service name="Nic"/>
|
|
|
|
<service name="Block"/>
|
|
|
|
<service name="Rtc"/>
|
2018-11-12 19:31:41 +00:00
|
|
|
<service name="VM"/>
|
2013-06-03 10:05:29 +00:00
|
|
|
</parent-provides>
|
|
|
|
|
2018-11-12 19:31:41 +00:00
|
|
|
<start name="seoul" priority="-1" caps="200">
|
2014-05-16 22:57:41 +00:00
|
|
|
<binary name="seoul"/>
|
2013-06-03 10:05:29 +00:00
|
|
|
<resource name="RAM" quantum="256M"/>
|
|
|
|
<route>
|
|
|
|
<service name="Timer"><parent/></service>
|
|
|
|
<service name="Nic"><parent/></service>
|
|
|
|
<any-service><parent/></any-service>
|
|
|
|
</route>
|
2014-09-21 08:20:20 +00:00
|
|
|
<configfile name="vm_seoul.cfg"/>
|
2013-06-03 10:05:29 +00:00
|
|
|
</start>
|
|
|
|
</config>
|
2013-08-10 12:05:59 +00:00
|
|
|
</launcher>}
|
|
|
|
puts $launchpad_cfg_fd {</config>}
|
|
|
|
close $launchpad_cfg_fd
|
|
|
|
}
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
|
|
|
# generic modules
|
|
|
|
set boot_modules {
|
2012-10-10 17:23:26 +00:00
|
|
|
rtc_drv
|
2014-05-16 22:57:41 +00:00
|
|
|
seoul
|
2014-09-21 08:20:20 +00:00
|
|
|
vm_seoul.cfg
|
2011-12-22 15:19:25 +00:00
|
|
|
}
|
|
|
|
|
2020-03-12 10:38:40 +00:00
|
|
|
lappend_if $use_block_vdi boot_modules vdi_block
|
2013-06-03 10:05:29 +00:00
|
|
|
lappend_if [expr !$use_usb] boot_modules ps2_drv
|
|
|
|
lappend_if $use_usb boot_modules usb_drv
|
2019-01-06 20:17:07 +00:00
|
|
|
lappend_if $use_block_ram boot_modules ram_block
|
2020-03-12 10:38:40 +00:00
|
|
|
lappend_if $use_drv_ahci boot_modules ahci_drv
|
2019-04-24 13:09:49 +00:00
|
|
|
lappend_if $use_nic_session boot_modules ipxe_nic_drv
|
2013-06-03 10:05:29 +00:00
|
|
|
lappend_if $use_nic_bridge boot_modules nic_bridge
|
2019-05-03 11:51:49 +00:00
|
|
|
lappend_if $use_framebuffer boot_modules vesa_fb_drv
|
2014-12-01 12:59:51 +00:00
|
|
|
|
|
|
|
lappend_if $use_fancy_stuff boot_modules status_bar
|
2013-06-03 10:05:29 +00:00
|
|
|
lappend_if $use_fancy_stuff boot_modules launchpad
|
|
|
|
lappend_if $use_fancy_stuff boot_modules launchpad-config
|
2014-12-01 12:59:51 +00:00
|
|
|
lappend_if $use_fancy_stuff boot_modules report_rom
|
|
|
|
|
2019-01-06 20:17:07 +00:00
|
|
|
lappend_if $use_genode_iso boot_modules rom_block
|
2014-09-21 08:20:20 +00:00
|
|
|
lappend_if $use_genode_iso boot_modules iso9660
|
|
|
|
lappend_if $use_genode_iso boot_modules genode.iso
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2015-09-06 09:24:42 +00:00
|
|
|
lappend_if $use_block_ram boot_modules seoul-disc.raw
|
|
|
|
|
2018-03-02 13:52:40 +00:00
|
|
|
lappend_if $use_top boot_modules top
|
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
#
|
|
|
|
# Add OS binaries of guest
|
|
|
|
#
|
|
|
|
|
|
|
|
if {$use_multiboot} {
|
|
|
|
set guest_os_binary_missing 0
|
2013-08-10 12:05:59 +00:00
|
|
|
set binary_counter 0
|
2013-06-03 10:05:29 +00:00
|
|
|
foreach binary $guest_os_binaries {
|
|
|
|
if {![file exists bin/$binary]} {
|
|
|
|
puts stderr "Error: guest OS binary \"bin/$binary\" does not exist"
|
|
|
|
set guest_os_binary_missing 1
|
|
|
|
}
|
2013-08-10 12:05:59 +00:00
|
|
|
|
2014-09-21 08:20:20 +00:00
|
|
|
if {[info exists sha1_os_binaries]} {
|
|
|
|
set sha1 [exec sha1sum bin/$binary]
|
|
|
|
set sha1 [regexp -inline {[0-9a-h]+} $sha1]
|
|
|
|
if {[string compare $sha1 [lindex $sha1_os_binaries $binary_counter]]} {
|
|
|
|
puts "SHA1 sum of binary does not match with expected one - abort"
|
|
|
|
puts "$binary $sha1 != [lindex $sha1_os_binaries $binary_counter]"
|
|
|
|
set guest_os_binary_missing 1
|
|
|
|
}
|
2013-08-10 12:05:59 +00:00
|
|
|
}
|
|
|
|
incr binary_counter 1
|
2012-10-10 17:23:26 +00:00
|
|
|
}
|
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
if {$guest_os_binary_missing} { exit 1 }
|
2012-10-10 17:23:26 +00:00
|
|
|
|
2013-06-03 10:05:29 +00:00
|
|
|
append boot_modules $guest_os_binaries
|
|
|
|
}
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2013-08-10 12:05:59 +00:00
|
|
|
if {$use_usb} {
|
|
|
|
append qemu_args " -usb -usbdevice mouse -usbdevice keyboard "
|
|
|
|
}
|
|
|
|
|
2015-05-28 11:43:13 +00:00
|
|
|
append_platform_drv_boot_modules
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
build_boot_image $boot_modules
|
2013-08-20 07:58:38 +00:00
|
|
|
|
|
|
|
# A copy of the config is placed in the run folder.
|
2014-09-21 08:20:20 +00:00
|
|
|
exec rm -f bin/vm_seoul.cfg
|