diff --git a/projects/imx6/filesystem/usr/lib/systemd/system/serial-console.service b/projects/imx6/filesystem/usr/lib/systemd/system/serial-console.service new file mode 100644 index 0000000000..9e0ca3617a --- /dev/null +++ b/projects/imx6/filesystem/usr/lib/systemd/system/serial-console.service @@ -0,0 +1,22 @@ +[Unit] +Description=Debug Shell on /dev/ttymxc0 +DefaultDependencies=no +ConditionKernelCommandLine=console=ttymxc0,115200 + +[Service] +WorkingDirectory=/storage +Environment="ENV=/etc/profile" +ExecStart=/bin/sh +Restart=always +RestartSec=0 +StandardInput=tty +TTYPath=/dev/ttymxc0 +TTYReset=yes +TTYVHangup=yes +KillMode=process +IgnoreSIGPIPE=no +# bash ignores SIGTERM +KillSignal=SIGHUP + +[Install] +WantedBy=sysinit.target