summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-serialgetty.bb
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2020-11-02 14:28:52 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-08 14:03:16 +0000
commit3de72f45135d7c79b43ad25b539f117d040aa246 (patch)
treea7f7cce8982c036148eff24513b0bd19b74da483 /meta/recipes-core/systemd/systemd-serialgetty.bb
parent3743892996172c8595a1cbe884c4a0e6ef50dcda (diff)
downloadopenembedded-core-3de72f45135d7c79b43ad25b539f117d040aa246.tar.gz
systemd-serialgetty: Switch to TERM=linux
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>
Diffstat (limited to 'meta/recipes-core/systemd/systemd-serialgetty.bb')
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty.bb2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
index 0cc0dc8c79..d142b30f7e 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=80
PR = "r5"
SERIAL_CONSOLES ?= "115200;ttyS0"
+SERIAL_TERM ?= "linux"
SRC_URI = "file://serial-getty@.service"
@@ -22,6 +23,7 @@ do_install() {
install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_unitdir}/system/
sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_unitdir}/system/serial-getty@.service
+ sed -i -e "s/\@TERM\@/${SERIAL_TERM}/g" ${D}${systemd_unitdir}/system/serial-getty@.service
tmp="${SERIAL_CONSOLES}"
for entry in $tmp ; do