mirror of
https://github.com/nikdoof/builder.git
synced 2025-12-13 15:42:20 +00:00
* add-lenovo-snowman-1080p * Correct flavor from lite to ultimate * Delete devices/hi3518ev200_ultimate_lenovo-snowman-1080p/general/overlay/etc/builder.msg * Delete devices/hi3518ev200_ultimate_lenovo-snowman-1080p/general/overlay/etc/wireless/usb * deleted: bin/load_hisilicon moved changes to firmware * Removal from the list deletion of staging modules because in not build anymore * Delete undeeded option and set wlandev env variable * Delete changes, work at default 30fps * Add mux GPIO 37 for audio speaker * Add lite flavor lenovo snowman 1080p * Cosmetic changes * Removal preset sensor --------- Co-authored-by: andrew <andrew@gradient.ru> Co-authored-by: Signor Pellegrino <68112357+FlyRouter@users.noreply.github.com>
33 lines
756 B
Bash
Executable File
33 lines
756 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Set Reset switch GPIO
|
|
GPIO=3
|
|
|
|
[ -z $GPIO ] && echo "GPIO pin for resetd is not set" && echo "[resetd] GPIO undefined in /usr/sbin/resetd" > /dev/kmsg && exit
|
|
|
|
# Counter for button press until reset
|
|
count=0
|
|
|
|
# prepare the pin
|
|
if [ ! -d /sys/class/gpio/gpio${GPIO} ]; then
|
|
echo "${GPIO}" > /sys/class/gpio/export
|
|
echo "in" > /sys/class/gpio/gpio"${GPIO}"/direction
|
|
fi
|
|
|
|
# continuously monitor current value of reset switch
|
|
while [ true ]; do
|
|
if [ "$(cat /sys/class/gpio/gpio"${GPIO}"/value)" -eq 1 ]; then
|
|
count=0
|
|
else
|
|
count=$((count+1))
|
|
|
|
# 20 counts =~ 5 seconds @ 0.25 sleep intervals
|
|
if [ $count -eq 20 ]; then
|
|
echo 'RESETTING FIRMWARE'
|
|
firstboot
|
|
fi
|
|
fi
|
|
# This interval uses 1% CPU. Less sleep = more CPU
|
|
sleep 0.25
|
|
done
|