genode/repos/ports/run/seoul-genode.run
Josef Söntgen 2002e1ccba os: remove ATAPI driver
The driver will be superseeded soon by a new AHCI driver that supports
ATAPI devices. There is no IDE support in Gende anymore, however.

Issue #1456.
2015-04-23 16:47:57 +02:00

83 lines
2.3 KiB
Plaintext

#
# \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_block_sata 0
set use_nic_session 1
set use_nic_bridge 0
set use_usb 0
set use_framebuffer 1
set use_fancy_stuff 0
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 "printf"
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 cat $run_script_path/boot/grub/menu.lst]
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 "ELF 64-bit" $file_type]} {
puts "Seoul supports only 32bit guests - choose a 32bit Genode platform"
puts "Exit reason: $file_type"
exit 2
}
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