mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 07:46:42 +00:00
parent
4474e9d6d6
commit
35f9ceb7ba
@ -19,6 +19,8 @@ set use_usb 0
|
||||
|
||||
set use_fancy_stuff 0
|
||||
|
||||
set memory_vmm_vm "128M"
|
||||
|
||||
source ${genode_dir}/ports/run/seoul.inc
|
||||
|
||||
if {[is_qemu_available]} {
|
||||
|
@ -2,6 +2,7 @@
|
||||
# \brief Example for using Vancouver 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
|
||||
@ -21,6 +22,9 @@ set use_usb 0
|
||||
|
||||
set use_fancy_stuff 1
|
||||
|
||||
set memory_init "288M"
|
||||
set memory_vmm_vm "128M"
|
||||
|
||||
set multiboot_files {
|
||||
<rom name="munich"/>
|
||||
<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 sha1_os_binaries { 7ecb4ba634a0ecfa6429418ea73490d6f65afead 6b2ef2c5bf16db3ebcbe33ce134e4e0a96944f82 51aa53eb494b71d65f7fe3eb05e52af4616878bd}
|
||||
|
||||
#
|
||||
# Download demo kernel, image and
|
||||
@ -38,6 +43,7 @@ set uri "http://genode.org/files/seoul"
|
||||
foreach binary $guest_os_binaries {
|
||||
if {![file exists bin/$binary]} {
|
||||
puts "Download file bin/$binary"
|
||||
exec mkdir -p bin
|
||||
exec >& /dev/null wget -c -O bin/$binary $uri/$binary
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ set use_usb 0
|
||||
|
||||
set use_fancy_stuff 0
|
||||
|
||||
set memory_vmm_vm "128M"
|
||||
|
||||
set multiboot_files {
|
||||
<rom name="munich"/>
|
||||
<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 sha1_os_binaries { 7ecb4ba634a0ecfa6429418ea73490d6f65afead 6b2ef2c5bf16db3ebcbe33ce134e4e0a96944f82 201deb4bd18fb07f3d0b5495b948ba622ff98e4b}
|
||||
|
||||
#
|
||||
# Download demo kernel, image and
|
||||
@ -35,6 +38,7 @@ set uri "http://genode.org/files/seoul"
|
||||
|
||||
foreach binary $guest_os_binaries {
|
||||
if {![file exists bin/$binary]} {
|
||||
exec mkdir -p bin
|
||||
puts "Download file bin/$binary"
|
||||
exec >& /dev/null wget -c -O bin/$binary $uri/$binary
|
||||
}
|
||||
|
@ -222,8 +222,10 @@ append config {
|
||||
if {!$use_fancy_stuff} {
|
||||
append config {
|
||||
<start name="vancouver">
|
||||
<binary name="vancouver"/>
|
||||
<resource name="RAM" quantum="128M"/>
|
||||
<binary name="vancouver"/>}
|
||||
append config "
|
||||
<resource name=\"RAM\" quantum=\"$memory_vmm_vm\"/>"
|
||||
append config {
|
||||
<route>
|
||||
<service name="Timer"><child name="timer"/></service>}
|
||||
append_if [expr $use_nic_session && $use_nic_bridge] config {
|
||||
@ -239,6 +241,15 @@ append config {
|
||||
</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 {
|
||||
<start name="nitpicker">
|
||||
<resource name="RAM" quantum="8M"/>
|
||||
@ -249,32 +260,28 @@ append_if $use_fancy_stuff config {
|
||||
</route>
|
||||
<provides><service name="Nitpicker"/></provides>
|
||||
</start>
|
||||
|
||||
<start name="launchpad">
|
||||
<resource name="RAM" quantum="2500M"/>
|
||||
<resource name="RAM" quantum="64000M"/>
|
||||
<configfile name="launchpad-config"/>
|
||||
<route>
|
||||
<service name="Nic"><child name="nic_bridge"/></service>
|
||||
<any-service><any-child/><parent/></any-service>
|
||||
</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>}
|
||||
|
||||
append config {
|
||||
</config>}
|
||||
|
||||
#
|
||||
# Generate Launchpad config file
|
||||
set launchpad_cfg_fd [open "bin/launchpad-config" w]
|
||||
puts $launchpad_cfg_fd {<config>
|
||||
<launcher><ram_quota>288M</ram_quota><filename>init</filename>
|
||||
#
|
||||
if {$use_fancy_stuff} {
|
||||
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>
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
@ -321,10 +328,10 @@ puts $launchpad_cfg_fd {<config>
|
||||
<configfile name="vm_linux.cfg"/>
|
||||
</start>
|
||||
</config>
|
||||
</launcher>
|
||||
</config>}
|
||||
close $launchpad_cfg_fd
|
||||
|
||||
</launcher>}
|
||||
puts $launchpad_cfg_fd {</config>}
|
||||
close $launchpad_cfg_fd
|
||||
}
|
||||
|
||||
install_config $config
|
||||
|
||||
@ -364,11 +371,21 @@ lappend_if $use_fancy_stuff boot_modules launchpad-config
|
||||
|
||||
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 }
|
||||
@ -376,4 +393,8 @@ if {$use_multiboot} {
|
||||
append boot_modules $guest_os_binaries
|
||||
}
|
||||
|
||||
if {$use_usb} {
|
||||
append qemu_args " -usb -usbdevice mouse -usbdevice keyboard "
|
||||
}
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
Loading…
Reference in New Issue
Block a user