Extend l4linux_dynamic run-script with SATA driver

* Add platform_drv for usb_drv, sd_card_drv and ahci
* Add ahci driver and part_blk on top of it
* add linux instance using SATA partition
* add VIM using SATA partition
This commit is contained in:
Stefan Kalkowski 2013-06-28 16:18:15 +02:00
parent 9263079f70
commit 089f8dcfc8

View File

@ -1,4 +1,5 @@
assert_spec foc
assert_spec arm
#
# Build
@ -6,14 +7,17 @@ assert_spec foc
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
@ -21,11 +25,16 @@ set build_components {
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
#
@ -79,13 +88,21 @@ set config {
<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" xhci="yes">
<config uhci="yes" ehci="yes">
<hid />
<nic mac="2e:60:90:0c:4e:01" />
</config>
@ -111,16 +128,36 @@ set config {
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="part_blk">
<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>
<any-service><child name="sd_card_drv"/> <parent/><any-child/></any-service>
<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_block -> l4linux -> sda" partition="2"/>
<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">
@ -173,30 +210,18 @@ set config {
</start>
</config>
</subsystem>
<subsystem name="l4linux_block" help="L4Linux accessing the second partition">
<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="Block"/>
</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">
<block label="sda" />
</config>
<route> <any-service> <parent/> </any-service> </route>
</start>
<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">
@ -211,16 +236,85 @@ set config {
<binary name="test-input"/>
<resource name="RAM" quantum="1M"/>
</subsystem>
<subsystem name="block" help="block device test on first partition">
<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"> <child name="part_blk"/> </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>
@ -240,12 +334,15 @@ set boot_modules {
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
@ -257,31 +354,24 @@ set boot_modules {
test-lwip_httpsrv
nic_bridge
sd_card_drv
ahci
test-block
part_blk
ffat_fs
noux
vim.tar
}
if {[have_spec x86]} {
set uri "http://genode.org/files/release-11.11/l4lx/initrd-ia32.gz"
} elseif {[have_spec arm]} {
set uri "http://genode.org/files/release-11.11/l4lx/initrd-arm.gz"
}
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 -c -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 " "]
#
# Qemu
#
append qemu_args " -m 512 -nographic "
append_if [have_spec x86] qemu_args " -smp 2,cores=2 "
#
# Execute test case
#
run_genode_until forever