diff --git a/distributions/LibreELEC/options b/distributions/LibreELEC/options index 59fe3e9798..10503e5bc7 100644 --- a/distributions/LibreELEC/options +++ b/distributions/LibreELEC/options @@ -222,3 +222,5 @@ # IR remote keymaps supported in default config IR_REMOTE_KEYMAPS="rc6_mce xbox_360 xbox_one" +# debug tty path + DEBUG_TTY="/dev/tty3" diff --git a/packages/sysutils/busybox/package.mk b/packages/sysutils/busybox/package.mk index 7968b13155..387276201a 100644 --- a/packages/sysutils/busybox/package.mk +++ b/packages/sysutils/busybox/package.mk @@ -181,7 +181,6 @@ post_install() { add_user nobody x 65534 65534 "Nobody" "/" "/bin/sh" add_group nogroup 65534 - enable_service debug-shell.service enable_service shell.service enable_service show-version.service enable_service var.mount diff --git a/packages/sysutils/busybox/system.d/debug-shell.service b/packages/sysutils/busybox/system.d/debug-shell.service deleted file mode 100644 index ce7cfc45b3..0000000000 --- a/packages/sysutils/busybox/system.d/debug-shell.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=Debug Shell - -DefaultDependencies=no -ConditionKernelCommandLine=|tty -ConditionKernelCommandLine=|debugging -ConditionPathExists=|/storage/.cache/debug.libreelec - -[Service] -Environment=TTY=3 -WorkingDirectory=/storage -ExecStart=/bin/sh -c '. /etc/profile; exec /bin/sh' -Restart=always -RestartSec=0 -StandardInput=tty -TTYPath=/dev/tty3 -TTYReset=yes -TTYVHangup=yes -KillMode=process -IgnoreSIGPIPE=no -# bash ignores SIGTERM -KillSignal=SIGHUP - -[Install] -WantedBy=sysinit.target diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk index 6cdd0bef26..ea7dcbe4d9 100644 --- a/packages/sysutils/systemd/package.mk +++ b/packages/sysutils/systemd/package.mk @@ -89,6 +89,7 @@ PKG_MESON_OPTS_TARGET="--libdir=/usr/lib \ -Dkmod-path=/usr/bin/kmod \ -Dmount-path=/usr/bin/mount \ -Dumount-path=/usr/bin/umount \ + -Ddebug-tty=$DEBUG_TTY \ -Dversion-tag=${PKG_VERSION}" pre_configure_target() { @@ -128,9 +129,6 @@ post_makeinstall_target() { safe_remove $INSTALL/usr/lib/udev/rules.d/71-seat.rules safe_remove $INSTALL/usr/lib/udev/rules.d/73-seat-late.rules - # remove debug-shell.service, we install our own - safe_remove $INSTALL/usr/lib/systemd/system/debug-shell.service - # remove getty units, we dont want a console safe_remove $INSTALL/usr/lib/systemd/system/autovt@.service safe_remove $INSTALL/usr/lib/systemd/system/console-getty.service @@ -259,4 +257,5 @@ post_install() { enable_service usercache.service enable_service kernel-overlays.service enable_service hwdb.service + enable_service debug-shell.service } diff --git a/projects/Allwinner/filesystem/usr/lib/systemd/system/serial-console.service b/projects/Allwinner/filesystem/usr/lib/systemd/system/serial-console.service deleted file mode 100644 index 196e8c4a97..0000000000 --- a/projects/Allwinner/filesystem/usr/lib/systemd/system/serial-console.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=Debug Shell on /dev/console -DefaultDependencies=no -ConditionKernelCommandLine=console - -[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/console -TTYReset=yes -TTYVHangup=yes -KillMode=process -IgnoreSIGPIPE=no -# bash ignores SIGTERM -KillSignal=SIGHUP - -[Install] -WantedBy=sysinit.target diff --git a/projects/Allwinner/options b/projects/Allwinner/options index cd43653a28..0f754273e6 100644 --- a/projects/Allwinner/options +++ b/projects/Allwinner/options @@ -73,3 +73,7 @@ # build with installer (yes / no) INSTALLER_SUPPORT="no" + + # debug tty path + DEBUG_TTY="/dev/console" + diff --git a/projects/RPi/filesystem/usr/lib/systemd/system/serial-console.service b/projects/RPi/filesystem/usr/lib/systemd/system/serial-console.service deleted file mode 100644 index 196e8c4a97..0000000000 --- a/projects/RPi/filesystem/usr/lib/systemd/system/serial-console.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=Debug Shell on /dev/console -DefaultDependencies=no -ConditionKernelCommandLine=console - -[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/console -TTYReset=yes -TTYVHangup=yes -KillMode=process -IgnoreSIGPIPE=no -# bash ignores SIGTERM -KillSignal=SIGHUP - -[Install] -WantedBy=sysinit.target diff --git a/projects/RPi/options b/projects/RPi/options index 4e80d70494..0927b0cbc6 100644 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -130,3 +130,6 @@ # for a list of additional drivers see packages/linux-driver-addons # Space separated list is supported, DRIVER_ADDONS="crazycat dvb-latest" + + # debug tty path + DEBUG_TTY="/dev/console" diff --git a/projects/Rockchip/filesystem/usr/lib/systemd/system/serial-console.service b/projects/Rockchip/filesystem/usr/lib/systemd/system/serial-console.service deleted file mode 100644 index 80d27f78c0..0000000000 --- a/projects/Rockchip/filesystem/usr/lib/systemd/system/serial-console.service +++ /dev/null @@ -1,24 +0,0 @@ -[Unit] -Description=Debug Shell on /dev/ttyS2 -DefaultDependencies=no -ConditionKernelCommandLine=|console=ttyS2 -ConditionKernelCommandLine=|console=uart8250,mmio32,0xff130000 -ConditionKernelCommandLine=|console=uart8250,mmio32,0xff1a0000 -ConditionKernelCommandLine=|console=uart8250,mmio32,0xff690000 - -[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/ttyS2 -KillMode=process -IgnoreSIGPIPE=no -# bash ignores SIGTERM -KillSignal=SIGHUP - -[Install] -WantedBy=sysinit.target diff --git a/projects/Rockchip/options b/projects/Rockchip/options index a6a46fdcee..269e469373 100644 --- a/projects/Rockchip/options +++ b/projects/Rockchip/options @@ -79,3 +79,6 @@ # for a list of additinoal drivers see packages/linux-driver-addons # Space separated list is supported, DRIVER_ADDONS="dvb-latest" + + # debug tty path + DEBUG_TTY="/dev/ttyS2"