seoul: move to genode-world

Fixes #4412
This commit is contained in:
Alexander Boettcher
2022-02-09 09:35:46 +01:00
committed by Norman Feske
parent baea48fbec
commit 35489aa708
40 changed files with 0 additions and 5844 deletions

View File

@@ -1,86 +0,0 @@
#
# \brief Seoul on Genode - for automated testing
# \author Alexander Boettcher
# \date 2013-06-11
#
# This run script starts the Seoul VMM booting from a multiboot image.
# It assumes that the module files are present at '<build-dir>/bin/'
#
assert_spec x86
if { [get_cmd_switch --autopilot] && [have_spec x86_32] } {
puts "Run script does not support autopilot mode on 32 bit"
exit 0
}
if {[have_spec foc] || [have_spec sel4] || [have_spec nova]} {
} else {
puts "\n Run script is not supported on this platform. \n";
exit 0
}
set use_multiboot 1
set use_genode_iso 0
set use_model_ahci 0
set use_model_ide 0
set use_block_vdi 0
set use_block_ram 0
set use_block_sata 0
set use_part_block 0
set use_nic_session 1
set use_framebuffer 1
set use_fancy_stuff 0
set use_top 0
set memory_vmm_vm "128M"
set vcpus_to_be_used 2
if {[have_spec sel4]} {
# The seL4 kernel dies with an exception XXX
set vcpus_to_be_used 1
}
set multiboot_files {
<rom name="munich"/>
<rom name="bzImage-3.1" cmdline="root=/dev/ram0 earlyprintk=ttyS0 console=ttyS0 text"/>
<rom name="seoul-auto.gz"/>
}
set guest_os_binaries { munich bzImage-3.1 seoul-auto.gz}
set sha1_os_binaries { 7ecb4ba634a0ecfa6429418ea73490d6f65afead 6b2ef2c5bf16db3ebcbe33ce134e4e0a96944f82 bb6384fe58ab0c945b231f6cc107bcdff1bdacbe}
#
# Download demo kernel, image and
# munich (part of Oslo framework http://os.inf.tu-dresden.de/~kauer/oslo)
#
set uri "http://genode.org/files/seoul"
foreach binary $guest_os_binaries {
if {![file exists bin/$binary]} {
exec mkdir -p bin
puts "Download file bin/$binary"
exec >& /dev/null wget -c -O bin/$binary $uri/$binary
}
}
source ${genode_dir}/repos/ports/run/seoul.inc
append qemu_args " -cpu phenom "
append qemu_args " -nographic "
append_qemu_nic_args
if { [get_cmd_switch --autopilot] } {
run_genode_until {\[init -\> seoul\] VMM: # Hello Genode world!} 300
} else {
run_genode_until forever
}
foreach binary $guest_os_binaries {
exec rm -f bin/$binary
}

View File

@@ -1,45 +0,0 @@
#
# \brief Seoul on Genode - test to boot from a raw disk
# \author Alexander Boettcher
# \date 2013-06-11
#
# This run script starts the Seoul VMM booting from a disc image.
# It assumes that the module files are present at '<build-dir>/bin/'
#
set use_multiboot 0
set use_genode_iso 0
set use_model_ahci 1
set use_model_ide 0
set use_block_vdi 0
set use_block_ram 1
set use_block_sata 0
set use_part_block 0
set use_nic_session 1
set use_framebuffer 1
set use_fancy_stuff 0
set use_top 0
set memory_vmm_vm "512M"
set vcpus_to_be_used 1
if {[have_include power_on/qemu]} {
if {![file exists bin/seoul-disc.raw]} {
puts "Please provide a disk image file to bin/seoul-disc.raw"
exit 1
}
append qemu_args " -m 1536 "
append qemu_args " -cpu phenom"
append_if $use_block_sata qemu_args " -drive id=disk,file=bin/seoul-disc.raw,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d"
}
source ${genode_dir}/repos/ports/run/seoul.inc
run_genode_until forever

View File

@@ -1,64 +0,0 @@
#
# \brief Example for using Seoul on Genode
# \author Norman Feske
# \author Markus Partheymueller
# \author Alexander Boettcher
# \date 2011-11-21
#
# This run script starts the Seoul VMM booting the multiboot modules
# listed in the 'multiboot' config node. It assumes that the module files
# are present at '<build-dir>/bin/' (see the 'boot_modules' variable).
#
set use_multiboot 1
set use_genode_iso 0
set use_model_ahci 0
set use_model_ide 0
set use_block_vdi 0
set use_block_ram 0
set use_block_sata 0
set use_part_block 0
set use_nic_session 1
set use_framebuffer 1
set use_fancy_stuff 1
set use_top 0
set memory_init "288M"
set memory_vmm_vm "128M"
set vcpus_to_be_used 1
set multiboot_files {
<rom name="munich"/>
<rom name="bzImage-3.1" cmdline="root=/dev/ram0 earlyprintk=ttyS0 vga=0x338"/>
<rom name="tc-browser.gz"/>
}
set guest_os_binaries { munich bzImage-3.1 tc-browser.gz }
set sha1_os_binaries { 7ecb4ba634a0ecfa6429418ea73490d6f65afead 6b2ef2c5bf16db3ebcbe33ce134e4e0a96944f82 51aa53eb494b71d65f7fe3eb05e52af4616878bd}
#
# Download demo kernel, image and
# munich (part of Oslo framework http://os.inf.tu-dresden.de/~kauer/oslo)
#
set uri "http://genode.org/files/seoul"
foreach binary $guest_os_binaries {
if {![file exists bin/$binary]} {
puts "Download file bin/$binary"
exec mkdir -p bin
exec >& /dev/null wget -c -O bin/$binary $uri/$binary
}
}
source ${genode_dir}/repos/ports/run/seoul.inc
append qemu_args " -m 1024 "
append qemu_args " -cpu phenom "
append_qemu_nic_args
run_genode_until forever

View File

@@ -1,96 +0,0 @@
#
# \brief Turn a Genode setup(run script) into a VM to be bootable in Seoul
# \author Alexander Boettcher
# \date 2014-09-21
#
# This run script starts the Seoul VMM booting from a multiboot Genode setup
# created by another Genode run script. The referenced run script can be
# adapted by tuning the variables run_script and build_dir below accordingly.
#
set use_multiboot 1
set use_genode_iso 1
set use_model_ahci 1
set use_model_ide 0
set use_block_vdi 0
set use_block_ram 0
set use_block_sata 0
set use_part_block 0
set use_nic_session 1
set use_framebuffer 1
set use_fancy_stuff 0
set use_top 1
set memory_vmm_vm "128M"
set vcpus_to_be_used 1
# Put the multiboot data structure out of the way of Nova's bss.
set use_multiboot_modaddr 0x2800000
# Use a Genode run script of a 32bit platform and turn it into a bootable
# setup for Seoul - adjust build_dir and run_script variable accordingly
set run_script "log"
set build_dir "."
set run_script_path "$build_dir/var/run/$run_script"
set genode_iso "$build_dir/var/run/$run_script.iso"
if {[catch {exec cp $genode_iso bin/genode.iso}]} {
puts "Run scenario '$run_script' is not present. Please run it before\
invoking this run script."
exit 1
}
set files_vm [exec isoinfo -i $genode_iso -x "/boot/grub/grub.cfg;1"]
set vm [split $files_vm "\n"]
set guest_os_binaries {}
foreach line $vm {
if {[regexp "module\.*" $line] || [regexp "kernel\.*" $line]} {
set label_file [lindex $line 1]
set binary_cmdline [lrange $line 2 end]
regsub -all "/fiasco/" $label_file "" binary_file
regsub -all "/boot/" $binary_file "" binary_file
regsub -all "/genode/" $binary_file "" binary_file
# skip bender to speed up booting
if {$binary_file == "bender"} {
continue
}
set file_type [exec file $run_script_path$label_file]
if {[regexp "gzip" $file_type]} {
exec gunzip --keep $run_script_path$label_file -c >file.tmp
set file_type [exec file file.tmp]
exec rm file.tmp
}
if {[regexp "ELF 64-bit" $file_type]} {
puts "Seoul supports only 32bit guests - choose a 32bit Genode platform"
puts "Exit reason: $file_type"
exit 2
}
if {[regexp "No such" $file_type]} {
puts "$file_type"
exit 3
}
if {$binary_cmdline eq ""} {
append multiboot_files "<rom name=\"$binary_file\" label=\"$label_file\"/>\n"
} else {
append multiboot_files "<rom name=\"$binary_file\" label=\"$label_file\" cmdline=\"$binary_cmdline\"/>\n"
}
}
}
# Seoul VM setup done
source ${genode_dir}/repos/ports/run/seoul.inc
append qemu_args " -m 1024 "
append qemu_args " -cpu phenom "
run_genode_until forever

View File

@@ -1,80 +0,0 @@
#
# \brief Seoul on Genode - build Linux kernel inside VM
# \author Alexander Boettcher
# \date 2013-06-11
#
# This run script starts the Seoul VMM booting from a multiboot image.
# It assumes that the module files are present at '<build-dir>/bin/'
#
assert_spec x86
if {[have_include power_on/qemu]} {
puts "\nAuto test running on Qemu is not recommended.\n"
exit
}
set use_multiboot 1
set use_genode_iso 0
set use_model_ahci 0
set use_model_ide 0
set use_block_vdi 0
set use_block_ram 0
set use_block_sata 0
set use_part_block 0
set use_nic_session 0
set use_framebuffer 1
set use_fancy_stuff 0
set use_top 0
set memory_vmm_vm "950M"
# adjust also '-j option' accordingly - see benchmark_cmd
set vcpus_to_be_used 1
set multiboot_files {
<rom name="munich"/>
<rom name="bzImage-3.1" cmdline="root=/dev/ram0 earlyprintk=ttyS0 console=ttyS0 text benchmark_cmd='make -C /usr/src/linux-* defconfig && make -j 1 -C /usr/src/linux-* bzImage'"/>
<rom name="kernelbuild-e2fs.bz2"/>
}
set guest_os_binaries { munich bzImage-3.1 kernelbuild-e2fs.bz2 }
set sha1_os_binaries { 7ecb4ba634a0ecfa6429418ea73490d6f65afead 6b2ef2c5bf16db3ebcbe33ce134e4e0a96944f82 978b2a297c7ff8e53191321d300e70baa1036519 }
#
# Download demo kernel, image and
# munich (part of Oslo framework http://os.inf.tu-dresden.de/~kauer/oslo)
#
set guest_uri { "http://genode.org/files/seoul" "http://genode.org/files/seoul" "http://os.inf.tu-dresden.de/~nils/imgs" }
set binary_counter 0
foreach binary $guest_os_binaries {
if {![file exists bin/$binary]} {
set uri [lindex $guest_uri $binary_counter]
exec mkdir -p bin
puts "Download file bin/$binary from $uri"
exec >& /dev/null wget -c -O bin/$binary $uri/$binary
}
incr binary_counter 1
}
source ${genode_dir}/repos/ports/run/seoul.inc
append qemu_args " -m 1536 "
append qemu_args " -cpu phenom "
append qemu_args " -nographic "
run_genode_until {\[init -\> seoul\] VM is starting with } 400
set serial_id [output_spawn_id]
set time_start [ clock seconds ]
run_genode_until {\[init -\> seoul\] VMM: # ! PERF: kbuild [ 0-9]+ s ok} 2000 $serial_id
set time_end [ clock seconds ]
puts "\n! PERF: runtime [expr $time_end - $time_start ] seconds ok"
puts "Test succeeded"

View File

@@ -1,59 +0,0 @@
#
# \brief Seoul on Genode - for testing network
# \author Alexander Boettcher
# \date 2013-06-11
#
# This run script starts the Seoul VMM booting from a multiboot image.
# It assumes that the module files are present at '<build-dir>/bin/'
#
set use_multiboot 1
set use_genode_iso 0
set use_model_ahci 0
set use_model_ide 0
set use_block_vdi 0
set use_block_ram 0
set use_block_sata 0
set use_part_block 0
set use_nic_session 1
set use_framebuffer 1
set use_fancy_stuff 0
set use_top 0
set memory_vmm_vm "128M"
set vcpus_to_be_used 1
set multiboot_files {
<rom name="munich"/>
<rom name="bzImage-3.1" cmdline="root=/dev/ram0 earlyprintk=ttyS0 text"/>
<rom name="tc-net.gz"/>
}
set guest_os_binaries { munich bzImage-3.1 tc-net.gz}
set sha1_os_binaries { 7ecb4ba634a0ecfa6429418ea73490d6f65afead 6b2ef2c5bf16db3ebcbe33ce134e4e0a96944f82 201deb4bd18fb07f3d0b5495b948ba622ff98e4b}
#
# Download demo kernel, image and
# munich (part of Oslo framework http://os.inf.tu-dresden.de/~kauer/oslo)
#
set uri "http://genode.org/files/seoul"
foreach binary $guest_os_binaries {
if {![file exists bin/$binary]} {
exec mkdir -p bin
puts "Download file bin/$binary"
exec >& /dev/null wget -c -O bin/$binary $uri/$binary
}
}
source ${genode_dir}/repos/ports/run/seoul.inc
append qemu_args " -cpu phenom "
append_qemu_nic_args
run_genode_until forever

View File

@@ -1,654 +0,0 @@
#
# \brief Using Seoul on Genode
# \author Norman Feske
# \author Markus Partheymueller
# \author Alexander Boettcher
# \date 2011-11-21
set use_fs_rump $use_block_vdi
set use_drv_ahci [expr $use_block_vdi || $use_block_sata]
set use_vfs_block [expr $use_block_ram || $use_genode_iso]
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/event_filter \
[depot_user]/src/init \
[depot_user]/src/nitpicker \
[depot_user]/src/usb_host_drv \
[depot_user]/src/usb_hid_drv \
[depot_user]/src/vfs_import \
[depot_user]/src/ps2_drv \
[depot_user]/raw/drivers_interactive-pc
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
}
#
# Build
#
assert_spec x86
set map_small "no"
set vmm_vcpu_same_cpu "no"
if {[have_spec sel4]} {
set map_small "yes"
set vmm_vcpu_same_cpu "yes"
# 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
}
}
if {[have_spec foc]} {
# The performance is considerable bad when
# vmm and vcpu is not on same physical CPU
set vmm_vcpu_same_cpu "yes"
# 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
}
}
source ${genode_dir}/repos/base/run/platform_drv.inc
# override defaults of platform_drv.inc
proc platform_drv_priority {} { return { priority="-1"} }
set build_components {
drivers/rtc
app/seoul
}
if {$use_fancy_stuff} { set use_framebuffer 1 }
lappend_if $use_block_vdi build_components server/vdi_block
lappend_if $use_vfs_block build_components server/vfs_block
lappend_if $use_drv_ahci build_components drivers/ahci
lappend_if $use_nic_session build_components drivers/nic
lappend_if $use_nic_session build_components server/nic_router
lappend_if $use_framebuffer build_components drivers/framebuffer
lappend_if $use_fancy_stuff build_components app/status_bar
lappend_if $use_fancy_stuff build_components app/launchpad
lappend_if $use_fancy_stuff build_components server/report_rom
lappend_if $use_genode_iso build_components server/iso9660
lappend_if $use_top build_components app/top
append_platform_drv_build_components
build $build_components
# write Seoul config file
set vm_cfg_fd [open "bin/vm_seoul.cfg" w]
puts $vm_cfg_fd "<config map_small=\"$map_small\" vmm_vcpu_same_cpu=\"$vmm_vcpu_same_cpu\" vmm_memory=\"16M\">"
puts $vm_cfg_fd { <machine verbose="no">
<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"/>
<vga io_base="0x03c0"/>}
if {!$use_multiboot} {
puts $vm_cfg_fd {
<vbios_disk/>
}
}
puts $vm_cfg_fd {
<vbios_keyboard host_keyboard="0x10000"/>
<vbios_mem/>
<vbios_time/>
<vbios_reset/>}
if {$use_multiboot} {
if {[info exists use_multiboot_modaddr]} {
puts $vm_cfg_fd " <vbios_multiboot modaddr=\"$use_multiboot_modaddr\"/>"
} else {
puts $vm_cfg_fd { <vbios_multiboot/>}
}
}
puts $vm_cfg_fd {
<msi/>
<ioapic/>
<pcihostbridge bus_num="0" bus_count="0x10" io_base="0xcf8"
mem_base="0xe0000000"/>
<pmtimer io_port="0x8000"/>}
for {set i 0} {$i < $vcpus_to_be_used} {incr i 1} {
puts $vm_cfg_fd {
<vcpu/> <halifax/> <vbios/> <lapic/>}
}
if {!$use_multiboot} {
if {$use_model_ahci} {
puts $vm_cfg_fd {
<ahci mem="0xe0800000" irq="14" bdf="0x30"/>
<drive sigma0drive="0" controller="0" port="0"/>
}
}
if {$use_model_ide} {
puts $vm_cfg_fd {
<ide port0="0x1f0" port1="0x3f6" irq="14" bdf="0x38" disk="0"/>
}
}
}
if {$use_nic_session} {
puts $vm_cfg_fd {
<!-- <rtl8029 irq="9" port="0x300"/> -->
<intel82576vf/>
}
}
puts $vm_cfg_fd {
</machine>
<multiboot>}
if {$use_multiboot} {
puts $vm_cfg_fd $multiboot_files
}
puts $vm_cfg_fd {
</multiboot>
</config>}
close $vm_cfg_fd
#
# Generate Genode config
#
set config {
<config verbose="yes" prio_levels="4">
<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="VM"/>
<service name="LOG"/>}
append_if $use_top config {
<service name="TRACE"/>}
append config {
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="rtc_drv" priority="-1">
<resource name="RAM" quantum="1M"/>
<provides><service name="Rtc"/></provides>
</start>
<start name="ps2_drv" priority="-1">
<resource name="RAM" quantum="3M"/>
<config/>
<route>
<service name="Event"> <child name="event_filter" label="ps2"/> </service>
<any-service><parent/> <any-child/> </any-service> </route>
</start>
<start name="event_filter" caps="90" priority="-1">
<resource name="RAM" quantum="1280K"/>
<provides> <service name="Event"/> </provides>
<route>
<service name="ROM" label="config"> <parent label="event_filter.config"/> </service>
<service name="Event"> <child name="nitpicker"/> </service>
<any-service><parent/><any-child/></any-service>
</route>
</start>
<start name="usb_drv" priority="-1" caps="120">
<binary name="x86_pc_usb_host_drv"/>
<resource name="RAM" quantum="12M"/>
<provides> <service name="Usb"/> </provides>
<config uhci="yes" ohci="yes" ehci="yes" xhci="yes">
<report devices="yes"/>
<policy label_prefix="usb_hid_drv" class="0x3"/>
</config>
<route>
<service name="Report"> <child name="report_rom"/> </service>
<any-service><parent/><any-child/></any-service>
</route>
</start>
<start name="usb_hid_drv" priority="-1" caps="140">
<resource name="RAM" quantum="11M"/>
<config use_report="yes"/>
<route>
<service name="Report"> <child name="report_rom"/> </service>
<service name="Event"> <child name="event_filter" label="usb"/> </service>
<service name="ROM" label="report"> <child name="report_rom"/> </service>
<service name="Usb"> <child name="usb_drv"/> </service>
<any-service><parent/><any-child/></any-service>
</route>
</start>}
append_if $use_drv_ahci config {
<start name="ahci_drv" priority="-1">
<resource name="RAM" quantum="1M" />
<provides><service name="Block"/></provides>
<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>
<config>
<policy label="seoul -> VirtualDisk 0" partition="5" writeable="yes"/>
<policy label="rump_fs -> " partition="4" writeable="yes"/>
</config>
</start>}
append_if $use_block_ram config {
<start name="vfs_block" priority="-1">
<resource name="RAM" quantum="266M" />
<provides><service name="Block"/></provides>
<config>
<vfs>
<ram/>
<import>
<rom name="seoul-disc.raw"/>
</import>
</vfs>
<default-policy file="/seoul-disc.raw" block_size="512"
writeable="yes"/>
</config>
</start>}
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>}
append_if $use_genode_iso config {
<start name="vfs_block" priority="-1">
<resource name="RAM" quantum="16M" />
<provides><service name="Block"/></provides>
<config>
<vfs>
<rom name="genode.iso"/>
</vfs>
<default-policy file="/genode.iso" block_size="2048"/>
</config>
</start>
<start name="iso9660" priority="-1">
<resource name="RAM" quantum="16M"/>
<provides><service name="ROM"/></provides>
<route>
<service name="Block"><child name="vfs_block"/></service>
<any-service><parent/></any-service>
</route>
</start>}
append_platform_drv_config
append_if $use_nic_session config {
<start name="nic_drv" priority="-2">
<binary name="ipxe_nic_drv"/>
<resource name="RAM" quantum="8M"/>
<route>
<service name="Uplink"><child name="nic_router"/></service>
<any-service><parent/><any-child/></any-service>
</route>
</start>
<start name="nic_router" caps="200" priority="-1">
<resource name="RAM" quantum="10M"/>
<provides>
<service name="Nic"/>
<service name="Uplink"/>
</provides>
<config verbose_domain_state="yes">
<policy label_prefix="seoul" domain="downlink"/>
<policy label_prefix="launchpad" 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">
<dhcp-server ip_first="10.0.3.55" ip_last="10.0.3.155" dns_config_from="uplink"/>
<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>
</start>
}
append_if $use_framebuffer config {
<start name="fb_drv" priority="-1" caps="130">
<binary name="vesa_fb_drv"/>
<resource name="RAM" quantum="16M"/>
<route>
<service name="Timer"> <child name="timer"/></service>
<service name="Capture"> <child name="nitpicker"/></service>
<service name="Platform"> <any-child/></service>
<any-service> <parent/> </any-service>
</route>}
append_if [expr $use_framebuffer && [have_include "power_on/qemu"]] config {
<config width="1280" height="960"/>}
append_if [expr $use_framebuffer && ![have_include "power_on/qemu"]] config {
<config/>}
append_if $use_framebuffer config {
</start> }
if {!$use_fancy_stuff} {
append config {
<start name="seoul" priority="-2" caps="1200">
<binary name="seoul"/>}
append config "
<resource name=\"RAM\" quantum=\"$memory_vmm_vm\"/>"
append config {
<route>
<service name="Timer"><child name="timer"/></service>
<service name="ROM" label="config">
<parent label="vm_seoul.cfg"/> </service>}
append_if [expr $use_nic_session] config {
<service name="Nic"> <child name="nic_router"/> </service>}
append_if $use_genode_iso config {
<service name="ROM" unscoped_label="seoul"> <parent/> </service>
<service name="ROM" unscoped_label="ld.lib.so"> <parent/> </service>
<service name="ROM" label="platform_info"> <parent/> </service>
<service name="ROM"><child name="iso9660"/></service>}
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>}
append config {
<service name="Rtc"><child name="rtc_drv"/></service>
<any-service><parent/><any-child/></any-service>
</route>
</start> }
}
append config {
<start name="nitpicker" priority="-1" caps="120">
<resource name="RAM" quantum="8M"/>
<provides>
<service name="Gui"/> <service name="Capture"/> <service name="Event"/>
</provides>
<config>
<capture/> <event/>
<report focus="yes" />
<domain name="pointer" layer="1" content="client" label="no" origin="pointer" />
<domain name="panel" layer="2" content="client" label="no" focus="none" />
<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"/>
<domain name="" layer="3" content="client" focus="click"
hover="always" xpos="10" ypos="20" height="-20"/>
<policy label_prefix="pointer" domain="pointer"/>
<policy label_prefix="status_bar" domain="panel"/>
<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"/>
<default-policy domain=""/>
</config>
<route>
<service name="Timer"> <child name="timer"/></service>
<service name="Report"> <child name="report_rom"/></service>
<any-service><parent/><any-child/></any-service>
</route>
</start>
<start name="pointer">
<resource name="RAM" quantum="2M"/>
<config/>
</start>
<start name="report_rom">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides>
<config>
<policy label="status_bar -> focus" report="nitpicker -> focus"/>
<policy label="usb_hid_drv -> report" report="usb_drv -> devices"/>
</config>
</start>}
append_if $use_top config {
<start name="top">
<resource name="RAM" quantum="2M"/>
<config period_ms="10000"/>
</start>}
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>
</start>
<start name="launchpad" priority="-2" caps="2000">
<resource name="RAM" quantum="64000M"/>
<route>
<service name="Nic"> <child name="nic_router"/> </service>
<service name="ROM" label="config">
<parent label="launchpad-config"/> </service>
<any-service><parent/><any-child/></any-service>
</route>
</start>}
append config {
</config>}
#
# Generate Launchpad config file
#
if {$use_fancy_stuff} {
set launchpad_cfg_fd [open "bin/launchpad-config" w]
puts $launchpad_cfg_fd "<config>
<launcher ram_quota=\"$memory_init\" name=\"init\" caps=\"500\" >"
puts $launchpad_cfg_fd {
<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="Gui"/>
<service name="Timer"/>
<service name="Nic"/>
<service name="Block"/>
<service name="Rtc"/>
<service name="VM"/>
</parent-provides>
<start name="seoul" caps="400">
<binary name="seoul"/>
<resource name="RAM" quantum="256M"/>
<route>
<service name="Timer"><parent/></service>
<service name="Nic"><parent/></service>
<service name="ROM" label="config">
<parent label="vm_seoul.cfg"/> </service>
<any-service><parent/></any-service>
</route>
</start>
</config>
</launcher>}
puts $launchpad_cfg_fd {</config>}
close $launchpad_cfg_fd
}
install_config $config
#
# Boot modules
#
# generic modules
set boot_modules {
rtc_drv
seoul
vm_seoul.cfg
}
lappend_if $use_block_vdi boot_modules vdi_block
lappend_if $use_vfs_block boot_modules vfs_block
lappend_if $use_vfs_block boot_modules vfs.lib.so
lappend_if $use_drv_ahci boot_modules ahci_drv
lappend_if $use_nic_session boot_modules ipxe_nic_drv
lappend_if $use_nic_session boot_modules nic_router
lappend_if $use_framebuffer boot_modules vesa_fb_drv
lappend_if $use_fancy_stuff boot_modules status_bar
lappend_if $use_fancy_stuff boot_modules launchpad
lappend_if $use_fancy_stuff boot_modules launchpad-config
lappend_if $use_fancy_stuff boot_modules report_rom
lappend_if $use_genode_iso boot_modules iso9660
lappend_if $use_genode_iso boot_modules genode.iso
lappend_if $use_block_ram boot_modules seoul-disc.raw
lappend_if $use_top boot_modules top
#
# Add OS binaries of guest
#
if {$use_multiboot} {
set guest_os_binary_missing 0
set binary_counter 0
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
}
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
}
}
incr binary_counter 1
}
if {$guest_os_binary_missing} { exit 1 }
append boot_modules $guest_os_binaries
}
append_platform_drv_boot_modules
build_boot_image $boot_modules
# A copy of the config is placed in the run folder.
exec rm -f bin/vm_seoul.cfg

View File

@@ -1,137 +0,0 @@
#
# \brief Seoul on Genode - boot from a vdi or raw
# \author Alexander Boettcher
# \date 2020-03-12
#
assert_spec x86
if { [get_cmd_switch --autopilot] && [have_spec x86_32] } {
puts "Run script does not support autopilot mode on 32 bit"
exit 0
}
if { [get_cmd_switch --autopilot] && [have_include power_on/qemu] } {
puts "\n Run script is not supported on this platform. \n";
exit 0
}
#if {[have_spec foc] || [have_spec sel4] || [have_spec nova]} {
if {[have_spec nova]} {
} else {
puts "\n Run script is not supported on this platform. \n";
exit 0
}
set use_multiboot 0
set use_genode_iso 0
set use_model_ahci 1
set use_model_ide 0
set use_block_vdi 0
set use_block_ram 0
set use_block_sata 1
set use_part_block [expr ![have_include power_on/qemu]]
set use_nic_session 1
set use_usb 0
set use_framebuffer 1
set use_fancy_stuff 0
set use_top 0
set memory_vmm_vm "1280M"
set vcpus_to_be_used 2
if {[have_include power_on/qemu]} {
if {![file exists bin/seoul-disc.raw]} {
if {![file exists bin/seoul_stress32.vdi]} {
puts "Please provide a disk image file to bin/seoul_stress32.vdi"
exit 1
}
# if {![file exists bin/seoul_stress32.raw]} {
# puts "Please provide a disk image file to bin/seoul_stress32.raw"
# exit 1
# }
set mke2fs [installed_command mke2fs]
set dd [installed_command dd]
# catch { exec $dd if=/dev/zero of=bin/seoul-disc.raw bs=1M count=12000 }
catch { exec $dd if=/dev/zero of=bin/seoul-disc.raw bs=1M count=6000 }
catch { exec $mke2fs -F bin/seoul-disc.raw }
exec [installed_command e2cp] bin/seoul_stress32.vdi bin/seoul-disc.raw:seoul_stress32.vdi
# exec [installed_command e2cp] bin/seoul_stress32.raw bin/seoul-disc.raw:seoul_stress32.raw
}
append qemu_args " -m 2536 "
append qemu_args " -cpu phenom"
append qemu_args " -drive id=disk,file=bin/seoul-disc.raw,format=raw,if=none"
append qemu_args " -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0"
run_genode_until forever
exit
}
set match_guest_log "\[init -\> seoul\].*VMM: #"
set match_guest_down "\[init -\> seoul\].*VMM: STANDBY IMMEDIATE"
set match_boot_string "--- Seoul VMM starting ---"
set vmm_name "seoul"
set vcpus_to_be_used 1
set use_vcpus $vcpus_to_be_used
lappend results_expected 1 2 20 75
lappend boottime_expected 51
source ${genode_dir}/repos/ports/run/seoul.inc
source ${genode_dir}/repos/ports/run/vmm_vm_stress.inc
run_genode_until $match_guest_down 20 [output_spawn_id]
kill_spawned [output_spawn_id]
set vcpus_to_be_used 2
set use_vcpus $vcpus_to_be_used
lappend results_expected 2 2 21 46
lappend boottime_expected 51
source ${genode_dir}/repos/ports/run/seoul.inc
source ${genode_dir}/repos/ports/run/vmm_vm_stress.inc
run_genode_until $match_guest_down 20 [output_spawn_id]
kill_spawned [output_spawn_id]
set vcpus_to_be_used 3
set use_vcpus $vcpus_to_be_used
lappend results_expected 3 2 21 37
lappend boottime_expected 52
source ${genode_dir}/repos/ports/run/seoul.inc
source ${genode_dir}/repos/ports/run/vmm_vm_stress.inc
run_genode_until $match_guest_down 20 [output_spawn_id]
kill_spawned [output_spawn_id]
set vcpus_to_be_used 4
set use_vcpus $vcpus_to_be_used
lappend results_expected 4 2 23 33
lappend boottime_expected 53
source ${genode_dir}/repos/ports/run/seoul.inc
source ${genode_dir}/repos/ports/run/vmm_vm_stress.inc
run_genode_until $match_guest_down 20 [output_spawn_id]
kill_spawned [output_spawn_id]
#
# Dump aggregated output of the several runs above
#
grep_output "$match_guest_log.*cpus="
puts $output
set merge_host_output [split $output_host "\n"]
set merge_host_extra [split $output_host_extra "\n"]
for { set i 0 } { $i < [llength $merge_host_output] } { incr i} {
puts "[lindex $merge_host_output $i] [lindex $merge_host_extra $i]"
}
evaluate_stress