Age | Commit message (Collapse) | Author |
|
Long ago in commit 473ff65c2f69de4ece3204fadfae7c5cb992149a
(serial-getty service: Add xterm as default TERM), the xterm
became the default for the serial port terminal.
Using the version of vim.tiny in oe-core master with the
serial port connected in xterm version 322 (which is one
of the most widely deployed versions at the current time)
causes artifacts and missed characters.
The example sequence is the following:
* Start vim
* Press "i" to enter input mode
* Type "123"
* Press Escape to enter command mode
* Press "a" to enter append mode
* Type "456"
At this point if you are using xterm less than version 535 you will
see on your screen "12456" instead of "123456".
Changing the TERM variable to "linux" will still allow you to have all
the same functionality with colorization, ansi character escapes
etc..., but will avoid the extra xterm specific escape sequence that
only exists in the most recent versions of xterm.
This patch allows the end user to set the serial terminal type to
something other than the new default of "linux" by changing the
SERIAL_TERM variable in local.conf. For example:
SERIAL_TERM = "xterm"
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This unit was changed from 'BindsTo' in the following commit.
"""
commit f0f359ec9210759f6b4dbfb35d3fba8af208c43a
Author: Jason Wessel <jason.wessel@windriver.com>
Date: Thu Aug 29 07:00:31 2019 -0700
serial-getty@.service: Allow device to fast fail if it does not exist
"""
It was changed back to 'BindTo' in the following commit.
"""
commit 63bbff61b78c651339c4b18d8376187379ec3b3c
Author: Otavio Salvador <otavio.salvador@gmail.com>
Date: Fri Jun 12 14:30:44 2020 -0300
systemd: Sync systemd-serialgetty@.service with upstream
"""
This is now causing runtime problem for qemuarm64. The default.target
is not reached until a timeout. Output is like below.
"""
root@qemuarm64:~# systemd-analyze
Bootup is not yet finished (org.freedesktop.systemd1.Manager.FinishTimestampMonotonic=0).
Please try again later.
Hint: Use 'systemctl list-jobs' to see active jobs
root@qemuarm64:~# systemctl list-jobs
JOB UNIT TYPE STATE
102 getty.target start waiting
1 multi-user.target start waiting
95 systemd-update-utmp-runlevel.service start waiting
110 serial-getty@hvc0.service start waiting
111 dev-hvc0.device start running
"""
We can see that we are waiting for /dev/hvc0, while in fact there's no /dev/hvc0.
Jason's commit actually solves such problem.
So restore to use Jason's method. Do not use 'BindsTo'.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The systemd upstream has been doing some improvements in the service
which were not in sync, with the forked file. Mainly:
- Use BindsTo to bind the service with the required serial device
- Add of getty-pre.target as dependency so we can run things before
getty@.service and serial-getty@.service
- Add conflicts to rescue to avoid issues with sulogin
We did not change the ExecStart and Environment fields so we don't have
side effects of this change.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Some BSPs use a USB serial port which may or may not actually be
plugged all the time. It is quite useful to have a USB serial port
have a getty running but it does not make sense to wait for it for 90
seconds before completing the system startup if it might never get
plugged in. The typical example is that a USB serial device might
only need to be plugged in when debugging, upgrading, or initially
configuring a device.
This change is somewhat subtle. Systemd uses the "BindsTo" directive
to ensure existence of the device in order to start the service as
well as to terminate the service if the device goes away. The "After"
directive makes that same relationship stronger. When used together
this has the undesired side effect that systemd will wait until its
internal time out value of 90 seconds for the device to come on line
before executing a fail operation or letting other tasks and groups
continue. This is certainly the kind of behavior we want for a disk,
but not for serial ports in general.
The "BindsTo" directive is replaced by the combination of the "PartOf"
and the "ConditionPathExists" directives. The "After" directive is
unchanged because that will wait for the udev rules to process. The
"PartOf" directive will issue a stop to the getty service if the
device goes away, similar to the "BindsTo" directive. The
"ConditionPathExists" is what allows the service to fail fast vs
waiting for the timeout. When a USB device is not plugged in at boot
you would find a message in the system journal like:
systemd[1]: Condition check resulted in Serial Getty on \
ttyUSB0 being skipped.
If you want to observe the problem with qemu, it is easy to replicate.
Simply add the following line to your local.conf for a x86-64 qemu
build.
SERIAL_CONSOLES="115200;ttyS0 115200;ttyUSB0"
Login right after the system boots and observe:
root@qemux86-64:~# systemctl list-jobs |cat
JOB UNIT TYPE STATE
1 multi-user.target start waiting
69 serial-getty@ttyUSB0.service start waiting
64 getty.target start waiting
71 dev-ttyUSB0.device start running
62 systemd-update-utmp-runlevel.service start waiting
5 jobs listed.
You can see above that the dev-ttyUSB0.device will block for 1min 30
seconds. While that might not be a problem for this reference build.
It is certainly a problem for images that have software watchdogs that
verify the system booted up all the way to systemd completion in less
than 90 seconds.
This other nice effect of this change is that the fast fail device
extend to additional serial ports that may not exist on ARM BSPs or
that might be configured in or out by the dtb files on different
boards.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In case a getty is required on a UART which is not being
used as the kernel console, the current agetty invocation
fails to obey the baud rate configured through the
SERIAL_CONSOLES variable because it uses --keep-baud.
Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This aligns the params of getty with the ones used in Debian. From the
getty(8) manpage:
,----[ getty(8) manpage ]
| -L, --local-line
|
| Force the line to be a local line with no need for carrier
| detect. This can be useful when you have a locally attached
| terminal where the serial line does not set the carrier detect
| signal.
`----
Reported-by: Craig McQueen <craig.mcqueen@beamcommunications.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
In poky with systemd enabled, vt102 is selected for getty
causing user to experience a very crappy terminal. Default
TERM to xterm.
Reviewed-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Whilst debugging other issues I noticed this was out of sync with the code
in systemd itself. This brings things back into sync and shouldn't hurt
anything.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removed patches integrated upstream.
Added backport of fix for utmp not running at shutdown.
Updated serial-getty service.
Added missing util-linux dependency.
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Add systemd recipes and associated support recipes.
Mostly based on meta-oe/meta-systemd, so almost all credit should go to:
Andreas Müller <schnitzeltony@googlemail.com>
Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Holger Hans Peter Freyther <holger@moiji-mobile.com>
Khem Raj <raj.khem@gmail.com>
Koen Kooi <koen@dominion.thruhere.net>
Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|