Article 5HCHE Accepting User Input from UART debug Console in a service during booting

Accepting User Input from UART debug Console in a service during booting

by
tigerdxy
from LinuxQuestions.org on (#5HCHE)
Hi,
I have Kernel Version: 4.19.50-ti-r20
running debian buster.
The Console is UART0 port linked to /dev/ttyS0:
crw------- 1 debian tty 4, 64 Jul 7 17:19 /dev/ttyS0

I try to accept user input from the ttyS0 during booting process in a service script.
I followed steps in outlined in the link:
https://alan-mushi.github.io/2014/10...h-systemd.html
But not working. It seems to me that ttyS0 is not redirected to TTYPath=/dev/tty2. I also tried chvt 13

//=== ncu-install.service
[Unit]
Description=NCU Installation
After=network.target sshd.service systemd-logind.service getty@tty2.service
[Service]
Type=oneshot
TTYPath=/dev/tty2
ExecStartPre=/bin/chvt 13
ExecStart=/ncu_install/ncu_install.sh
ExecStartPost=/bin/chvt 1
StandardInput=tty
TTYVHangup=yes
TTYReset=yes
TTYVTDisallocate=yes
#RemainAfterExit=no
[Install]
WantedBy=default.target
RequiredBy=sshd.service systemd-logind.service getty@tty1.service

//=====
They are not working.
Anything I missed?
Thank You,
Davidlatest?d=yIl2AUoC8zA latest?i=qu-NhLR8keE:eJ29XIUS6R0:F7zBnMy latest?i=qu-NhLR8keE:eJ29XIUS6R0:V_sGLiP latest?d=qj6IDK7rITs latest?i=qu-NhLR8keE:eJ29XIUS6R0:gIN9vFwqu-NhLR8keE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments