From 47cc2f859059b97330ff31144571ef2d3d9bfdab Mon Sep 17 00:00:00 2001 From: Markus Partheymueller Date: Wed, 10 Oct 2012 19:23:26 +0200 Subject: [PATCH] vancouver: run script for booting Linux VMs The setup now uses nitpicker and nit_fb to display several instances of vancouver. The guest OS binaries must be supplied in the '/bin' directory manually. Furthermore, the patch lets launchpad pass Block, Nic, and Rtc to the parent. --- demo/src/lib/launchpad/launchpad.cc | 6 +- ports/run/vancouver.run | 255 ++++++++++++++++++++++------ 2 files changed, 208 insertions(+), 53 deletions(-) diff --git a/demo/src/lib/launchpad/launchpad.cc b/demo/src/lib/launchpad/launchpad.cc index 1fc642c66..b5418bf8b 100644 --- a/demo/src/lib/launchpad/launchpad.cc +++ b/demo/src/lib/launchpad/launchpad.cc @@ -1,11 +1,13 @@ /* * \brief Launchpad child management * \author Norman Feske + * \author Markus Partheymueller * \date 2006-09-01 */ /* * Copyright (C) 2006-2013 Genode Labs GmbH + * Copyright (C) 2012 Intel Corporation * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU General Public License version 2. @@ -43,8 +45,8 @@ Launchpad::Launchpad(unsigned long initial_quota) "IRQ", "ROM", "LOG", "SIGNAL", /* services expected to got started by init */ - "Nitpicker", "Init", "Timer", "PCI", - + "Nitpicker", "Init", "Timer", "PCI", "Block", "Nic", "Rtc", + 0 /* null-termination */ }; for (unsigned i = 0; names[i]; i++) diff --git a/ports/run/vancouver.run b/ports/run/vancouver.run index dc7c0634d..1c54e4aba 100644 --- a/ports/run/vancouver.run +++ b/ports/run/vancouver.run @@ -1,6 +1,7 @@ # # \brief Example for using Vancouver on Genode # \author Norman Feske +# \author Markus Partheymueller # \date 2011-11-21 # # This run script starts the Vancouver VMM booting the multiboot modules @@ -20,11 +21,122 @@ if {![have_spec nova]} { set build_components { core init drivers/timer + drivers/rtc vancouver + drivers/framebuffer + server/nitpicker + server/liquid_framebuffer + drivers/nic + server/nic_bridge + drivers/pci + drivers/input + drivers/usb + app/launchpad + server/nitlog } build $build_components +# write vancouver vm config file +set vm_cfg_fd [open "bin/vm_linux.cfg" w] +puts $vm_cfg_fd { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} +close $vm_cfg_fd + +# write launchpad config file +set launchpad_cfg_fd [open "bin/launchpad-config" w] +puts $launchpad_cfg_fd { + 128Minit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + off + 1010 + 640 + 480 + + + + + + + + + + + + + + + + + +} +close $launchpad_cfg_fd + create_boot_directory # @@ -32,7 +144,7 @@ create_boot_directory # append config { - + @@ -44,56 +156,78 @@ append config { + - } + -append config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } @@ -106,21 +240,40 @@ install_config $config # generic modules set boot_modules { core init + vesa_drv + nitpicker + liquid_fb + ps2_drv + pci_drv + nic_drv + nic_bridge + usb_drv timer + rtc_drv vancouver + launchpad + launchpad-config + nitlog + vm_linux.cfg } -# -# Add files for a simple Fiasco.OC setup to core's ROM service -# -# The files are copied from a Genode build directory for the Fiasco.OC base -# platform. -# -append boot_modules { bootstrap fiasco sigma0.foc core.foc } +set guest_os_binaries { munich bzImage ramdisk } + +set guest_os_binary_missing 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 {$guest_os_binary_missing} { exit 1 } + +append boot_modules $guest_os_binaries build_boot_image $boot_modules append qemu_args " -m 256 " -append qemu_args " -nographic " +append qemu_args " -cpu phenom " run_genode_until forever