From 981a7b1007307f2d63a33d98f92ba308463c49c6 Mon Sep 17 00:00:00 2001 From: kszaq Date: Mon, 26 Sep 2016 16:12:15 +0200 Subject: [PATCH] projects/WeTek: add serial console service --- .../lib/systemd/system/serial-console.service | 22 +++++++++++++++++++ .../lib/systemd/system/serial-console.service | 21 ++++++++++++++++++ .../lib/systemd/system/serial-console.service | 22 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 projects/WeTek_Core/filesystem/usr/lib/systemd/system/serial-console.service create mode 100644 projects/WeTek_Hub/filesystem/usr/lib/systemd/system/serial-console.service create mode 100644 projects/WeTek_Play/filesystem/usr/lib/systemd/system/serial-console.service 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