2023-05-08 14:57:57 +00:00
|
|
|
proc platform_supported { } {
|
|
|
|
if {[have_spec x86_64] && [have_board pc]} {
|
|
|
|
if {![have_spec linux] && ![have_spec foc] && ![have_spec sel4]} {
|
|
|
|
return 1 } }
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
if {![platform_supported]} {
|
|
|
|
puts "Run script is not supported on this platform"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2023-11-24 10:57:35 +00:00
|
|
|
build {
|
|
|
|
core lib/ld init timer monitor lib/sandbox
|
|
|
|
test/monitor server/terminal_crosslink
|
|
|
|
}
|
2023-05-08 14:57:57 +00:00
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
install_config {
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
</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="terminal_crosslink" caps="100">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Terminal"/> </provides>
|
2024-03-07 14:00:50 +00:00
|
|
|
<config buffer="9K"/>
|
2023-05-08 14:57:57 +00:00
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="monitor" caps="1000">
|
|
|
|
<resource name="RAM" quantum="100M"/>
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="Timer"/>
|
|
|
|
<service name="Terminal"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default caps="100"/>
|
2023-09-12 13:27:17 +00:00
|
|
|
<affinity-space width="2" height="1"/>
|
2023-05-08 14:57:57 +00:00
|
|
|
|
2024-03-07 14:00:50 +00:00
|
|
|
<monitor max_response="8K">
|
2023-05-08 14:57:57 +00:00
|
|
|
<policy label="test-monitor" stop="no" wx="yes" />
|
|
|
|
</monitor>
|
|
|
|
|
|
|
|
<start name="test-monitor">
|
2023-09-12 13:27:17 +00:00
|
|
|
<affinity xpos="1" width="1"/>
|
2023-05-08 14:57:57 +00:00
|
|
|
<resource name="RAM" quantum="32M"/>
|
|
|
|
<route>
|
|
|
|
<service name="PD"> <local/> </service>
|
|
|
|
<service name="CPU"> <local/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
build_boot_image [build_artifacts]
|
|
|
|
|
2023-09-12 13:27:17 +00:00
|
|
|
append qemu_args "-nographic -smp 4,cores=4 "
|
2023-05-08 14:57:57 +00:00
|
|
|
|
|
|
|
run_genode_until {\[init -> monitor\] child "test-monitor" exited with exit value 0.*\n} 30
|