genode/repos/libports/run/system_rtc.run
Josef Söntgen 99cb585b6e libports: system RTC server and test
For now in libports because it relies on contrib sources from musl
doing the time data conversion.

Issue #3450
2019-08-21 12:37:02 +02:00

100 lines
2.5 KiB
Plaintext

# RTC test
assert_spec x86
if {[expr ![have_include power_on/qemu]]} {
puts "Test requires Qemu."
exit 0
}
set build_components {
core init timer drivers/rtc server/system_rtc test/system_rtc
server/report_rom
}
build $build_components
create_boot_directory
set config {
<config prio_levels="2" verbose="yes">
<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="100"/>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="report_rom">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides>
<config verbose="yes">
<policy label="rtc_drv -> set_rtc" report="test-system_rtc -> drv_set_rtc"/>
<policy label="system_rtc -> set_rtc" report="test-system_rtc -> sys_set_rtc"/>
</config>
</start>
<start name="rtc_drv" priority="-1">
<resource name="RAM" quantum="1M"/>
<provides><service name="Rtc"/></provides>
<config allow_setting_rtc="true"/>
<route>
<service name="ROM" label="set_rtc">
<child name="report_rom"/>
</service>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="system_rtc" priority="-1">
<resource name="RAM" quantum="1M"/>
<provides><service name="Rtc"/></provides>
<config allow_setting_rtc="true"/>
<route>
<service name="ROM" label="set_rtc"> <child name="report_rom"/> </service>
<service name="Rtc"> <child name="rtc_drv"/> </service>
<service name="Timer"> <child name="timer"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="test-system_rtc" priority="-1">
<resource name="RAM" quantum="1M"/>
<config/>
<route>
<service name="Report"> <child name="report_rom"/> </service>
<service name="Rtc"> <child name="system_rtc"/> </service>
<service name="Timer"> <child name="timer"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
</config>}
install_config $config
set boot_components {
core ld.lib.so init timer rtc_drv test-system_rtc system_rtc
report_rom
}
build_boot_image $boot_components
append qemu_args " -nographic "
run_genode_until ".*--- system RTC test finished ---.*\n" 60