2013-03-21 10:40:55 +00:00
|
|
|
#
|
|
|
|
# \brief Example for using the terminal_mux server over UART
|
|
|
|
# \author Norman Feske
|
|
|
|
# \date 2013-02-20
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# On Linux, we don't have a UART driver, on which this run script depends.
|
|
|
|
#
|
|
|
|
if {[have_spec linux]} { puts "Run script does not support Linux"; exit 0 }
|
|
|
|
|
2013-02-21 10:44:46 +00:00
|
|
|
set build_components {
|
2018-08-30 12:56:02 +00:00
|
|
|
core init noux lib/libc_noux app/cli_monitor test/bomb test/signal
|
2019-01-03 17:01:49 +00:00
|
|
|
test/resource_yield timer drivers/uart server/terminal_mux
|
2013-10-05 17:07:34 +00:00
|
|
|
server/terminal_log noux-pkg/vim
|
2013-02-21 10:44:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build $build_components
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
append config {
|
2013-03-21 14:50:32 +00:00
|
|
|
<config>
|
2013-02-21 10:44:46 +00:00
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <any-child/> <parent/> </any-service>
|
|
|
|
</default-route>
|
2018-04-23 08:49:21 +00:00
|
|
|
<default caps="100"/>
|
2013-02-21 10:44:46 +00:00
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
<route> <any-service> <parent/> </any-service> </route>
|
|
|
|
</start>
|
2017-05-08 11:08:52 +00:00
|
|
|
<start name="uart_drv">
|
2013-02-21 10:44:46 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides>
|
|
|
|
<service name="Uart"/>
|
|
|
|
<service name="Terminal"/>
|
|
|
|
</provides>
|
2017-05-08 11:08:52 +00:00
|
|
|
<config>
|
2018-04-23 08:49:21 +00:00
|
|
|
<policy label_prefix="terminal_mux" uart="1" detect_size="yes"/>
|
2013-02-21 10:44:46 +00:00
|
|
|
</config>
|
2013-03-22 20:32:16 +00:00
|
|
|
<route> <any-service> <parent/> <any-child/> </any-service> </route>
|
2013-02-21 10:44:46 +00:00
|
|
|
</start>
|
|
|
|
<start name="terminal_mux">
|
2013-03-18 15:07:29 +00:00
|
|
|
<resource name="RAM" quantum="4M"/>
|
2013-02-21 10:44:46 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Terminal"/>
|
|
|
|
</provides>
|
|
|
|
<route>
|
|
|
|
<any-service> <child name="uart_drv" /> <parent/> <any-child /> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
<start name="terminal_log">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<provides>
|
|
|
|
<service name="LOG"/>
|
|
|
|
</provides>
|
|
|
|
<route>
|
2013-10-05 16:01:54 +00:00
|
|
|
<any-service> <child name="terminal_mux" /> <parent/> <any-child/> </any-service>
|
2013-02-21 10:44:46 +00:00
|
|
|
</route>
|
|
|
|
</start>
|
2013-03-21 10:40:55 +00:00
|
|
|
<start name="cli_monitor">
|
2013-10-14 12:41:39 +00:00
|
|
|
<resource name="RAM" quantum="100M"/>
|
2013-02-21 10:44:46 +00:00
|
|
|
<config>
|
2013-10-14 12:41:39 +00:00
|
|
|
<preservation name="RAM" quantum="16M" />
|
2016-02-09 07:01:40 +00:00
|
|
|
<vfs>
|
|
|
|
<dir name="subsystems">
|
|
|
|
<inline name="noux.subsystem">
|
|
|
|
<subsystem name="noux" help="VIM executed in the noux runtime">
|
|
|
|
<resource name="RAM" quantum="16M" />
|
|
|
|
<config>
|
|
|
|
<fstab> <tar name="vim.tar" /> </fstab>
|
|
|
|
<start name="/bin/vim">
|
2018-04-03 14:46:04 +00:00
|
|
|
<env name="TERM" value="screen" />
|
2016-02-09 07:01:40 +00:00
|
|
|
|
|
|
|
<!-- Deactivate the loading of plugins. Otherwise, vim will
|
|
|
|
attempt to use a sub shell for pattern matching -->
|
|
|
|
<arg value="--noplugin" />
|
|
|
|
|
|
|
|
<!-- Do not use swap file. Any attempt to create of would
|
|
|
|
fail because we are on a read-only file system -->
|
|
|
|
<arg value="-n" />
|
|
|
|
|
|
|
|
<!-- Use the nocompatible mode, which is much nicer than
|
|
|
|
the plain vi mode -->
|
|
|
|
<arg value="-N" />
|
|
|
|
|
|
|
|
<!-- Permanently display status bar -->
|
|
|
|
<arg value="--cmd" />
|
|
|
|
<arg value="set laststatus=2" />
|
|
|
|
|
|
|
|
<!-- Enable highlighted search results -->
|
|
|
|
<arg value="--cmd" />
|
|
|
|
<arg value="set hls" />
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
</subsystem>
|
|
|
|
</inline>
|
|
|
|
<inline name="ram_eater.subsystem">
|
|
|
|
<subsystem name="ram_eater" help="resource-yield test program">
|
|
|
|
<resource name="RAM" quantum="25M" />
|
|
|
|
<binary name="test-resource_yield" />
|
|
|
|
<config child="yes" expand="yes" period_ms="100" />
|
|
|
|
</subsystem>
|
|
|
|
</inline>
|
|
|
|
<inline name="signal.subsystem">
|
|
|
|
<subsystem name="signal" help="signalling test program">
|
|
|
|
<resource name="RAM" quantum="5M" />
|
|
|
|
<binary name="test-signal" />
|
|
|
|
</subsystem>
|
|
|
|
</inline>
|
|
|
|
</dir>
|
|
|
|
</vfs>
|
2013-02-21 10:44:46 +00:00
|
|
|
</config>
|
|
|
|
<route>
|
|
|
|
<any-service> <child name="terminal_mux" /> <any-child/> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
|
|
|
# generic modules
|
|
|
|
set boot_modules {
|
2013-04-05 13:08:10 +00:00
|
|
|
core init timer ld.lib.so noux terminal_mux terminal_log
|
2017-05-14 19:55:57 +00:00
|
|
|
test-signal cli_monitor test-resource_yield posix.lib.so
|
2018-04-23 08:49:21 +00:00
|
|
|
libc.lib.so vfs.lib.so libm.lib.so libc_noux.lib.so libc_terminal.lib.so ncurses.lib.so
|
2017-05-08 11:08:52 +00:00
|
|
|
vim.tar uart_drv
|
2013-02-21 10:44:46 +00:00
|
|
|
}
|
|
|
|
|
2013-03-21 14:50:32 +00:00
|
|
|
set fiasco_serial_esc_arg ""
|
|
|
|
|
2013-02-21 10:44:46 +00:00
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
2013-03-21 14:50:32 +00:00
|
|
|
append qemu_args " -nographic "
|
|
|
|
|
|
|
|
#
|
2017-05-08 11:08:52 +00:00
|
|
|
# On all kernels, we write the core debug output to the kdb.log file,
|
2013-03-21 14:50:32 +00:00
|
|
|
# and use qemu's stdio as the UART used by terminal_mux.
|
|
|
|
#
|
2017-05-08 11:08:52 +00:00
|
|
|
append qemu_args " -serial file:kdb.log "
|
2013-03-21 14:50:32 +00:00
|
|
|
append qemu_args " -serial mon:stdio"
|
2013-02-21 10:44:46 +00:00
|
|
|
|
|
|
|
run_genode_until forever
|