mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
Merge pull request #3833 from HiassofT/le92-systemd-debug-console
[le92] systemd: enable switch debug-tty to provide a debug console
This commit is contained in:
commit
236ea95fd8
@ -222,3 +222,5 @@
|
|||||||
# IR remote keymaps supported in default config
|
# IR remote keymaps supported in default config
|
||||||
IR_REMOTE_KEYMAPS="rc6_mce xbox_360 xbox_one"
|
IR_REMOTE_KEYMAPS="rc6_mce xbox_360 xbox_one"
|
||||||
|
|
||||||
|
# debug tty path
|
||||||
|
DEBUG_TTY="/dev/tty3"
|
||||||
|
@ -181,7 +181,6 @@ post_install() {
|
|||||||
add_user nobody x 65534 65534 "Nobody" "/" "/bin/sh"
|
add_user nobody x 65534 65534 "Nobody" "/" "/bin/sh"
|
||||||
add_group nogroup 65534
|
add_group nogroup 65534
|
||||||
|
|
||||||
enable_service debug-shell.service
|
|
||||||
enable_service shell.service
|
enable_service shell.service
|
||||||
enable_service show-version.service
|
enable_service show-version.service
|
||||||
enable_service var.mount
|
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
|
|
@ -89,6 +89,7 @@ PKG_MESON_OPTS_TARGET="--libdir=/usr/lib \
|
|||||||
-Dkmod-path=/usr/bin/kmod \
|
-Dkmod-path=/usr/bin/kmod \
|
||||||
-Dmount-path=/usr/bin/mount \
|
-Dmount-path=/usr/bin/mount \
|
||||||
-Dumount-path=/usr/bin/umount \
|
-Dumount-path=/usr/bin/umount \
|
||||||
|
-Ddebug-tty=$DEBUG_TTY \
|
||||||
-Dversion-tag=${PKG_VERSION}"
|
-Dversion-tag=${PKG_VERSION}"
|
||||||
|
|
||||||
pre_configure_target() {
|
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/71-seat.rules
|
||||||
safe_remove $INSTALL/usr/lib/udev/rules.d/73-seat-late.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
|
# remove getty units, we dont want a console
|
||||||
safe_remove $INSTALL/usr/lib/systemd/system/autovt@.service
|
safe_remove $INSTALL/usr/lib/systemd/system/autovt@.service
|
||||||
safe_remove $INSTALL/usr/lib/systemd/system/console-getty.service
|
safe_remove $INSTALL/usr/lib/systemd/system/console-getty.service
|
||||||
@ -158,8 +156,19 @@ post_makeinstall_target() {
|
|||||||
safe_remove $INSTALL/usr/bin/systemd-nspawn
|
safe_remove $INSTALL/usr/bin/systemd-nspawn
|
||||||
safe_remove $INSTALL/usr/lib/systemd/system/systemd-nspawn@.service
|
safe_remove $INSTALL/usr/lib/systemd/system/systemd-nspawn@.service
|
||||||
|
|
||||||
# remove genetators/catalog
|
# remove unneeded generators
|
||||||
safe_remove $INSTALL/usr/lib/systemd/system-generators
|
for gen in $INSTALL/usr/lib/systemd/system-generators/*; do
|
||||||
|
case "$gen" in
|
||||||
|
*/systemd-debug-generator)
|
||||||
|
# keep it
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
safe_remove "$gen"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# remove catalog
|
||||||
safe_remove $INSTALL/usr/lib/systemd/catalog
|
safe_remove $INSTALL/usr/lib/systemd/catalog
|
||||||
|
|
||||||
# remove partition
|
# remove partition
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
From 49285dae6756b22bc6881c04939f7c43c35b5506 Mon Sep 17 00:00:00 2001
|
||||||
|
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||||
|
Date: Sat, 29 Jun 2019 00:26:41 +0100
|
||||||
|
Subject: [PATCH] debug-shell: configure environment, unhide cursor
|
||||||
|
|
||||||
|
---
|
||||||
|
units/debug-shell.service.in | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/units/debug-shell.service.in b/units/debug-shell.service.in
|
||||||
|
index 1127e68..4c3e971 100644
|
||||||
|
--- a/units/debug-shell.service.in
|
||||||
|
+++ b/units/debug-shell.service.in
|
||||||
|
@@ -16,8 +16,8 @@ IgnoreOnIsolate=yes
|
||||||
|
ConditionPathExists=@DEBUGTTY@
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
-Environment=TERM=linux
|
||||||
|
-ExecStart=@SUSHELL@
|
||||||
|
+Environment=ENV=/etc/profile
|
||||||
|
+ExecStart=/bin/sh -c 'echo -en "\033[?25h"; exec /bin/sh'
|
||||||
|
Restart=always
|
||||||
|
RestartSec=0
|
||||||
|
StandardInput=tty
|
||||||
|
--
|
||||||
|
2.14.1
|
||||||
|
|
@ -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
|
|
@ -73,3 +73,7 @@
|
|||||||
|
|
||||||
# build with installer (yes / no)
|
# build with installer (yes / no)
|
||||||
INSTALLER_SUPPORT="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
|
|
@ -130,3 +130,6 @@
|
|||||||
# for a list of additional drivers see packages/linux-driver-addons
|
# for a list of additional drivers see packages/linux-driver-addons
|
||||||
# Space separated list is supported,
|
# Space separated list is supported,
|
||||||
DRIVER_ADDONS="crazycat dvb-latest"
|
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
|
|
@ -79,3 +79,6 @@
|
|||||||
# for a list of additinoal drivers see packages/linux-driver-addons
|
# for a list of additinoal drivers see packages/linux-driver-addons
|
||||||
# Space separated list is supported,
|
# Space separated list is supported,
|
||||||
DRIVER_ADDONS="dvb-latest"
|
DRIVER_ADDONS="dvb-latest"
|
||||||
|
|
||||||
|
# debug tty path
|
||||||
|
DEBUG_TTY="/dev/ttyS2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user