History log of /openbmc/obmc-console/console-server.c (Results 1 – 25 of 74)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# a6b29104 10-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

console-server: Add UART Mux Support

This commit adds support for uart-muxes which can be controlled via
gpios.

Change-Id: I91a4de1962554adf4302a2a59d2b371f492dc21d
Signed-off-by: Alexander Hansen

console-server: Add UART Mux Support

This commit adds support for uart-muxes which can be controlled via
gpios.

Change-Id: I91a4de1962554adf4302a2a59d2b371f492dc21d
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 312ecdc2 10-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

console-server: Enable multiple consoles

obmc-console can now support multiple consoles that can be configured.

The first console is the active console, if not configured otherwise.

This serves as

console-server: Enable multiple consoles

obmc-console can now support multiple consoles that can be configured.

The first console is the active console, if not configured otherwise.

This serves as preparation for uart mux support.

Change-Id: I6f350b8efe70c3b424bdadaa3fe1bbf89d310e5d
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 2325d5d5 07-Jun-2024 Alexander Hansen <alexander.hansen@9elements.com>

console-server: refactor pollfd management

Instead of the previous memory management of pollfd array,
with a fixed and flexible part and hardcoded indices,
provide two functions to request and relea

console-server: refactor pollfd management

Instead of the previous memory management of pollfd array,
with a fixed and flexible part and hardcoded indices,
provide two functions to request and release pollfds.

- console_server_request_pollfd
- console_server_release_pollfd

The pollfds are still in the same array but can be requested and
released by these functions now. struct console_server and
struct console now contain indices into that array of pollfds.

The benefit of this contribution is that the new interface provides a
clean allocator-like abstraction for requesting and releasing pollfds,
which will scale to multiple consoles and can be refactored or
unit-tested more easily in the future.

The previous implementation was tightly coupled to the single-console
use-case and the pollfds stored at hardcoded indices.

Change-Id: I93226699618130b175bffbeb4f71c20c91a7083a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# c2b0d8c7 07-Jun-2024 Alexander Hansen <alexander.hansen@9elements.com>

console-server: introduce `struct console_server`

Lift `struct console_server` from `struct console`

struct console_server will enable obmc-console to support multiple
consoles in a single obmc-con

console-server: introduce `struct console_server`

Lift `struct console_server` from `struct console`

struct console_server will enable obmc-console to support multiple
consoles in a single obmc-console-server in the future.

Currently the 'struct console_server' only supports one active console.

Change-Id: Icb22fb46f217b174f3bccc0a03485549d82d1d6b
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# adedc333 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

console-server: Enable handler iteration with -fsanitize=address

Currently when running obmc-console-server built with -fsanitize=address
we receive the following abort:

```
$ dbus-run-session ./bu

console-server: Enable handler iteration with -fsanitize=address

Currently when running obmc-console-server built with -fsanitize=address
we receive the following abort:

```
$ dbus-run-session ./build/obmc-console-server -i test $(realpath pts)
iniparser: cannot open etc/obmc-console.conf
3 handler types
obmc-console-server: Can't open log buffer file /var/local/log/obmc-console.log: No such file or directory
console 'test': handler log [inactive]
=================================================================
==724703==ERROR: AddressSanitizer: global-buffer-overflow on address 0x559163200b08 at pc 0x5591631e6d08 bp 0x7ffdb2e64350 sp 0x7ffdb2e64348
READ of size 8 at 0x559163200b08 thread T0
#0 0x5591631e6d07 in handlers_init ../console-server.c:560
#1 0x5591631e6d07 in main ../console-server.c:1025
#2 0x7f8e3f446249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#3 0x7f8e3f446304 in __libc_start_main_impl ../csu/libc-start.c:360
#4 0x5591631e7390 in _start (/home/andrew/src/openbmc.org/openbmc/obmc-console/build/obmc-console-server+0x26390)

0x559163200b08 is located 24 bytes to the left of global variable 'socket_handler' defined in '../socket-handler.c:515:34' (0x559163200b20) of size 32
0x559163200b08 is located 8 bytes to the right of global variable 'log_handler' defined in '../log-handler.c:222:34' (0x559163200ae0) of size 32
SUMMARY: AddressSanitizer: global-buffer-overflow ../console-server.c:560 in handlers_init
Shadow bytes around the buggy address:
0x0ab2ac638110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab2ac638120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab2ac638130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab2ac638140: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00
0x0ab2ac638150: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00
=>0x0ab2ac638160: f9[f9]f9 f9 00 00 00 00 f9 f9 f9 f9 00 00 00 00
0x0ab2ac638170: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab2ac638180: 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
0x0ab2ac638190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ab2ac6381a0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
0x0ab2ac6381b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==724703==ABORTING
```

Rework the start and stop symbol declarations to indicate we're
accessing an array, which keeps the sanitizer happy.

Change-Id: Ib17506a018702e64bbc419f0056da571847e2787
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 28a1761a 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

console-server: Avoid SEGV on on failure to load configuration

On a system without a file at the default configuration path we hit
a SEGV:

```
$ ./build/obmc-console-server -i test $(realpath pts)

console-server: Avoid SEGV on on failure to load configuration

On a system without a file at the default configuration path we hit
a SEGV:

```
$ ./build/obmc-console-server -i test $(realpath pts)
obmc-console-server: Can't open configuration file etc/obmc-console.conf: No such file or directory
../config.c:56:48: runtime error: member access within null pointer of type 'struct config'
AddressSanitizer:DEADLYSIGNAL
=================================================================
==693793==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55be18aa0d76 bp 0x7ffe1f8a5640 sp 0x7ffe1f8a53a0 T0)
==693793==The signal is caused by a READ memory access.
==693793==Hint: address points to the zero page.
#0 0x55be18aa0d76 in config_get_value ../config.c:56
#1 0x55be18a9e10e in main ../console-server.c:985
#2 0x7f80bd046249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#3 0x7f80bd046304 in __libc_start_main_impl ../csu/libc-start.c:360
#4 0x55be18aa0be0 in _start (/home/andrew/src/openbmc.org/openbmc/obmc-console/build/obmc-console-server+0x25be0)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../config.c:56 in config_get_value
==693793==ABORTING
```

Rework the cleanup sequence in main() to avoid the problem.

Change-Id: I6cbea10889d65666d660ee198c4ad6f6935fea85
Fixes: 1e04f449b7f0 ("use iniparser dependency for config file parsing")
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 1e04f449 12-Jun-2024 Alexander Hansen <alexander.hansen@9elements.com>

use iniparser dependency for config file parsing

For the config file, we do not need the custom handwritten parser.

Thanks to Andrew for this command, we can now search for an alternative

$ git gr

use iniparser dependency for config file parsing

For the config file, we do not need the custom handwritten parser.

Thanks to Andrew for this command, we can now search for an alternative

$ git grep -lw INI -- :/:*.bb
meta-openembedded/meta-oe/recipes-support/inih/libinih_58.bb
meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.1.bb
meta-openembedded/meta-oe/recipes-support/minini/minini_1.2.b.bb
poky/meta/recipes-devtools/python/python3-iniconfig_2.0.0.bb
poky/meta/recipes-devtools/python/python3-iniparse_0.5.bb

For the ini parser we have following requirements

- small API
- easy to use
- compiles fast
- has tests, examples, docs
- support for sections

- minini [1]

can be dropped from the list since it also supports colon
':' instead of '=' for separating key and value, creating 2 ways of
doing something. This makes it harder to swap out the ini parser in
the future.

- libinih [2]

uses SAX-style parsing of .ini files and thus does not provide
a DOM of the .ini. This is a break from the previous parser which
stored everything in struct config. To use this library would require
to create a struct to store all the possible configuration, then fill
that struct in one pass. Essentially wrapping that library to have
DOM capability. That would be possible, but not ideal. libinih is also
highly configurable with lots of config options.

- iniparser [3]

has all the required features and stores the results of its
parsing for later use. It is a seamless upgrade from the previous
parser. The call sites do not have to be modified and we can read the
config as before. A downside is that we have to provide our own wrap
file.

For our purposes, iniparser is a good choice.

Using this dependency allows us to drop the custom parser and all the
tests that go along with it.

If sections are required in future config files, iniparser can also
support that.

References:

[1] https://github.com/compuphase/minIni
[2] https://github.com/benhoyt/inih
[3] https://gitlab.com/iniparser/iniparser

Change-Id: Ie2b57171ec1f8cb6b1b80ca1d9e6c112bedc1195
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 498a4a81 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

console-server: Respect DBus init failure

Given that the DBus interface is required by other OpenBMC applications,
don't ignore a failure to initialize it.

It's always possible to add a switch down

console-server: Respect DBus init failure

Given that the DBus interface is required by other OpenBMC applications,
don't ignore a failure to initialize it.

It's always possible to add a switch down the track to avoid
initializing the DBus interfaces, if desired.

Change-Id: I8aecf1a1cb06d021f374eaf0fd6893ddf3a9cc3c
Co-developed-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 7851a396 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

obmc-console: Address more instances of realloc() with size 0

There are some portability concerns around the behavior of passing
a zero size to realloc*() APIs. One instance caught by valgrind was
f

obmc-console: Address more instances of realloc() with size 0

There are some portability concerns around the behavior of passing
a zero size to realloc*() APIs. One instance caught by valgrind was
fixed in 2f1abc37384d ("Fix realloc() with size 0"). All invocations of
realloc*() APIs were evaluated, and those fixed here are the ones that
were at risk.

There's a broader problem of the code-base assuming realloc*() calls
don't return NULL (and malloc() also). The returned pointer is usually
written into the pointer object passed as the first argument, which
means the existing object would be leaked. Fixing that is a bigger
endeavor as the callers of the functions invoking realloc*() are often
written with the assumption that the result is not NULL. However, with
this change, at least one of the realloc*() concerns is put to rest.

Change-Id: I5dd6f4f8cc3164e400c87ea37afc350840a1865d
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 9cc8459a 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

console-server: Clear poller timeout on init

Avoid spurious results in the poller calculations from uninitialized
values.

Reported-by: Alexander Hansen <alexander.hansen@9elements.com>
Co-developed

console-server: Clear poller timeout on init

Avoid spurious results in the poller calculations from uninitialized
values.

Reported-by: Alexander Hansen <alexander.hansen@9elements.com>
Co-developed-by: Alexander Hansen <alexander.hansen@9elements.com>
Change-Id: Ic84371d43ebb062a815b7dd0ebae518c374cde59
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 553cb663 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

console-server: Define static sigint object as `volatile sig_atomic_t`

The C language defines that access to any other type, of static storage
duration, in a signal handler, yields undefined-behavio

console-server: Define static sigint object as `volatile sig_atomic_t`

The C language defines that access to any other type, of static storage
duration, in a signal handler, yields undefined-behavior. Avoid the
problem given that compilers like to assume undefined behavior doesn't
occur.

Change-Id: I3cd37d7933c6c759aa52b11e3fdbecfe07e25981
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 982090d9 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

console-server: Fix leak of TTY sysfs dev node path

Identified by valgrind:

```
==1304== 50 bytes in 1 blocks are definitely lost in loss record 1 of 1
==1304== at 0x4831C14: malloc (vg_replace_

console-server: Fix leak of TTY sysfs dev node path

Identified by valgrind:

```
==1304== 50 bytes in 1 blocks are definitely lost in loss record 1 of 1
==1304== at 0x4831C14: malloc (vg_replace_malloc.c:442)
==1304== by 0x499D10F: strdup (strdup.c:42)
==1304== by 0x4942913: realpath_stk (canonicalize.c:409)
==1304== by 0x4942913: realpath@@GLIBC_2.4 (canonicalize.c:431)
==1304== by 0x109CFF: UnknownInlinedFun (stdlib.h:42)
==1304== by 0x109CFF: UnknownInlinedFun (console-server.c:143)
==1304== by 0x109CFF: UnknownInlinedFun (console-server.c:359)
==1304== by 0x109CFF: main (console-server.c:1000)
```

Change-Id: I614ef9f36d59587c6a633d679d0997136ab29bf3
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 3f8d5beb 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

console-server: Call ringbuffer_fini() to mitigate leak report

Running obmc-console-server under valgrind yields:

```
==256429== 131,112 bytes in 1 blocks are definitely lost in loss record 2 of 2

console-server: Call ringbuffer_fini() to mitigate leak report

Running obmc-console-server under valgrind yields:

```
==256429== 131,112 bytes in 1 blocks are definitely lost in loss record 2 of 2
==256429== at 0x48407B4: malloc (vg_replace_malloc.c:381)
==256429== by 0x10F3FC: ringbuffer_init (ringbuffer.c:33)
==256429== by 0x10E61E: main (console-server.c:984)
```

Add the missing call to ringbuffer_fini() in the exit path.

Change-Id: I39b9a652a0565de73446f5ec7bfeac4bbc2281d8
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 079fc516 09-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

console-server: Fix printf() format string for discovered handlers

GCC reports the following on ARM:

```
../../../../../../workspace/sources/obmc-console/console-server.c: In function 'handlers_ini

console-server: Fix printf() format string for discovered handlers

GCC reports the following on ARM:

```
../../../../../../workspace/sources/obmc-console/console-server.c: In function 'handlers_init':
../../../../../../workspace/sources/obmc-console/console-server.c:549:19: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
549 | printf("%ld handler type%s\n", n_types, n_types == 1 ? "" : "s");
| ~~^ ~~~~~~~
| | |
| long int size_t {aka unsigned int}
| %d
```

Change-Id: Ib40f2e0576588d8dbd6fd38c4e969a1749c18538
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# e2826c7d 04-Jul-2024 Jeremy Kerr <jk@codeconstruct.com.au>

console-server: allow separate handler instances

Currently, each handler (socket-handler, tty-handler and log-handler)
provides a statically-allocated instance of a handler, which gets
initialized f

console-server: allow separate handler instances

Currently, each handler (socket-handler, tty-handler and log-handler)
provides a statically-allocated instance of a handler, which gets
initialized for a console through the ->init callback.

We have upcoming changes that may create more than one console object,
in which case means we will need multiple instances of each handler
type.

This change splits the handler type from the handler instance; the
former is now struct handler_type, with struct handler being the
instance. Handler modules define a (const) struct handler_type, and
->init() now returns a newly-allocated instance of a handler of that
type.

This allows multiple handlers of each type.

Because the handler instances are allocated by type->init, we now
require both ->init and ->fini to be present on registered handlers.

We no longer need the `bool active` member of the handler, as instances
are always active.

Change-Id: Id97f15bd6445e17786f5883b849de8559c5ea434
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>

show more ...


# 6925740d 07-Jun-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor run_console: extract function

run_console has a loop that contains a lot of code and causes
unnecessary indentation. This can be extracted into a separate function,
which makes it more read

Refactor run_console: extract function

run_console has a loop that contains a lot of code and causes
unnecessary indentation. This can be extracted into a separate function,
which makes it more readable.

replace 'break' -> 'return -1'
replace 'continue' -> 'return 0'

Based on the return value of run_console_iteration, the loop can break
or continue as before.

The behavior should be the same.

Change-Id: I46337c49a559d326206ab7e7cce9c6a83f2550b9
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 7f2bfb9b 11-Mar-2024 Medicine Yeh <medicinehy@gmail.com>

config: add ringbuffer-size in config file options

Enable fine-tuning the memory usage by assigning ringbuffer size by
setting ringbuffer-size in the config file.

Change-Id: I2425e4297aadbb528598ac

config: add ringbuffer-size in config file options

Enable fine-tuning the memory usage by assigning ringbuffer size by
setting ringbuffer-size in the config file.

Change-Id: I2425e4297aadbb528598ac9bc80840774a117a03
Signed-off-by: Medicine Yeh <medicinehy@gmail.com>

show more ...


# 955d140e 27-Sep-2023 Oskar Senft <osk@google.com>

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 sto

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>

show more ...


# 7dc08baa 12-Sep-2023 Zev Weiss <zev@bewilderbeest.net>

config: Add support for aspeed-uart-routing config directive

It accepts one or more words of the form SINK:SOURCE, where SOURCE is
written to the file SINK in the aspeed-uart-routing driver's sysfs

config: Add support for aspeed-uart-routing config directive

It accepts one or more words of the form SINK:SOURCE, where SOURCE is
written to the file SINK in the aspeed-uart-routing driver's sysfs
directory (they are thus expected to be things like "uart1", "uart2",
"io1", etc.).

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Iacbc524340e4b73f3d122bc77670eedb3957a858

show more ...


Revision tags: v1.1.0
# 7c02ae1e 05-Jun-2023 Andrew Jeffery <andrew@aj.id.au>

console-server: Use correct attribute name in VUART test

The test was looking for a sysfs attribute named `lpc_addr`, but the
attribute actually exposed is `lpc_address`:

https://git.kernel.org/pub

console-server: Use correct attribute name in VUART test

The test was looking for a sysfs attribute named `lpc_addr`, but the
attribute actually exposed is `lpc_address`:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/stable/sysfs-driver-aspeed-vuart?h=v6.3#n1

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ifaa2687385c53d847d79803a4bb7cf77054a7dde

show more ...


# 5ba20b5b 12-May-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

obmc-console: Consolidate handling of default socket-id

If console-id is not specified on command line or in the config file
then use the default value. ae2460d0b8e8 ("obmc-console: Provide a
defaul

obmc-console: Consolidate handling of default socket-id

If console-id is not specified on command line or in the config file
then use the default value. ae2460d0b8e8 ("obmc-console: Provide a
default value for `console-id`.") only implemented the default value for
naming the abstract listening socket and overlooked the new DBus path
naming convention. This caused issues during dbus registration:

```
obmc-console-server: Object name: /xyz/openbmc_project/console/(null)
obmc-console-server: Failed to issue method call: Invalid argument
```

Fixes: ae2460d0b8e8 ("obmc-console: Provide a default value for `console-id`.")
Change-Id: I6d0f7b23cc085992189cd4463129a6aae590b3e7
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# 4e44c790 12-May-2023 Andrew Jeffery <andrew@aj.id.au>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I1617773783af90585a0ff753b6fa548d614f4d09

show more ...


# ae2460d0 09-May-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Provide a default value for `console-id`.

4e7186918599 ("Fixed broken dbus interface for multiple consoles")
introduced the requirement that `console-id` be specified in the
configurat

obmc-console: Provide a default value for `console-id`.

4e7186918599 ("Fixed broken dbus interface for multiple consoles")
introduced the requirement that `console-id` be specified in the
configuration files for both the client and server. It was paired with a
fix to platform configurations in the OpenBMC bitbake metadata[1]. In
theory this should have worked, but because specifying `console-id`
wasn't a requirement, not all platforms supplied a client configuration.
Instead they relied on the default behaviour.

[1]: https://gerrit.openbmc.org/c/openbmc/openbmc/+/62712

Remove the requirement that a `console-id` be specified and instead
provide a default value that can be overridden by configuration. This
carries forward the consequence from 4e7186918599 ("Fixed broken dbus
interface for multiple consoles") that the original `\0obmc-console`
abstract socket will never be created. This doesn't resolve the break in
ipmid or bmcweb, but resolves the break to SSH-based SOL on platforms
not supplying client configuration files for one of their consoles.

The fix to bmcweb (whose strategy can also be applied to ipmid) is
currently being prototyped[2].

[2]: https://discord.com/channels/775381525260664832/1083551792094249051/1103867159412752424

A deeper treatment of the problems, impacts, and solutions is provided
in [3].

[3]: https://amboar.github.io/notes/2023/05/08/happenings-in-obmc-console.html

Fixes: 4e7186918599 ("Fixed broken dbus interface for multiple consoles")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I970578f1b695f729f6524c4da6bba6e89bf14d52

show more ...


# ba2af969 02-May-2023 Andrew Jeffery <andrew@aj.id.au>

console-server: Don't require a configuration file

Not requiring a configuration file makes it marginally less irritating
to test obmc-console-server.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au

console-server: Don't require a configuration file

Not requiring a configuration file makes it marginally less irritating
to test obmc-console-server.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ibdf898933284bb4028861d25640bea3c58fb05bf

show more ...


# 954be0fb 03-May-2023 Andrew Jeffery <andrew@aj.id.au>

console-server: Add --console-id option

Allow specification of the console-id on the command-line. Specification
on the command line takes precedence over the value in the configuration
file.

Signe

console-server: Add --console-id option

Allow specification of the console-id on the command-line. Specification
on the command line takes precedence over the value in the configuration
file.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia143e997b9f5386493564aa92e44e2813173e238

show more ...


123