genode/ports-foc/run/l4linux_dynamic.run
Stefan Kalkowski 1904a223e8 Check md5 sum of initramfs file in l4lx run-script
* Always download md5sum file and check downloaded binaries
* Extend sleep time in l4linux_netperf script, so that DHCP has enough time
* Fix regexp rule in l4linux_netperf run script to work with MAC addresses
  containing only numbers

Fix #787
2013-07-05 12:37:41 +02:00

378 lines
10 KiB
Plaintext

assert_spec foc
assert_spec arm
#
# Build
#
set build_components {
core
init
drivers/platform
drivers/usb
drivers/timer
drivers/uart
drivers/sd_card
drivers/ahci
server/terminal_mux
server/terminal_log
server/nic_bridge
server/part_blk
server/ffat_fs
drivers/framebuffer
app/cli_monitor
test/affinity
test/input
test/lwip/http_srv
test/block
l4linux
noux
}
lappend build_components noux-pkg/vim
build $build_components
create_boot_directory
exec tar cfv bin/vim.tar -h -C bin/vim .
#
# Config
#
set config {
<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"/>
</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>
<start name="kdb_uart_drv">
<resource name="RAM" quantum="1M"/>
<provides>
<service name="Terminal"/>
<service name="Uart"/>
</provides>
<config>
<policy label="terminal_mux" uart="0" detect_size="yes"/>
</config>
</start>
<start name="terminal_mux">
<resource name="RAM" quantum="8M"/>
<provides><service name="Terminal"/></provides>
<route>
<service name="Terminal"> <child name="kdb_uart_drv"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="terminal_log">
<resource name="RAM" quantum="2M"/>
<provides>
<service name="LOG"/>
</provides>
<route>
<service name="Terminal"> <child name="terminal_mux"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="platform_drv">
<resource name="RAM" quantum="1M"/>
<provides><service name="Regulator"/></provides>
<route>
<service name="LOG"> <child name="terminal_log"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="usb_drv">
<resource name="RAM" quantum="12M"/>
<provides>
<service name="Nic"/>
<service name="Input"/>
</provides>
<config uhci="yes" ehci="yes">
<hid />
<nic mac="2e:60:90:0c:4e:01" />
</config>
<route>
<service name="LOG"> <child name="terminal_log"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="nic_bridge">
<resource name="RAM" quantum="2M"/>
<provides><service name="Nic"/></provides>
<route>
<service name="Nic"> <child name="usb_drv"/> </service>
<service name="LOG"> <child name="terminal_log"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="sd_card_drv">
<resource name="RAM" quantum="1M"/>
<provides><service name="Block"/></provides>
<route>
<service name="LOG"> <child name="terminal_log"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="ahci">
<resource name="RAM" quantum="1M"/>
<provides><service name="Block"/></provides>
</start>
<start name="part_blk_emmc">
<binary name="part_blk"/>
<resource name="RAM" quantum="10M" />
<provides><service name="Block" /></provides>
<route>
<service name="LOG"> <child name="terminal_log"/> </service>
<service name="Block"> <child name="sd_card_drv"/> </service>
<any-service><parent/><any-child/></any-service>
</route>
<config>
<policy label="cli_monitor -> block" partition="1"/>
<policy label="cli_monitor -> l4linux_emmc -> sda" partition="2"/>
</config>
</start>
<start name="part_blk_sata">
<binary name="part_blk"/>
<resource name="RAM" quantum="10M" />
<provides><service name="Block" /></provides>
<route>
<service name="LOG"> <child name="terminal_log"/> </service>
<service name="Block"> <child name="ahci"/> </service>
<any-service><parent/><any-child/></any-service>
</route>
<config>
<policy label="cli_monitor -> vim_sata -> ffat_fs_sata" partition="1"/>
<policy label="cli_monitor -> l4linux_sata -> sda" partition="2"/>
</config>
</start>
<start name="cli_monitor">
<resource name="RAM" quantum="2G"/>
<config>
<subsystem name="l4linux" help="L4Linux with 100 MiB RAM">
<binary name="init"/>
<resource name="RAM" quantum="116M"/>
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="CAP"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="SIGNAL"/>
<service name="Timer"/>
<service name="Terminal"/>
</parent-provides>
<start name="l4linux">
<resource name="RAM" quantum="1G"/>
<config args="mem=100M console=ttyS0 l4x_rd=initrd.gz l4x_cpus=2 l4x_cpus_map=0,1"/>
<route> <any-service> <parent/> </any-service> </route>
</start>
</config>
</subsystem>
<subsystem name="l4linux_net" help="L4Linux with network">
<binary name="init"/>
<resource name="RAM" quantum="116M"/>
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="CAP"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="SIGNAL"/>
<service name="Timer"/>
<service name="Terminal"/>
<service name="Nic"/>
</parent-provides>
<start name="l4linux">
<resource name="RAM" quantum="1G"/>
<config args="mem=100M console=ttyS0 l4x_rd=initrd.gz l4x_cpus=2 l4x_cpus_map=0,1"/>
<route> <any-service> <parent/> </any-service> </route>
</start>
</config>
</subsystem>
<subsystem name="l4linux_emmc" help="L4Linux accessing the second eMMC partition">
<binary name="l4linux"/>
<resource name="RAM" quantum="100M"/>
<config args="mem=64M console=ttyS0 l4x_rd=initrd.gz l4x_cpus=2 l4x_cpus_map=0,1">
<block label="sda" />
</config>
</subsystem>
<subsystem name="l4linux_sata" help="L4Linux accessing the second SATA partition">
<binary name="l4linux"/>
<resource name="RAM" quantum="100M"/>
<config args="mem=64M console=ttyS0 l4x_rd=initrd.gz l4x_cpus=2 l4x_cpus_map=0,1">
<block label="sda" />
</config>
</subsystem>
<subsystem name="affinity" help="test execution on multiple CPUs">
<binary name="test-affinity"/>
<resource name="RAM" quantum="1M"/>
</subsystem>
<subsystem name="http" help="simple HTTP server">
<binary name="test-lwip_httpsrv"/>
<resource name="RAM" quantum="3M"/>
</subsystem>
<subsystem name="input" help="dump user input">
<binary name="test-input"/>
<resource name="RAM" quantum="1M"/>
</subsystem>
<subsystem name="block" help="block device test on first eMMC partition">
<binary name="test-block"/>
<resource name="RAM" quantum="1M" />
</subsystem>
<subsystem name="vim_sata" help="VIM editor accessing the first SATA partition">
<binary name="init"/>
<resource name="RAM" quantum="1024M" />
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="CAP"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="SIGNAL"/>
<service name="Timer"/>
<service name="Terminal"/>
<service name="Block"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<start name="ffat_fs_sata">
<binary name="ffat_fs"/>
<resource name="RAM" quantum="10M"/>
<provides><service name="File_system"/></provides>
<config>
<policy label="vim_sata_part1 -> part1" root="/" writeable="yes" />
</config>
</start>
<start name="vim_sata_part1">
<binary name="noux"/>
<resource name="RAM" quantum="100M"/>
<config>
<fstab>
<tar name="vim.tar" />
<dir name="mnt"> <fs label="part1" /> </dir>
</fstab>
<start name="/bin/vim">
<env name="TERM" value="linux" />
<arg value="--noplugin" />
<arg value="-n" />
<arg value="-N" />
<arg value="--cmd" />
<arg value="set laststatus=2" />
<arg value="--cmd" />
<arg value="set hls" />
</start>
</config>
<route>
<service name="File_system">
<if-arg key="label" value="part1"/><child name="ffat_fs_sata"/>
</service>
<any-service><parent/><any-child/></any-service>
</route>
</start>
</config>
</subsystem>
</config>
<route>
<service name="LOG"> <child name="terminal_log"/> </service>
<service name="Terminal"> <child name="terminal_mux"/> </service>
<service name="Nic"> <child name="nic_bridge"/> </service>
<service name="Block">
<if-arg key="label" value="l4linux_sata -> sda"/><child name="part_blk_sata"/>
</service>
<service name="Block">
<if-arg key="label" value="l4linux_emmc -> sda"/><child name="part_blk_emmc"/>
</service>
<service name="Block">
<if-arg key="label" value="block"/><child name="part_blk_emmc"/>
</service>
<service name="Block">
<if-arg key="label" value="vim_sata -> ffat_fs_sata"/><child name="part_blk_sata"/>
</service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
}
append config {
</config>
}
install_config $config
#
# Boot modules
#
set boot_modules {
core
init
timer
kdb_uart_drv
platform_drv
terminal_mux
terminal_log
ld.lib.so
libc.lib.so
libm.lib.so
libc_terminal.lib.so
libc_log.lib.so
libc_noux.lib.so
lwip.lib.so
ncurses.lib.so
cli_monitor
l4linux
initrd.gz
test-affinity
usb_drv
test-input
test-lwip_httpsrv
nic_bridge
sd_card_drv
ahci
test-block
part_blk
ffat_fs
noux
vim.tar
}
set uri "http://genode.org/files/l4linux/initrd-arm-mdev.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 ..
set fiasco_serial_esc_arg ""
build_boot_image [join $boot_modules " "]
run_genode_until forever