[systemd-devel] Output boot status, etc to LCD display

Lennart Poettering lennart at poettering.net
Wed Aug 13 12:26:37 PDT 2014


On Wed, 13.08.14 21:16, John Obaterspok (john.obaterspok at gmail.com) wrote:

> 
> 2014-08-13 21:02 GMT+02:00 Lennart Poettering <lennart at poettering.net>:
> >
> > How do you access it? If it's just a TTY, then you could use
> > journald.conf's TTYPath= with ForwardToConsole= and MaxLevelConsole= to
> > accomplish that...
> 
> The script does this: [$1 = row 1 or 2, $2 = text to set]
> 
> stty -F /dev/ttyS1 1200
> printf "M\f\x`expr $1 - 1` %-16s" "$2" > /dev/ttyS1

You could probably script something using socat's "PTY"
transport. i.e. a script that uses socat to allocate a pty, then reads
strings from it, and translates this to the format you need it in... 

If I were you I'd hack that up in C though rather than in shell...

Note that you need to think about buffer with this. Because 1200 baud is
really slow, and you cannot really slow down journald to that, because
journald will actually write synchronously to the TTYPath= you tell
it. So you'd probably have to add something that is smart enough to read
from the pty as quickly as possible and only updates the most recent to
lines into your serial display... 

Otherwise your boot would be slowed down to a crawl...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list