seoul: fix run script issues 823 and 824

Fix #823
Fix #824
This commit is contained in:
Alexander Boettcher 2013-08-10 14:05:59 +02:00 committed by Norman Feske
parent 4474e9d6d6
commit 35f9ceb7ba
4 changed files with 53 additions and 20 deletions

View File

@ -19,6 +19,8 @@ set use_usb 0
set use_fancy_stuff 0 set use_fancy_stuff 0
set memory_vmm_vm "128M"
source ${genode_dir}/ports/run/seoul.inc source ${genode_dir}/ports/run/seoul.inc
if {[is_qemu_available]} { if {[is_qemu_available]} {

View File

@ -2,6 +2,7 @@
# \brief Example for using Vancouver on Genode # \brief Example for using Vancouver on Genode
# \author Norman Feske # \author Norman Feske
# \author Markus Partheymueller # \author Markus Partheymueller
# \author Alexander Boettcher
# \date 2011-11-21 # \date 2011-11-21
# #
# This run script starts the Vancouver VMM booting the multiboot modules # This run script starts the Vancouver VMM booting the multiboot modules
@ -21,6 +22,9 @@ set use_usb 0
set use_fancy_stuff 1 set use_fancy_stuff 1
set memory_init "288M"
set memory_vmm_vm "128M"
set multiboot_files { set multiboot_files {
<rom name="munich"/> <rom name="munich"/>
<rom name="bzImage-3.1" cmdline="root=/dev/ram0 earlyprintk=ttyS0 vga=0x314"/> <rom name="bzImage-3.1" cmdline="root=/dev/ram0 earlyprintk=ttyS0 vga=0x314"/>
@ -28,6 +32,7 @@ set multiboot_files {
} }
set guest_os_binaries { munich bzImage-3.1 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 # Download demo kernel, image and
@ -38,6 +43,7 @@ set uri "http://genode.org/files/seoul"
foreach binary $guest_os_binaries { foreach binary $guest_os_binaries {
if {![file exists bin/$binary]} { if {![file exists bin/$binary]} {
puts "Download file bin/$binary" puts "Download file bin/$binary"
exec mkdir -p bin
exec >& /dev/null wget -c -O bin/$binary $uri/$binary exec >& /dev/null wget -c -O bin/$binary $uri/$binary
} }
} }

View File

@ -19,6 +19,8 @@ set use_usb 0
set use_fancy_stuff 0 set use_fancy_stuff 0
set memory_vmm_vm "128M"
set multiboot_files { set multiboot_files {
<rom name="munich"/> <rom name="munich"/>
<rom name="bzImage-3.1" cmdline="root=/dev/ram0 earlyprintk=ttyS0 text"/> <rom name="bzImage-3.1" cmdline="root=/dev/ram0 earlyprintk=ttyS0 text"/>
@ -26,6 +28,7 @@ set multiboot_files {
} }
set guest_os_binaries { munich bzImage-3.1 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 # Download demo kernel, image and
@ -35,6 +38,7 @@ set uri "http://genode.org/files/seoul"
foreach binary $guest_os_binaries { foreach binary $guest_os_binaries {
if {![file exists bin/$binary]} { if {![file exists bin/$binary]} {
exec mkdir -p bin
puts "Download file bin/$binary" puts "Download file bin/$binary"
exec >& /dev/null wget -c -O bin/$binary $uri/$binary exec >& /dev/null wget -c -O bin/$binary $uri/$binary
} }

View File

@ -222,8 +222,10 @@ append config {
if {!$use_fancy_stuff} { if {!$use_fancy_stuff} {
append config { append config {
<start name="vancouver"> <start name="vancouver">
<binary name="vancouver"/> <binary name="vancouver"/>}
<resource name="RAM" quantum="128M"/> append config "
<resource name=\"RAM\" quantum=\"$memory_vmm_vm\"/>"
append config {
<route> <route>
<service name="Timer"><child name="timer"/></service>} <service name="Timer"><child name="timer"/></service>}
append_if [expr $use_nic_session && $use_nic_bridge] config { append_if [expr $use_nic_session && $use_nic_bridge] config {
@ -239,6 +241,15 @@ append config {
</start> } </start> }
} }
append_if $use_usb config {
<start name="usb_drv">
<resource name="RAM" quantum="7M"/>
<provides><service name="Input"/></provides>
<config uhci="yes" ehci="yes" xhci="yes">
<hid/>
</config>
</start>}
append_if $use_fancy_stuff config { append_if $use_fancy_stuff config {
<start name="nitpicker"> <start name="nitpicker">
<resource name="RAM" quantum="8M"/> <resource name="RAM" quantum="8M"/>
@ -249,32 +260,28 @@ append_if $use_fancy_stuff config {
</route> </route>
<provides><service name="Nitpicker"/></provides> <provides><service name="Nitpicker"/></provides>
</start> </start>
<start name="launchpad"> <start name="launchpad">
<resource name="RAM" quantum="2500M"/> <resource name="RAM" quantum="64000M"/>
<configfile name="launchpad-config"/> <configfile name="launchpad-config"/>
<route> <route>
<service name="Nic"><child name="nic_bridge"/></service> <service name="Nic"><child name="nic_bridge"/></service>
<any-service><any-child/><parent/></any-service> <any-service><any-child/><parent/></any-service>
</route> </route>
</start> }
append_if $use_usb config {
<start name="usb_drv">
<resource name="RAM" quantum="7M"/>
<provides><service name="Input"/></provides>
<config uhci="yes" ehci="yes" xhci="yes">
<hid/>
</config>
</start>} </start>}
append config { append config {
</config>} </config>}
#
# Generate Launchpad config file # Generate Launchpad config file
set launchpad_cfg_fd [open "bin/launchpad-config" w] #
puts $launchpad_cfg_fd {<config> if {$use_fancy_stuff} {
<launcher><ram_quota>288M</ram_quota><filename>init</filename> set launchpad_cfg_fd [open "bin/launchpad-config" w]
puts $launchpad_cfg_fd "<config>
<launcher><ram_quota>$memory_init</ram_quota><filename>init</filename>"
puts $launchpad_cfg_fd {
<config> <config>
<parent-provides> <parent-provides>
<service name="ROM"/> <service name="ROM"/>
@ -321,10 +328,10 @@ puts $launchpad_cfg_fd {<config>
<configfile name="vm_linux.cfg"/> <configfile name="vm_linux.cfg"/>
</start> </start>
</config> </config>
</launcher> </launcher>}
</config>} puts $launchpad_cfg_fd {</config>}
close $launchpad_cfg_fd close $launchpad_cfg_fd
}
install_config $config install_config $config
@ -364,11 +371,21 @@ lappend_if $use_fancy_stuff boot_modules launchpad-config
if {$use_multiboot} { if {$use_multiboot} {
set guest_os_binary_missing 0 set guest_os_binary_missing 0
set binary_counter 0
foreach binary $guest_os_binaries { foreach binary $guest_os_binaries {
if {![file exists bin/$binary]} { if {![file exists bin/$binary]} {
puts stderr "Error: guest OS binary \"bin/$binary\" does not exist" puts stderr "Error: guest OS binary \"bin/$binary\" does not exist"
set guest_os_binary_missing 1 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 } if {$guest_os_binary_missing} { exit 1 }
@ -376,4 +393,8 @@ if {$use_multiboot} {
append boot_modules $guest_os_binaries append boot_modules $guest_os_binaries
} }
if {$use_usb} {
append qemu_args " -usb -usbdevice mouse -usbdevice keyboard "
}
build_boot_image $boot_modules build_boot_image $boot_modules