2016-12-22 11:03:21 +00:00
|
|
|
if {[have_spec linux]} {
|
|
|
|
puts "\n Run script is not supported on this platform. \n";
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
if {[get_cmd_switch --autopilot] && ![have_include "power_on/qemu"]} {
|
|
|
|
puts "\n Run script is not supported on this platform. \n";
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
proc log_service { } {
|
|
|
|
if { [get_cmd_switch --autopilot] } { return log }
|
|
|
|
return ram
|
|
|
|
}
|
|
|
|
|
2016-05-28 18:54:24 +00:00
|
|
|
if {[have_spec nova]} {
|
|
|
|
proc kernel_output { } { return "novga logmem" }
|
|
|
|
}
|
|
|
|
|
2019-01-03 17:01:49 +00:00
|
|
|
build "core init timer server/vfs server/fs_log app/log_core"
|
2016-12-22 11:03:21 +00:00
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
2016-05-28 18:54:24 +00:00
|
|
|
append config {
|
2016-12-22 11:03:21 +00:00
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RAM"/>
|
|
|
|
<service name="ROM"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</default-route>
|
|
|
|
|
|
|
|
<default caps="100"/>
|
|
|
|
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="CPU" quantum="10"/>
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="vfs">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config>
|
|
|
|
<vfs>
|
|
|
|
<!-- be careful to avoid endless output loop for core.log -->
|
|
|
|
<dir name="log_core"> <} [log_service] { name="log.log"/> </dir>
|
|
|
|
</vfs>
|
2019-01-24 12:59:43 +00:00
|
|
|
<policy label_prefix="fs_log" writeable="yes" root="/"/>
|
2016-12-22 11:03:21 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="fs_log">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<provides><service name="LOG"/></provides>
|
|
|
|
<config>
|
|
|
|
<policy label="log_core -> log"/>
|
|
|
|
</config>
|
|
|
|
<route>
|
|
|
|
<service name="File_system"> <child name="vfs"/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="log_core">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
<config period_ms="2000"/>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" unscoped_label="log_core"> <parent/> </service>
|
|
|
|
<service name="ROM" unscoped_label="ld.lib.so"> <parent/> </service>
|
|
|
|
<service name="ROM" label="log"> <parent label="core_log"/> </service>
|
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
|
|
<service name="LOG" label="log"> <child name="fs_log"/> </service>
|
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="CPU"> <parent/> </service>
|
|
|
|
<service name="LOG"> <parent/> </service>
|
|
|
|
</route>
|
2016-05-28 18:54:24 +00:00
|
|
|
</start>}
|
|
|
|
|
|
|
|
append_if [have_spec nova] config {
|
|
|
|
<start name="log_kernel">
|
|
|
|
<binary name="log_core"/>
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
<config period_ms="2000"/>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" unscoped_label="log_core"> <parent/> </service>
|
|
|
|
<service name="ROM" unscoped_label="ld.lib.so"> <parent/> </service>
|
|
|
|
<service name="ROM" label="log"> <parent label="kernel_log"/> </service>
|
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="CPU"> <parent/> </service>
|
|
|
|
<service name="LOG"> <parent/> </service>
|
|
|
|
</route>
|
|
|
|
</start>}
|
|
|
|
|
|
|
|
append config {
|
|
|
|
</config>}
|
|
|
|
|
|
|
|
install_config $config
|
2016-12-22 11:03:21 +00:00
|
|
|
|
2018-04-23 08:49:21 +00:00
|
|
|
build_boot_image "core init timer ld.lib.so vfs fs_log log_core vfs.lib.so"
|
2016-12-22 11:03:21 +00:00
|
|
|
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
|
|
|
|
if { [get_cmd_switch --autopilot] } {
|
|
|
|
run_genode_until {.*\[init -> vfs] \[.*\n} 20
|
|
|
|
} else {
|
|
|
|
run_genode_until forever
|
|
|
|
}
|