| commit | 955d140e3caafb8a082a094d4fb6ebd2e3d7782a | [log] [tgz] |
|---|---|---|
| author | Oskar Senft <osk@google.com> | Wed Sep 27 22:43:22 2023 -0400 |
| committer | Andrew Jeffery <andrew@codeconstruct.com.au> | Wed Oct 04 01:07:37 2023 +0000 |
| tree | 480465c009cb771fa16cbbdcfc69665016fcac62 | |
| parent | a2a026dc9aa4a99e57271985b799dbb9f49d4419 [diff] |
console-server: Fix config of lpc_address and sirq sysfs attributes
This change fixes console-server to correctly configure lpc_address
and sirq for VUART devices. It modifies tty_find_device to store the
tty_sysfs_devnode path in the new console->tty.vuart.sysfs_devnode
as introduced by commit 30ea6385df2d7c6db6954d41555d667d509ba873.
Tested:
Manually modified the lpc_address and sirq sysfs attributes, then
restarted obmc-console-server. Checked that lpc_address and sirq
got configured to the values from the obmc-console confiugration
file.
Fixes: 30ea6385df2d ("console-server: Add PTY support for testing purposes")
Change-Id: I10b715690d428722f772245618d8aa6f928154f6
Signed-off-by: Oskar Senft <osk@google.com>
To build this project, run the following shell commands:
meson setup build meson compile -C build
To test:
meson test -C build
Running the server requires a serial port (e.g. /dev/ttyS0):
touch obmc-console.conf ./obmc-console-server --config obmc-console.conf ttyS0
To connect to the server, simply run the client:
./obmc-console-client
To disconnect the client, use the standard ~. combination.
This shows how the host UART connection is abstracted within the BMC as a Unix domain socket.
+---------------------------------------------------------------------------------------------+
| |
| obmc-console-client unix domain socket obmc-console-server |
| |
| +----------------------+ +------------------------+ |
| | client.2200.conf | +---------------------+ | server.ttyVUART0.conf | |
+---+--+ +----------------------+ | | +------------------------+ +--------+-------+
Network | 2200 +--> +->+ @obmc-console.host0 +<-+ <--+ /dev/ttyVUART0 | UARTs
+---+--+ | console-id = "host0" | | | | console-id = "host0" | +--------+-------+
| | | +---------------------+ | | |
| +----------------------+ +------------------------+ |
| |
| |
| |
+---------------------------------------------------------------------------------------------+
This supports multiple independent consoles. The console-id is a unique portion for the unix domain socket created by the obmc-console-server instance. The server needs to know this because it needs to know what to name the pipe; the client needs to know it as it needs to form the abstract socket name to which to connect.