genode/ports-foc/run/multi_linux.run

174 lines
4.1 KiB
Plaintext
Raw Normal View History

assert_spec foc
assert_spec 32bit
#
# Build
#
set build_components {
core
init
drivers/timer
drivers/framebuffer
server/nitpicker
server/liquid_framebuffer
app/launchpad
l4linux
}
lappend_if [have_spec pci] build_components drivers/pci
lappend_if [have_spec ps2] build_components drivers/input/ps2
lappend_if [have_spec usb] build_components drivers/usb
build $build_components
create_boot_directory
#
# Config
#
set config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="CAP"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="SIGNAL"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start> }
append_if [have_spec pci] config {
<start name="pci_drv">
<resource name="RAM" quantum="1M"/>
<provides><service name="PCI"/></provides>
</start>}
append_if [have_spec framebuffer] config {
<start name="fb_drv">
<resource name="RAM" quantum="4M"/>
<provides><service name="Framebuffer"/></provides>
</start> }
append_if [have_spec ps2] config {
<start name="input_drv">
<binary name="ps2_drv"/>
<resource name="RAM" quantum="1M"/>
<provides><service name="Input"/></provides>
</start>}
append_if [expr ![have_spec ps2] && [have_spec usb]] config {
<start name="input_drv">
<binary name="usb_drv"/>
<resource name="RAM" quantum="12M"/>
<provides> <service name="Input"/> </provides>
<config uhci="yes" ehci="yes" xhci="yes"> <hid/> </config>
</start> }
append config {
<start name="nitpicker">
<resource name="RAM" quantum="2M"/>
<provides><service name="Nitpicker"/></provides>
</start>
<start name="launchpad">
<resource name="RAM" quantum="1G"/>
<config>
<launcher>
<filename>init</filename>
<ram_quota>70M</ram_quota>
<config prio_levels="2">
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="CAP"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="SIGNAL"/>
<service name="Nitpicker"/>
<service name="Timer"/>
</parent-provides>
<default-route>
<any-service> <any-child/> <parent/> </any-service>
</default-route>
<start name="liquid_fb">
<resource name="RAM" quantum="6M"/>
<config xpos="400" ypos="270" width="300" height="200" animate="off" title="Linux"/>
<provides>
<service name="Input"/>
<service name="Framebuffer"/>
</provides>
</start>
<start name="l4linux" priority="-1">
<resource name="RAM" quantum="1G"/>
<config args="mem=52M l4x_rd=initrd.gz"/>
</start>
</config>
</launcher>
</config>
</start>
</config>}
install_config $config
#
# Boot modules
#
set boot_modules {
core
init
timer
nitpicker
launchpad
liquid_fb
l4linux
initrd.gz
}
lappend_if [have_spec pci] boot_modules pci_drv
lappend_if [have_spec ps2] boot_modules ps2_drv
lappend_if [have_spec framebuffer] boot_modules fb_drv
lappend_if [have_spec usb] boot_modules usb_drv
if {[have_spec x86]} {
set uri "https://github.com/downloads/skalk/genode/busybox-initrd-x86-20120618.gz"
} elseif {[have_spec arm]} {
set uri "https://github.com/downloads/skalk/genode/busybox-initrd-arm-20120618.gz"
}
if {![file exists bin/initrd.gz]} {
puts "Download initramfs ..."
exec >& /dev/null wget -c -O bin/initrd.gz $uri
}
exec >& /dev/null wget -O bin/initrd.gz.md5 $uri.md5
cd bin
exec md5sum -c initrd.gz.md5
cd ..
build_boot_image [join $boot_modules " "]
#
# Qemu
#
append qemu_args " -m 512 "
append qemu_args " -serial mon:stdio "
append_if [have_spec x86] qemu_args " -net nic,model=e1000 -net user "
append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 -net user "
#
# Execute test case
#
run_genode_until forever