Closed williamspatrick closed 7 years ago
Yep, I agree we want the dev name available there; we'll need to do a bit of a lookup to turn the (possibly renamed or linked) device node name into a kernel name (ie, as used in sysfs).
Would this make the ttyVUART0 symlink unnecessary?
I don't think it makes the symlink unnecessary. We still have an "unknown" as to which /dev/ttyS* is the VUART without the symlink.
A patch committed to: https://gerrit.openbmc-project.xyz/#/c/826/ @jk-ozlabs , please have a look.
Looks like still needs another +1 and a merge, moving to next sprint.
In openbmc/openbmc#528 it was proposed to use a udev rule to populate a device entry like /dev/ttyVUART0, which is symlink to /dev/ttyS0 (or similar). This allows userspace applications, like obmc-console-server, to in theory be started with a logical name rather than a dynamically allocated device name.
Unfortunately, the current obmc-console-server code expects a sysfs name rather than a dev name: https://github.com/openbmc/obmc-console/blob/master/console-server.c#L95
There is also a 'todo' in the code along these lines: https://github.com/openbmc/obmc-console/blob/master/console-server.c#L114
In order to get console server to work with a dev entry I had to do a fairly hacky systemd unit file change:
ExecStart=/bin/sh -c 'realpath /dev/ttyVUART0 | xargs basename | xargs {sbindir}/obmc-console-server'
Would like obmc-console-server enhanced to support simply 'obmc-console-server ttyVUART0' or similar.