os: rename uart_drv unambigously (ref #2190)

This commit is contained in:
Stefan Kalkowski 2019-05-03 16:23:51 +02:00 committed by Christian Helmuth
parent e6f83d4df2
commit 4e6b571a36
14 changed files with 34 additions and 223 deletions

View File

@ -4,6 +4,8 @@
# \date 2013-02-20
#
assert_spec x86
#
# On Linux, we don't have a UART driver, on which this run script depends.
#
@ -40,7 +42,7 @@ append config {
<provides><service name="Timer"/></provides>
<route> <any-service> <parent/> </any-service> </route>
</start>
<start name="uart_drv">
<start name="pc_uart_drv">
<resource name="RAM" quantum="1M"/>
<provides>
<service name="Uart"/>
@ -57,7 +59,8 @@ append config {
<service name="Terminal"/>
</provides>
<route>
<any-service> <child name="uart_drv" /> <parent/> <any-child /> </any-service>
<service name="Terminal"> <child name="pc_uart_drv" /> </service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>
<start name="terminal_log">
@ -66,7 +69,8 @@ append config {
<service name="LOG"/>
</provides>
<route>
<any-service> <child name="terminal_mux" /> <parent/> <any-child/> </any-service>
<service name="Terminal"> <child name="terminal_mux" /> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="cli_monitor">
@ -141,7 +145,7 @@ set boot_modules {
core init timer ld.lib.so noux terminal_mux terminal_log
test-signal cli_monitor test-resource_yield posix.lib.so
libc.lib.so vfs.lib.so libm.lib.so libc_noux.lib.so libc_terminal.lib.so ncurses.lib.so
vim.tar uart_drv
vim.tar pc_uart_drv
}
set fiasco_serial_esc_arg ""

View File

@ -39,7 +39,7 @@ set config {
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="uart_drv">
<start name="panda_uart_drv">
<resource name="RAM" quantum="1M"/>
<provides><service name="Terminal"/></provides>
<config>
@ -62,7 +62,7 @@ install_config $config
# generic modules
set boot_modules {
core ld.lib.so init
timer uart_drv test-terminal_echo
timer panda_uart_drv test-terminal_echo
}
build_boot_image $boot_modules

View File

@ -2,6 +2,8 @@
# Build
#
assert_spec pbxa9
# generic components
set build_components {
core init timer
@ -37,7 +39,7 @@ set config {
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="uart_drv">
<start name="pbxa9_uart_drv">
<resource name="RAM" quantum="1M"/>
<provides>
<service name="Uart"/>
@ -69,7 +71,7 @@ install_config $config
# generic modules
set boot_modules {
core ld.lib.so init
timer uart_drv test-uart
timer pbxa9_uart_drv test-uart
}
build_boot_image $boot_modules

View File

@ -1,3 +1,4 @@
REQUIRES = arndale
TARGET = arndale_uart_drv
REQUIRES = arm_v7
include $(REP_DIR)/src/drivers/uart/target.inc

View File

@ -1,3 +1,4 @@
REQUIRES = panda
TARGET = panda_uart_drv
REQUIRES = arm_v7
include $(REP_DIR)/src/drivers/uart/target.inc

View File

@ -1,3 +1,4 @@
REQUIRES = pbxa9
TARGET = pbxa9_uart_drv
REQUIRES = arm_v7
include $(REP_DIR)/src/drivers/uart/target.inc

View File

@ -1,3 +1,4 @@
TARGET = pc_uart_drv
REQUIRES = x86
include $(REP_DIR)/src/drivers/uart/target.inc

View File

@ -1,4 +1,3 @@
TARGET = uart_drv
SRC_CC = main.cc
LIBS = base

View File

@ -12,6 +12,8 @@
# 'tcp_terminal' could be used (to attach GDB via a network connection).
#
assert_spec x86
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_interactive_pkg] \
@ -49,7 +51,7 @@ install_config {
<provides> <service name="Timer"/> </provides>
</start>
<start name="uart_drv">
<start name="pc_uart_drv">
<resource name="RAM" quantum="1M"/>
<provides>
<service name="Uart"/>
@ -111,7 +113,7 @@ proc binary_name_gdbserver_platform_lib_so { } {
# generic modules
build_boot_image {
libc.lib.so vfs.lib.so libc_pipe.lib.so
uart_drv
pc_uart_drv
gdb_monitor gdbserver_platform.lib.so
}

View File

@ -55,7 +55,7 @@ set config {
<resource name="RAM" quantum="2M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="uart_drv">
<start name="pc_uart_drv">
<resource name="RAM" quantum="2M"/>
<provides>
<service name="Terminal"/>
@ -97,7 +97,7 @@ proc binary_name_gdbserver_platform_lib_so { } {
set boot_modules {
core init timer
ld.lib.so libc.lib.so vfs.lib.so libm.lib.so libc_pipe.lib.so
uart_drv posix.lib.so
pc_uart_drv posix.lib.so
gdb_monitor gdbserver_platform.lib.so test-gdb_monitor
}

View File

@ -5,6 +5,8 @@
# \date 2011-05-24
#
assert_spec x86
#
# Build
#
@ -46,7 +48,7 @@ set config {
<resource name="RAM" quantum="2M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="uart_drv">
<start name="pc_uart_drv">
<resource name="RAM" quantum="2M"/>
<provides> <service name="Terminal"/> </provides>
<config>
@ -83,10 +85,8 @@ proc binary_name_gdbserver_platform_lib_so { } {
# generic modules
set boot_modules {
core init timer
ld.lib.so libc.lib.so vfs.lib.so libm.lib.so posix.lib.so
libc_pipe.lib.so
uart_drv
pc_uart_drv
gdb_monitor gdbserver_platform.lib.so test-gdb_monitor
}

View File

@ -4,6 +4,7 @@
# \date 2012-04-16
#
assert_spec x86
#
# Build
#
@ -45,7 +46,7 @@ set config {
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="uart_drv">
<start name="pc_uart_drv">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Terminal"/> </provides>
<config>
@ -85,7 +86,7 @@ proc binary_name_gdbserver_platform_lib_so { } {
set boot_modules {
core init timer
ld.lib.so libc.lib.so vfs.lib.so libc_pipe.lib.so
uart_drv
pc_uart_drv
gdb_monitor gdbserver_platform.lib.so test-gdb_monitor_target_config
}

View File

@ -1,101 +0,0 @@
if {[have_spec linux]} {
puts "\nLinux not supported because of missing UART driver\n"
exit 0
}
set build_components {
core init timer drivers/uart
noux lib/libc_noux
server/ram_fs test/libc_noux
}
build $build_components
# create tar archive
exec tar cfv bin/libc_noux.tar -h -C bin test-libc_noux
create_boot_directory
append config {
<config verbose="yes">
<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>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="uart_drv">
<resource name="RAM" quantum="1M"/>
<provides><service name="Terminal"/></provides>
<config>
<policy label_prefix="noux" uart="1"/>
</config>
</start>
<start name="ram_fs">
<resource name="RAM" quantum="10M"/>
<provides><service name="File_system"/></provides>
<config>
<!-- constrain sessions according to their labels -->
<policy label="noux -> root" root="/" writeable="yes"/>
</config>
</start>
<start name="noux">
<resource name="RAM" quantum="1G" />
<config>
<fstab>
<tar name="libc_noux.tar" />
<fs label="root" />
</fstab>
<start name="/test-libc_noux" />
</config>
</start>
</config>
}
install_config $config
#
# Boot modules
#
# generic modules
set boot_modules {
core init timer uart_drv ram_fs noux
ld.lib.so libc.lib.so vfs.lib.so libc_noux.lib.so posix.lib.so
libc_noux.tar
}
build_boot_image $boot_modules
#
# Redirect the output of Noux via the virtual serial port 1 into a file to be
# dumped after the successful completion of the test.
#
set noux_output_file "noux_output.log"
append qemu_args " -nographic"
append qemu_args " -serial mon:stdio"
append qemu_args " -serial file:$noux_output_file"
run_genode_until "child.*exited.*\n" 20
set output [exec cat $noux_output_file]
puts $output
exec rm bin/libc_noux.tar
exec rm $noux_output_file
grep_output "test finished"
compare_output_to "test finished"

View File

@ -1,100 +0,0 @@
set build_components {
core init timer drivers/uart
noux
test/noux_signals
}
build $build_components
# create tar archive
exec tar cfv bin/noux_signals.tar -h -C bin test-noux_signals
create_boot_directory
append config {
<config verbose="yes">
<parent-provides>
<service name="ROM"/>
<service name="LOG"/>
<service name="RM"/>
<service name="CPU"/>
<service name="PD"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
</parent-provides>
<default-route>
<any-service> <any-child/> <parent/> </any-service>
</default-route>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="uart_drv">
<resource name="RAM" quantum="2M"/>
<provides><service name="Terminal"/></provides>
<config>
<policy label_prefix="noux" uart="1"/>
</config>
</start>
<start name="noux">
<resource name="RAM" quantum="1G"/>
<config verbose="yes">
<fstab> <tar name="noux_signals.tar" /> </fstab>
<start name="test-noux_signals"> </start>
</config>
</start>
</config>
}
install_config $config
set boot_modules {
core init timer ld.lib.so noux libc.lib.so vfs.lib.so posix.lib.so
uart_drv libc_noux.lib.so noux_signals.tar
}
build_boot_image $boot_modules
#
# Redirect the LOG session output of Noux into a file
#
set noux_output_file "noux_signals.log"
append qemu_args " -nographic"
append qemu_args " -serial file:$noux_output_file"
append qemu_args " -serial mon:stdio"
run_genode_until "test ready" 10
# send Ctrl-C
send \003
run_genode_until "test finished" 10 $spawn_id
set error_occured 0
if {![regexp {0: signal handler for signal 2 called} $output]} {
set error_occured 1
}
if {![regexp {1: signal handler for signal 2 called} $output]} {
set error_occured 1
}
if {![regexp {0: 'read\(\)' returned with error EINTR} $output]} {
set error_occured 1
}
if {![regexp {1: 'read\(\)' returned with error EINTR} $output]} {
set error_occured 1
}
if { $error_occured == 1 } {
puts "output not as expected"
exit -1
}
exec rm bin/noux_signals.tar
exec rm $noux_output_file