Create fs-overlay, post-build
Setup buildroot filesystem overlay and move our custom scripts/configs into it. Setup a post-build script and have it delete files generated by buildroot that aren't in RescueOS v1.1. This gets us closer to a buildroot configuration that will automatically generate RescueOS images. For now, we're using RescueOS v1.1 as a reference.
This commit is contained in:
28
fs-overlay/sbin/battery-watchdog
Executable file
28
fs-overlay/sbin/battery-watchdog
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
#Modified, we warn only now....
|
||||
#fill_charger()
|
||||
#{
|
||||
#usb=`cat /sys/bus/platform/devices/twl4030_usb/vbus`
|
||||
#wall=`cat /sys/bus/platform/devices/musb_hdrc/charger`
|
||||
#if [ "$usb" = "on" ] || [ "$wall" = 1 ] ; then
|
||||
#charger=1
|
||||
#else
|
||||
#charger=0
|
||||
#fi
|
||||
#}
|
||||
while [ true ] ; do
|
||||
cap=`cat /sys/class/power_supply/bq27200-0/capacity`
|
||||
#fill_charger
|
||||
#if [ $cap -le 55 -a $charger -eq 0 ] ; then
|
||||
if [ $cap -le 45 ] ; then
|
||||
#echo "Attention: Plugin the charger soon to not run out of power. Current: $cap%. To disable this message, type \"stfu\""
|
||||
echo "Attention: Charge the battery (by running the charger script) to not run out of power. Current: $cap%. To disable this message, type \"stfu\""
|
||||
fi
|
||||
sleep 20
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user