commit | 9a8f30ec5b58252caeb5b856c353d37df9e4cf4d | [log] [tgz] |
---|---|---|
author | Andrew Jeffery <andrew@aj.id.au> | Tue May 02 13:56:02 2023 +0930 |
committer | Andrew Jeffery <andrew@aj.id.au> | Tue May 09 22:30:25 2023 +0930 |
tree | 9c00e437224af7a7dc8de4399dfd2a727ca5f35b | |
parent | 30ea6385df2d7c6db6954d41555d667d509ba873 [diff] |
obmc-console: Introduce console-id, deprecate socket-id The name `socket-id` exposes too much detail about the implementation. Really the tag identifies the console, so name it as such. Maintain backwards compatibility until we've converted all the in-tree OpenBMC users over to `console-id`. Once that's done we can drop support for `socket-id`. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I5aa2ba84835d64901e459b42bfe7be59043466c7
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.