merge changes from sdcard scripting for TVout + reboot when TV ON

6fa5835de5
This commit is contained in:
Apaczer
2023-04-10 20:53:32 +02:00
committed by GitHub
parent 42ec8c273c
commit f75216531a
2 changed files with 10 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/busybox sh
touch /mnt/tvout
killall -9 main
#killall -9 main
sync
#we need to reboot because we're dependant of /dev/fb0 in all cases
reboot

View File

@@ -53,8 +53,10 @@ gadget-ms /dev/mmcblk0p1 /dev/mmcblk0p4 >> "${LOGS}" 2>&1
# TVout scripting backend
tvout=`cat ${HOME}/tvout`
if ((test -r "${HOME}/tvout")); then
echo 0 >/sys/class/backlight/backlight/brightness
echo 0 > /sys/class/backlight/backlight/brightness
echo 0 > /sys/class/vtconsole/vtcon1/bind
cp /mnt/.backlight.conf /mnt/.backlight.bak
echo 0 > ${HOME}/.backlight.conf
modprobe -r $video
if (grep -q TVMODE\=\1 "${HOME}/options.cfg"); then
modprobe miyoo-tvout tvmode=1
@@ -64,6 +66,9 @@ gadget-ms /dev/mmcblk0p1 /dev/mmcblk0p4 >> "${LOGS}" 2>&1
echo 1 > /sys/class/vtconsole/vtcon1/bind
modprobe -r $video
else
if ((test -r "${HOME}/.backlight.bak")); then
mv ${HOME}/.backlight.bak ${HOME}/.backlight.conf
fi
# MODULES_CUSTOM scripting
if ((test -r "${BOOTDIR}/modules.custom.sh") && !(grep -q MODULES_CUSTOM\=\0 "${HOME}/options.cfg")); then
(cd "${BOOTDIR}" && sh modules.custom.sh ) >> "${LOGS}" 2>&1