genode/repos/libports/run/solo5_ping.run
Emery Hemingway bc539ce892 Native Solo5 bindings
A shared library implementation of the unikernel middleware.

https://github.com/Solo5/solo5

Fix #2945
2018-11-16 15:07:52 +01:00

124 lines
2.7 KiB
Plaintext

if {![have_spec x86_64]} {
puts "\nSolo5 requires a 64bit architecture\n"
exit 0
}
if {[have_spec linux]} {
puts "\nRunscript not compatible with base-linux drivers\n"
exit 0
}
create_boot_directory
import_from_depot \
genodelabs/src/[base_src] \
genodelabs/src/init \
genodelabs/src/rtc_drv \
source ${genode_dir}/repos/base/run/platform_drv.inc
append config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="128"/>}
append_platform_drv_config
append config {
<start name="timer" caps="96">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="rtc_drv" caps="96">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Rtc"/> </provides>
</start>
<start name="nic_drv" caps="150">
<binary name="} [nic_drv_binary] {"/>
<resource name="RAM" quantum="20M"/>
<provides><service name="Nic"/></provides>
} [nic_drv_config] {
</start>
<start name="nic_bridge" caps="200">
<resource name="RAM" quantum="8M"/>
<provides><service name="Nic"/></provides>
<config mac="02:02:02:02:03:00">
<policy label_prefix="solo5" ip_addr="10.0.0.2"/>
<default-policy/>
</config>
<route>
<service name="Nic"> <child name="nic_drv"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="solo5-test_ping_serve" caps="256">
<resource name="RAM" quantum="4M"/>
<config>
<solo5 cmdline="limit"/>
<nic/>
</config>
<route>
<service name="Nic"> <child name="nic_bridge"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="ping">
<resource name="RAM" quantum="8M"/>
<config interface="10.0.0.72/24"
dst_ip="10.0.0.2"
period_sec="1"
verbose="no"
count="8"/>
<route>
<service name="Nic"> <child name="nic_bridge"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
</config>
}
install_config $config
append build_components {
app/ping
drivers/nic
server/nic_bridge
test/solo5/ping_serve
}
append_platform_drv_build_components
build $build_components
append boot_modules {
nic_bridge
ping
} [nic_drv_binary] {
solo5-test_ping_serve
solo5.lib.so
}
append_platform_drv_boot_modules
build_boot_image $boot_modules
append qemu_args " -nographic "
run_genode_until {child "ping" exited with exit value 0} 60