From 4e8d0618bb127355a5459c9ca75f309cc2a5f0fa Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 3 Jun 2013 12:05:29 +0200 Subject: [PATCH] seoul: split vancouver run script into smaller ones Issue #806 --- ports/run/seoul-disc.run | 36 +++ ports/run/seoul-fancy.run | 53 ++++ ports/run/seoul-net.run | 49 +++ ports/run/{vancouver.run => seoul.inc} | 412 +++++++++++++++---------- 4 files changed, 386 insertions(+), 164 deletions(-) create mode 100644 ports/run/seoul-disc.run create mode 100644 ports/run/seoul-fancy.run create mode 100644 ports/run/seoul-net.run rename ports/run/{vancouver.run => seoul.inc} (56%) diff --git a/ports/run/seoul-disc.run b/ports/run/seoul-disc.run new file mode 100644 index 0000000000..47be57288e --- /dev/null +++ b/ports/run/seoul-disc.run @@ -0,0 +1,36 @@ +# +# \brief Vancouver on Genode - test to boot from a raw disk +# \author Alexander Boettcher +# \date 2013-06-11 +# +# This run script starts the Vancouver VMM booting from a disc image. +# It assumes that the module files are present at '/bin/' +# + +set use_multiboot 0 + +set use_block_ide 1 +set use_block_sata 0 + +set use_nic_session 0 +set use_nic_bridge 0 + +set use_usb 0 + +set use_fancy_stuff 0 + +source ${genode_dir}/ports/run/seoul.inc + +if {[is_qemu_available]} { + + 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 128 " + append qemu_args " -cpu phenom" + append qemu_args " -boot d -hda bin/seoul-disc.raw " +} + +run_genode_until forever diff --git a/ports/run/seoul-fancy.run b/ports/run/seoul-fancy.run new file mode 100644 index 0000000000..db5961a48d --- /dev/null +++ b/ports/run/seoul-fancy.run @@ -0,0 +1,53 @@ +# +# \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 +# listed in the 'multiboot' config node. It assumes that the module files +# are present at '/bin/' (see the 'boot_modules' variable). +# + +set use_multiboot 1 + +set use_block_ide 0 +set use_block_sata 0 + +set use_nic_session 1 +set use_nic_bridge 1 + +set use_usb 0 + +set use_fancy_stuff 1 + +set multiboot_files { + + + +} + +set guest_os_binaries { munich bzImage-3.1 tc-browser.gz } + +# +# 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 >& /dev/null wget -c -O bin/$binary $uri/$binary + } +} + +source ${genode_dir}/ports/run/seoul.inc + +source ${genode_dir}/ports/run/seoul.inc + +append qemu_args " -m 1024 " +append qemu_args " -cpu phenom " +append qemu_args " -net nic,model=e1000 " + +run_genode_until forever diff --git a/ports/run/seoul-net.run b/ports/run/seoul-net.run new file mode 100644 index 0000000000..eb7d86e8d3 --- /dev/null +++ b/ports/run/seoul-net.run @@ -0,0 +1,49 @@ +# +# \brief Vancouver on Genode - for testing network +# \author Alexander Boettcher +# \date 2013-06-11 +# +# This run script starts the Vancouver VMM booting from a multiboot image. +# It assumes that the module files are present at '/bin/' +# + +set use_multiboot 1 + +set use_block_ide 0 +set use_block_sata 0 + +set use_nic_session 1 +set use_nic_bridge 0 + +set use_usb 0 + +set use_fancy_stuff 0 + +set multiboot_files { + + + +} + +set guest_os_binaries { munich bzImage-3.1 tc-net.gz} + +# +# 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 >& /dev/null wget -c -O bin/$binary $uri/$binary + } +} + +source ${genode_dir}/ports/run/seoul.inc + +append qemu_args " -m 512 " +append qemu_args " -cpu phenom " +append qemu_args " -net nic,model=e1000 " + +run_genode_until forever diff --git a/ports/run/vancouver.run b/ports/run/seoul.inc similarity index 56% rename from ports/run/vancouver.run rename to ports/run/seoul.inc index 7b1397a5e2..e3b5e50fd1 100644 --- a/ports/run/vancouver.run +++ b/ports/run/seoul.inc @@ -1,20 +1,16 @@ # -# \brief Example for using Vancouver on Genode +# \brief Using Vancouver/Seoul on Genode # \author Norman Feske # \author Markus Partheymueller +# \author Alexander Boettcher # \date 2011-11-21 -# -# This run script starts the Vancouver VMM booting the multiboot modules -# listed in the 'multiboot' config node. It assumes that the module files -# are present at '/bin/' (see the 'boot_modules' variable). -# # # Build # if {![have_spec nova]} { - puts "\nVancouver is only supported on NOVA\n" + puts "\nSeoul is solely supported on NOVA.\n" exit 0 } @@ -23,23 +19,26 @@ set build_components { drivers/timer drivers/rtc vancouver - drivers/framebuffer - server/nitpicker - server/liquid_framebuffer - drivers/nic - server/nic_bridge drivers/pci drivers/input - app/launchpad - server/nitlog + drivers/framebuffer } -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec pci] build_components drivers/pci/device_pd +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_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 vancouver vm config file +# write Seoul config file set vm_cfg_fd [open "bin/vm_linux.cfg" w] puts $vm_cfg_fd { @@ -57,33 +56,225 @@ 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 -# write launchpad config file +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 config { + + + + + + + + + + } + +if {!$use_fancy_stuff} { +append config { + + + + + } +append_if [expr $use_nic_session && $use_nic_bridge] config { + } +append_if [expr $use_nic_session && !$use_nic_bridge] config { + } +append config { + + + + + + } +} + +append_if $use_fancy_stuff config { + + + + + + + + + + + + + + + + + + } + +append_if $use_usb config { + + + + + + + } + +append config { +} + +# Generate Launchpad config file set launchpad_cfg_fd [open "bin/launchpad-config" w] puts $launchpad_cfg_fd { - 128Minit + 288Minit @@ -119,7 +310,7 @@ puts $launchpad_cfg_fd { - + @@ -134,116 +325,6 @@ puts $launchpad_cfg_fd { } close $launchpad_cfg_fd -create_boot_directory - -# -# Generate config -# - -append config { - - - - - - - - - - - - - - - - - - - - - - - - - - - } - -append_if [have_spec acpi] config { - - - - - - - - - - - - } - -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - - -} - -append config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} install_config $config @@ -254,42 +335,45 @@ install_config $config # generic modules set boot_modules { core init - fb_drv - nitpicker - liquid_fb - ps2_drv pci_drv - nic_drv - nic_bridge + fb_drv timer rtc_drv vancouver - launchpad - launchpad-config - nitlog vm_linux.cfg } -lappend_if [have_spec acpi] boot_modules acpi_drv -lappend_if [have_spec nova] boot_modules pci_device_pd +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_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 -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 +# +# Add OS binaries of guest +# + +if {$use_multiboot} { + 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 } -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 " -cpu phenom " - -run_genode_until forever