mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
systemd: enable switch debug-tty to provide a debug console
This allows us to use the default debug-shell.service provided by systemd and cut down on custom made services. This will also always provide a debug shell as there is no reason we shouldn't have access to one.
This commit is contained in:
parent
4a82fd0f70
commit
ec17cea5e6
@ -225,3 +225,5 @@
|
||||
# IR remote keymaps supported in default config
|
||||
IR_REMOTE_KEYMAPS="rc6_mce xbox_360 xbox_one"
|
||||
|
||||
# debug tty path
|
||||
DEBUG_TTY="/dev/tty3"
|
||||
|
@ -177,7 +177,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
|
||||
|
@ -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
|
@ -88,7 +88,8 @@ PKG_MESON_OPTS_TARGET="--libdir=/usr/lib \
|
||||
-Dzshcompletiondir=no \
|
||||
-Dkmod-path=/usr/bin/kmod \
|
||||
-Dmount-path=/usr/bin/mount \
|
||||
-Dumount-path=/usr/bin/umount"
|
||||
-Dumount-path=/usr/bin/umount \
|
||||
-Ddebug-tty=$DEBUG_TTY"
|
||||
|
||||
pre_configure_target() {
|
||||
export CFLAGS="$CFLAGS -fno-schedule-insns -fno-schedule-insns2 -Wno-format-truncation"
|
||||
@ -127,9 +128,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
|
||||
@ -258,4 +256,5 @@ post_install() {
|
||||
enable_service usercache.service
|
||||
enable_service kernel-overlays.service
|
||||
enable_service hwdb.service
|
||||
enable_service debug-shell.service
|
||||
}
|
||||
|
@ -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
|
@ -85,3 +85,7 @@
|
||||
|
||||
# build with installer (yes / no)
|
||||
INSTALLER_SUPPORT="no"
|
||||
|
||||
# debug tty path
|
||||
DEBUG_TTY="/dev/console"
|
||||
|
||||
|
@ -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
|
@ -137,3 +137,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"
|
||||
|
@ -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
|
@ -85,3 +85,6 @@
|
||||
# for a list of additinoal drivers see packages/linux-driver-addons
|
||||
# Space separated list is supported,
|
||||
DRIVER_ADDONS="crazycat dvb-latest"
|
||||
|
||||
# debug tty path
|
||||
DEBUG_TTY="/dev/ttyS2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user