working
This commit is contained in:
1 parent
3c440386ce
commit
2d79ed5035
3 files changed
+24
-10
No files matched your search
@@ -3,6 +3,7 @@ CONFIG_TARGET_msm89xx_msm8916=y
|
||||
CONFIG_TARGET_msm89xx_msm8916_DEVICE_generic-mf68e=y
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_BUSYBOX_CONFIG_FBSET=y
|
||||
CONFIG_BUSYBOX_CONFIG_USLEEP=y
|
||||
CONFIG_LIBQMI_COLLECTION_BASIC=y
|
||||
CONFIG_LIBQMI_WITH_MBIM_QMUX=y
|
||||
CONFIG_LIBQMI_WITH_QRTR_GLIB=y
|
||||
|
||||
@@ -10,7 +10,7 @@ define Package/display-monitor
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Display backlight monitor with timeout
|
||||
DEPENDS:=+fbtft-gc9107
|
||||
# DEPENDS:=+fbtft-gc9107
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,17 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
show_logo() {
|
||||
local i=0
|
||||
while [ ! -c /dev/fb0 ] && [ $i -lt 50 ]; do
|
||||
sleep 1
|
||||
i=$((i + 1))
|
||||
done
|
||||
(
|
||||
local BACKLIGHT="/sys/class/backlight/backlight"
|
||||
local i=0
|
||||
|
||||
# [ -c /dev/fb0 ] && echo 0 > /sys/class/backlight/backlight/bl_power
|
||||
while [ ! -c /dev/fb0 ] && [ $i -lt 100 ]; do
|
||||
usleep 100000 # 100ms = 0.1s
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
||||
if [ -c /dev/fb0 ] && [ -f /etc/boot_logo.fb ]; then
|
||||
cat /etc/boot_logo.fb > /dev/fb0 2>/dev/null
|
||||
fi
|
||||
if [ -c /dev/fb0 ] && [ -f /etc/boot_logo.fb ]; then
|
||||
cat /etc/boot_logo.fb > /dev/fb0 2>/dev/null
|
||||
fi
|
||||
|
||||
i=0
|
||||
while [ ! -d "$BACKLIGHT" ] && [ $i -lt 50 ]; do
|
||||
usleep 100000 # 100ms = 0.1s
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
||||
if [ -d "$BACKLIGHT" ]; then
|
||||
echo 0 > $BACKLIGHT/bl_power 2>/dev/null
|
||||
echo 892 > $BACKLIGHT/brightness 2>/dev/null
|
||||
fi
|
||||
) &
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main show_logo
|
||||
Reference in new issue
Block a user