# # \brief Using Vancouver/Seoul on Genode # \author Norman Feske # \author Markus Partheymueller # \author Alexander Boettcher # \date 2011-11-21 # # Build # if {![have_spec nova]} { puts "\nSeoul is solely supported on NOVA.\n" exit 0 } set build_components { core init drivers/timer drivers/rtc app/seoul drivers/pci drivers/input } if {$use_fancy_stuff} { set use_framebuffer 1 } lappend_if [have_spec acpi] build_components drivers/acpi lappend_if [have_spec pci] build_components drivers/pci/device_pd lappend_if $use_usb build_components drivers/usb lappend_if $use_block_ide build_components drivers/atapi lappend_if $use_block_sata build_components drivers/ahci lappend_if $use_nic_session build_components drivers/nic lappend_if $use_nic_bridge build_components server/nic_bridge lappend_if $use_framebuffer build_components drivers/framebuffer lappend_if $use_fancy_stuff build_components server/nitpicker lappend_if $use_fancy_stuff build_components server/liquid_framebuffer lappend_if $use_fancy_stuff build_components app/launchpad lappend_if $use_fancy_stuff build_components server/nitlog build $build_components # write Seoul config file set vm_cfg_fd [open "bin/vm_linux.cfg" w] puts $vm_cfg_fd { } if {!$use_multiboot} { puts $vm_cfg_fd { } } puts $vm_cfg_fd { } if {$use_multiboot} { puts $vm_cfg_fd { } } puts $vm_cfg_fd { } if {!$use_multiboot} { puts $vm_cfg_fd { } } if {$use_nic_session} { puts $vm_cfg_fd { } } puts $vm_cfg_fd { } if {$use_multiboot} { puts $vm_cfg_fd $multiboot_files } puts $vm_cfg_fd { } close $vm_cfg_fd create_boot_directory # # Generate Genode config # append config { } append_if [expr !$use_usb] config { } append_if $use_block_sata config { } append_if $use_block_ide config { } append_if [have_spec acpi] config { } append_if [expr ![have_spec acpi] && [have_spec pci]] config { } append_if $use_nic_session config { } append_if [expr $use_nic_session && $use_nic_bridge] config { } append_if $use_framebuffer config { } if {!$use_fancy_stuff} { append config { } append config " " append config { } append_if [expr $use_nic_session && $use_nic_bridge] config { } append_if [expr $use_nic_session && !$use_nic_bridge] config { } append_if $use_framebuffer config { } append config { } } append_if $use_usb config { } append_if $use_fancy_stuff config { } append config { } # # Generate Launchpad config file # if {$use_fancy_stuff} { set launchpad_cfg_fd [open "bin/launchpad-config" w] puts $launchpad_cfg_fd " " puts $launchpad_cfg_fd { } puts $launchpad_cfg_fd {} close $launchpad_cfg_fd } install_config $config # # Boot modules # # generic modules set boot_modules { core init pci_drv timer rtc_drv seoul vm_linux.cfg } lappend_if [have_spec acpi] boot_modules acpi_drv lappend_if [have_spec nova] boot_modules pci_device_pd lappend_if [expr !$use_usb] boot_modules ps2_drv lappend_if $use_usb boot_modules usb_drv lappend_if $use_block_ide boot_modules atapi_drv lappend_if $use_block_sata boot_modules ahci lappend_if $use_nic_session boot_modules nic_drv lappend_if $use_nic_bridge boot_modules nic_bridge lappend_if $use_framebuffer boot_modules fb_drv lappend_if $use_fancy_stuff boot_modules nitpicker lappend_if $use_fancy_stuff boot_modules liquid_fb lappend_if $use_fancy_stuff boot_modules launchpad lappend_if $use_fancy_stuff boot_modules nitlog lappend_if $use_fancy_stuff boot_modules launchpad-config # # 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 } 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 } if {$use_usb} { append qemu_args " -usb -usbdevice mouse -usbdevice keyboard " } build_boot_image $boot_modules # A copy of the config is placed in the run folder. exec rm -f bin/vm_linux.cfg