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:
parent
9263079f70
commit
089f8dcfc8
|
@ -1,4 +1,5 @@
|
||||||
assert_spec foc
|
assert_spec foc
|
||||||
|
assert_spec arm
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build
|
# Build
|
||||||
|
@ -6,14 +7,17 @@ assert_spec foc
|
||||||
set build_components {
|
set build_components {
|
||||||
core
|
core
|
||||||
init
|
init
|
||||||
|
drivers/platform
|
||||||
drivers/usb
|
drivers/usb
|
||||||
drivers/timer
|
drivers/timer
|
||||||
drivers/uart
|
drivers/uart
|
||||||
drivers/sd_card
|
drivers/sd_card
|
||||||
|
drivers/ahci
|
||||||
server/terminal_mux
|
server/terminal_mux
|
||||||
server/terminal_log
|
server/terminal_log
|
||||||
server/nic_bridge
|
server/nic_bridge
|
||||||
server/part_blk
|
server/part_blk
|
||||||
|
server/ffat_fs
|
||||||
drivers/framebuffer
|
drivers/framebuffer
|
||||||
app/cli_monitor
|
app/cli_monitor
|
||||||
test/affinity
|
test/affinity
|
||||||
|
@ -21,11 +25,16 @@ set build_components {
|
||||||
test/lwip/http_srv
|
test/lwip/http_srv
|
||||||
test/block
|
test/block
|
||||||
l4linux
|
l4linux
|
||||||
|
noux
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lappend build_components noux-pkg/vim
|
||||||
|
|
||||||
build $build_components
|
build $build_components
|
||||||
create_boot_directory
|
create_boot_directory
|
||||||
|
|
||||||
|
exec tar cfv bin/vim.tar -h -C bin/vim .
|
||||||
|
|
||||||
#
|
#
|
||||||
# Config
|
# Config
|
||||||
#
|
#
|
||||||
|
@ -79,13 +88,21 @@ set config {
|
||||||
<any-service> <parent/> <any-child/> </any-service>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
</route>
|
</route>
|
||||||
</start>
|
</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">
|
<start name="usb_drv">
|
||||||
<resource name="RAM" quantum="12M"/>
|
<resource name="RAM" quantum="12M"/>
|
||||||
<provides>
|
<provides>
|
||||||
<service name="Nic"/>
|
<service name="Nic"/>
|
||||||
<service name="Input"/>
|
<service name="Input"/>
|
||||||
</provides>
|
</provides>
|
||||||
<config uhci="yes" ehci="yes" xhci="yes">
|
<config uhci="yes" ehci="yes">
|
||||||
<hid />
|
<hid />
|
||||||
<nic mac="2e:60:90:0c:4e:01" />
|
<nic mac="2e:60:90:0c:4e:01" />
|
||||||
</config>
|
</config>
|
||||||
|
@ -111,16 +128,36 @@ set config {
|
||||||
<any-service> <parent/> <any-child/> </any-service>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
</route>
|
</route>
|
||||||
</start>
|
</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" />
|
<resource name="RAM" quantum="10M" />
|
||||||
<provides><service name="Block" /></provides>
|
<provides><service name="Block" /></provides>
|
||||||
<route>
|
<route>
|
||||||
<service name="LOG"> <child name="terminal_log"/> </service>
|
<service name="LOG"> <child name="terminal_log"/> </service>
|
||||||
<any-service><child name="sd_card_drv"/> <parent/><any-child/></any-service>
|
<service name="Block"> <child name="sd_card_drv"/> </service>
|
||||||
|
<any-service><parent/><any-child/></any-service>
|
||||||
</route>
|
</route>
|
||||||
<config>
|
<config>
|
||||||
<policy label="cli_monitor -> block" partition="1"/>
|
<policy label="cli_monitor -> block" partition="1"/>
|
||||||
<policy label="cli_monitor -> l4linux_block -> l4linux -> sda" partition="2"/>
|
<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>
|
</config>
|
||||||
</start>
|
</start>
|
||||||
<start name="cli_monitor">
|
<start name="cli_monitor">
|
||||||
|
@ -173,30 +210,18 @@ set config {
|
||||||
</start>
|
</start>
|
||||||
</config>
|
</config>
|
||||||
</subsystem>
|
</subsystem>
|
||||||
<subsystem name="l4linux_block" help="L4Linux accessing the second partition">
|
<subsystem name="l4linux_emmc" help="L4Linux accessing the second eMMC partition">
|
||||||
<binary name="init"/>
|
<binary name="l4linux"/>
|
||||||
<resource name="RAM" quantum="116M"/>
|
<resource name="RAM" quantum="100M"/>
|
||||||
<config>
|
<config args="mem=64M console=ttyS0 l4x_rd=initrd.gz l4x_cpus=2 l4x_cpus_map=0,1">
|
||||||
<parent-provides>
|
<block label="sda" />
|
||||||
<service name="ROM"/>
|
</config>
|
||||||
<service name="RAM"/>
|
</subsystem>
|
||||||
<service name="CAP"/>
|
<subsystem name="l4linux_sata" help="L4Linux accessing the second SATA partition">
|
||||||
<service name="PD"/>
|
<binary name="l4linux"/>
|
||||||
<service name="RM"/>
|
<resource name="RAM" quantum="100M"/>
|
||||||
<service name="CPU"/>
|
<config args="mem=64M console=ttyS0 l4x_rd=initrd.gz l4x_cpus=2 l4x_cpus_map=0,1">
|
||||||
<service name="LOG"/>
|
<block label="sda" />
|
||||||
<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>
|
|
||||||
</config>
|
</config>
|
||||||
</subsystem>
|
</subsystem>
|
||||||
<subsystem name="affinity" help="test execution on multiple CPUs">
|
<subsystem name="affinity" help="test execution on multiple CPUs">
|
||||||
|
@ -211,16 +236,85 @@ set config {
|
||||||
<binary name="test-input"/>
|
<binary name="test-input"/>
|
||||||
<resource name="RAM" quantum="1M"/>
|
<resource name="RAM" quantum="1M"/>
|
||||||
</subsystem>
|
</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"/>
|
<binary name="test-block"/>
|
||||||
<resource name="RAM" quantum="1M" />
|
<resource name="RAM" quantum="1M" />
|
||||||
</subsystem>
|
</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>
|
</config>
|
||||||
<route>
|
<route>
|
||||||
<service name="LOG"> <child name="terminal_log"/> </service>
|
<service name="LOG"> <child name="terminal_log"/> </service>
|
||||||
<service name="Terminal"> <child name="terminal_mux"/> </service>
|
<service name="Terminal"> <child name="terminal_mux"/> </service>
|
||||||
<service name="Nic"> <child name="nic_bridge"/> </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>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
</route>
|
</route>
|
||||||
</start>
|
</start>
|
||||||
|
@ -240,12 +334,15 @@ set boot_modules {
|
||||||
init
|
init
|
||||||
timer
|
timer
|
||||||
kdb_uart_drv
|
kdb_uart_drv
|
||||||
|
platform_drv
|
||||||
terminal_mux
|
terminal_mux
|
||||||
terminal_log
|
terminal_log
|
||||||
ld.lib.so
|
ld.lib.so
|
||||||
libc.lib.so
|
libc.lib.so
|
||||||
|
libm.lib.so
|
||||||
libc_terminal.lib.so
|
libc_terminal.lib.so
|
||||||
libc_log.lib.so
|
libc_log.lib.so
|
||||||
|
libc_noux.lib.so
|
||||||
lwip.lib.so
|
lwip.lib.so
|
||||||
ncurses.lib.so
|
ncurses.lib.so
|
||||||
cli_monitor
|
cli_monitor
|
||||||
|
@ -257,31 +354,24 @@ set boot_modules {
|
||||||
test-lwip_httpsrv
|
test-lwip_httpsrv
|
||||||
nic_bridge
|
nic_bridge
|
||||||
sd_card_drv
|
sd_card_drv
|
||||||
|
ahci
|
||||||
test-block
|
test-block
|
||||||
part_blk
|
part_blk
|
||||||
|
ffat_fs
|
||||||
|
noux
|
||||||
|
vim.tar
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[have_spec x86]} {
|
set uri "http://genode.org/files/l4linux/initrd-arm-mdev.gz"
|
||||||
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"
|
|
||||||
}
|
|
||||||
if {![file exists bin/initrd.gz]} {
|
if {![file exists bin/initrd.gz]} {
|
||||||
puts "Download initramfs ..."
|
puts "Download initramfs ..."
|
||||||
exec >& /dev/null wget -c -O bin/initrd.gz $uri
|
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 ""
|
set fiasco_serial_esc_arg ""
|
||||||
|
|
||||||
build_boot_image [join $boot_modules " "]
|
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
|
run_genode_until forever
|
||||||
|
|
Loading…
Reference in New Issue