diff --git a/projects/WeTek_Core/filesystem/usr/lib/systemd/system/serial-console.service b/projects/WeTek_Core/filesystem/usr/lib/systemd/system/serial-console.service new file mode 100644 index 0000000000..91bf9c9164 --- /dev/null +++ b/projects/WeTek_Core/filesystem/usr/lib/systemd/system/serial-console.service @@ -0,0 +1,22 @@ +[Unit] +Description=Debug Shell on /dev/ttyS0 +DefaultDependencies=no +ConditionKernelCommandLine=|console=ttyS0,115200 +ConditionKernelCommandLine=|console=ttyS0,115200n8 + +[Service] +WorkingDirectory=/storage +Environment="ENV=/etc/profile" +ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"' +ExecStart=/bin/sh +Restart=always +RestartSec=0 +StandardInput=tty +TTYPath=/dev/ttyS0 +KillMode=process +IgnoreSIGPIPE=no +# bash ignores SIGTERM +KillSignal=SIGHUP + +[Install] +WantedBy=sysinit.target diff --git a/projects/WeTek_Hub/filesystem/usr/lib/systemd/system/serial-console.service b/projects/WeTek_Hub/filesystem/usr/lib/systemd/system/serial-console.service new file mode 100644 index 0000000000..e267da5aa6 --- /dev/null +++ b/projects/WeTek_Hub/filesystem/usr/lib/systemd/system/serial-console.service @@ -0,0 +1,21 @@ +[Unit] +Description=Debug Shell on /dev/ttyS0 +DefaultDependencies=no +ConditionKernelCommandLine=console=ttyS0,115200 + +[Service] +WorkingDirectory=/storage +Environment="ENV=/etc/profile" +ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"' +ExecStart=/bin/sh +Restart=always +RestartSec=0 +StandardInput=tty +TTYPath=/dev/ttyS0 +KillMode=process +IgnoreSIGPIPE=no +# bash ignores SIGTERM +KillSignal=SIGHUP + +[Install] +WantedBy=sysinit.target diff --git a/projects/WeTek_Play/filesystem/usr/lib/systemd/system/serial-console.service b/projects/WeTek_Play/filesystem/usr/lib/systemd/system/serial-console.service new file mode 100644 index 0000000000..91bf9c9164 --- /dev/null +++ b/projects/WeTek_Play/filesystem/usr/lib/systemd/system/serial-console.service @@ -0,0 +1,22 @@ +[Unit] +Description=Debug Shell on /dev/ttyS0 +DefaultDependencies=no +ConditionKernelCommandLine=|console=ttyS0,115200 +ConditionKernelCommandLine=|console=ttyS0,115200n8 + +[Service] +WorkingDirectory=/storage +Environment="ENV=/etc/profile" +ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"' +ExecStart=/bin/sh +Restart=always +RestartSec=0 +StandardInput=tty +TTYPath=/dev/ttyS0 +KillMode=process +IgnoreSIGPIPE=no +# bash ignores SIGTERM +KillSignal=SIGHUP + +[Install] +WantedBy=sysinit.target