Removed ro in Recovery, mapping for low brightness working in recovery

This commit is contained in:
Vincent-FK 2020-11-16 08:32:05 +01:00
parent f027a0022b
commit 95dc5578a6
13 changed files with 16 additions and 29 deletions

View File

@ -5,6 +5,6 @@
|___| |_____|__|__||__|\__||_____|___ | |___| |_____|__|__||__|\__||_____|___ |
FUN ON A KEYCHAIN |_____| FUN ON A KEYCHAIN |_____|
----------------------------------------------------- -----------------------------------------------------
Version 0.99 (Recovery) Version 0.991 (Recovery)
----------------------------------------------------- -----------------------------------------------------

View File

@ -1,9 +1,9 @@
NAME="FunKey-OS Recovery" NAME="FunKey-OS Recovery"
VERSION="0.99 (Khaki Kitten)" VERSION="0.991 (Khaki Kitten)"
ID=funkey-recovery ID=funkey-recovery
ID_LIKE=buildroot ID_LIKE=buildroot
PRETTY_NAME="FunKey-OS Recovery 0.99" PRETTY_NAME="FunKey-OS Recovery 0.991"
VERSION_ID="0.99" VERSION_ID="0.991"
HOME_URL="https://www.funkey-project.com/" HOME_URL="https://www.funkey-project.com/"
SUPPORT_URL="https://www.funkey-project.com/" SUPPORT_URL="https://www.funkey-project.com/"
BUG_REPORT_URL="https://www.funkey-project.com/" BUG_REPORT_URL="https://www.funkey-project.com/"

View File

@ -1 +1 @@
Recovery 0.99 Recovery 0.991

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
BRIGHTNESS_FILE=/etc/current_brightness
BRIGHTNESS_DEFAULT_VALUE=100 BRIGHTNESS_DEFAULT_VALUE=100
# Check args # Check args
@ -9,20 +8,11 @@ if [ ${#} -ne 0 ]; then
exit 1 exit 1
fi fi
# Sanity check: File does not exist
if [ ! -f ${BRIGHTNESS_FILE} ]; then
rw
echo ${BRIGHTNESS_DEFAULT_VALUE} > ${BRIGHTNESS_FILE}
ro
fi
# Sanity check: Check if integer # Sanity check: Check if integer
brightness=$(cat ${BRIGHTNESS_FILE}) brightness=$(fw_printenv | grep brightness= | cut -d'=' -f 2-)
if ! [ ! "${brightness}" -ne "${brightness}" ] 2> /dev/null; then if ! [ ! "${brightness}" -ne "${brightness}" ] 2> /dev/null; then
rw
echo ${BRIGHTNESS_DEFAULT_VALUE} > ${BRIGHTNESS_FILE}
ro
brightness=${BRIGHTNESS_DEFAULT_VALUE} brightness=${BRIGHTNESS_DEFAULT_VALUE}
fw_setenv brightness ${brightness}
fi fi
echo ${brightness} echo ${brightness}
exit 0 exit 0

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
BRIGHTNESS_FILE=/etc/current_brightness
SYSTEM_BRIGHTNESS=/sys/class/backlight/backlight/brightness SYSTEM_BRIGHTNESS=/sys/class/backlight/backlight/brightness
# Check args # Check args
@ -22,9 +21,7 @@ let value/=10
echo ${value} > ${SYSTEM_BRIGHTNESS} echo ${value} > ${SYSTEM_BRIGHTNESS}
# Set new brightness value in brightness file # Set new brightness value in brightness file
if [ ${?} -eq 0 ]; then if [ ${?} -eq 0 -a $(brightness_get) -ne ${brightness_percentage} ]; then
rw fw_setenv brightness ${brightness_percentage}
echo ${brightness_percentage} > ${BRIGHTNESS_FILE}
ro
fi fi
exit 0 exit 0

View File

@ -12,7 +12,7 @@ getkey() {
menu_display () { menu_display () {
local entry=${1} local entry=${1}
clear_notif #clear_notif
case ${entry} in case ${entry} in
0) 0)

View File

@ -1,3 +1,9 @@
#!/bin/sh #!/bin/sh
# Check that we are in RW
mount | grep -q "ext4 (rw" || exit 1
# Flush and mount in read only
mount / -o remount,ro mount / -o remount,ro
exit 0

View File

@ -23,7 +23,6 @@ define FUNKEY_GPIO_MAPPING_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/funkey_gpio_management $(TARGET_DIR)/usr/local/sbin/funkey_gpio_management $(INSTALL) -m 0755 $(@D)/funkey_gpio_management $(TARGET_DIR)/usr/local/sbin/funkey_gpio_management
$(INSTALL) -m 0755 $(@D)/termfix $(TARGET_DIR)/usr/local/sbin/termfix $(INSTALL) -m 0755 $(@D)/termfix $(TARGET_DIR)/usr/local/sbin/termfix
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc
$(INSTALL) -m 0644 $(@D)/funkey_gpio_mapping.conf $(TARGET_DIR)/etc/funkey_gpio_mapping.conf
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/init.d $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/init.d
$(INSTALL) -m 0755 $(FUNKEY_GPIO_MAPPING_PKGDIR)etc/init.d/S11funkey-gpio-management $(TARGET_DIR)/etc/init.d/S11funkey-gpio-management $(INSTALL) -m 0755 $(FUNKEY_GPIO_MAPPING_PKGDIR)etc/init.d/S11funkey-gpio-management $(TARGET_DIR)/etc/init.d/S11funkey-gpio-management
endef endef