2012-07-30 14:02:00 +00:00
|
|
|
assert_spec foc
|
2013-06-30 11:48:10 +00:00
|
|
|
assert_spec 32bit
|
2012-07-30 14:02:00 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
set build_components {
|
|
|
|
core
|
|
|
|
init
|
|
|
|
drivers/timer
|
|
|
|
drivers/framebuffer
|
|
|
|
server/nitpicker
|
|
|
|
server/liquid_framebuffer
|
|
|
|
app/launchpad
|
|
|
|
l4linux
|
|
|
|
}
|
|
|
|
|
2013-11-13 13:10:49 +00:00
|
|
|
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
|
|
|
|
lappend_if [have_spec gpio] build_components drivers/gpio
|
2012-07-30 14:02:00 +00:00
|
|
|
|
|
|
|
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>}
|
|
|
|
|
2013-04-29 08:51:27 +00:00
|
|
|
append_if [have_spec framebuffer] config {
|
2012-07-30 14:02:00 +00:00
|
|
|
<start name="fb_drv">
|
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
<provides><service name="Framebuffer"/></provides>
|
2013-04-29 08:51:27 +00:00
|
|
|
</start> }
|
2012-07-30 14:02:00 +00:00
|
|
|
|
|
|
|
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>}
|
|
|
|
|
2013-11-13 13:10:49 +00:00
|
|
|
append_if [have_spec gpio] config {
|
|
|
|
<start name="gpio_drv">
|
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
<provides><service name="Gpio"/></provides>
|
|
|
|
<config/>
|
|
|
|
</start>}
|
|
|
|
|
2012-07-30 14:02:00 +00:00
|
|
|
append_if [expr ![have_spec ps2] && [have_spec usb]] config {
|
|
|
|
<start name="input_drv">
|
|
|
|
<binary name="usb_drv"/>
|
2012-09-17 14:01:07 +00:00
|
|
|
<resource name="RAM" quantum="12M"/>
|
2012-07-30 14:02:00 +00:00
|
|
|
<provides> <service name="Input"/> </provides>
|
2013-05-22 09:38:16 +00:00
|
|
|
<config uhci="yes" ehci="yes" xhci="yes"> <hid/> </config>
|
2012-07-30 14:02:00 +00:00
|
|
|
</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>
|
2013-09-19 13:07:28 +00:00
|
|
|
<launcher name="init" ram_quota="70M">
|
2012-08-07 20:26:34 +00:00
|
|
|
<config prio_levels="2">
|
2012-07-30 14:02:00 +00:00
|
|
|
<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"/>
|
2013-05-22 17:21:29 +00:00
|
|
|
<config xpos="400" ypos="270" width="300" height="200" animate="off" title="Linux"/>
|
2012-07-30 14:02:00 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Input"/>
|
|
|
|
<service name="Framebuffer"/>
|
|
|
|
</provides>
|
|
|
|
</start>
|
2012-08-07 20:26:34 +00:00
|
|
|
<start name="l4linux" priority="-1">
|
2012-07-30 14:02:00 +00:00
|
|
|
<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
|
|
|
|
}
|
2013-04-29 08:51:27 +00:00
|
|
|
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
|
2013-11-13 13:10:49 +00:00
|
|
|
lappend_if [have_spec gpio] boot_modules gpio_drv
|
2012-07-30 14:02:00 +00:00
|
|
|
|
|
|
|
if {[have_spec x86]} {
|
2013-09-23 12:43:52 +00:00
|
|
|
set uri "http://genode.org/files/l4linux/busybox-initrd-x86-20120618.gz"
|
2012-07-30 14:02:00 +00:00
|
|
|
} elseif {[have_spec arm]} {
|
2013-09-23 12:43:52 +00:00
|
|
|
set uri "http://genode.org/files/l4linux/busybox-initrd-arm-20120618.gz"
|
2012-07-30 14:02:00 +00:00
|
|
|
}
|
|
|
|
if {![file exists bin/initrd.gz]} {
|
|
|
|
puts "Download initramfs ..."
|
|
|
|
exec >& /dev/null wget -c -O bin/initrd.gz $uri
|
|
|
|
}
|
2013-07-01 09:22:59 +00:00
|
|
|
exec >& /dev/null wget -O bin/initrd.gz.md5 $uri.md5
|
|
|
|
cd bin
|
|
|
|
exec md5sum -c initrd.gz.md5
|
|
|
|
cd ..
|
2012-07-30 14:02:00 +00:00
|
|
|
|
|
|
|
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
|