New release.
Add swap function
swap file and size can be pre-defined in powerctrl.cfg
Too more fresh code, need more testing.
Add some kernel 2.6 compatible code, not tested:
/proc/driver/fl/corgi-bl equivalent in 2.6 kernel is /sys/class/backlight/corgi-bl//brightness
valid values are from 0 to 47 although anything above 7 is useless
-> backlight file can be defined in powerctrl.cfg
-> valid values can be defined in powerctrl.cfg also
for /proc/meminfo, the first 3 summary lines dont exist in 2.6 kernel, but the MemTotal, MemFree, SwapTotal,SwapFree values beneath are exactly the same.
-> Now is compatible
for reading the current cpu frequency and voltage, use /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq and /sys/devices/system/cpu/cpu0/cpufreq/cpu-voltage respectively
-> can be defined in powerctrl.cfg
Todo:analyze powerctrl's memory usuage, try to optimize
check swap acticed befroe eject card
enhance usb host function, try to support mouse, keyboard, etc
Know bug:
can not active swapfile on RAM, failed when:
swapon /home/root/.swapfile
https://www.oesf.org/forums/lofiversion/index.php/t2171.html-> modify powerctrl.cfg, change swapcount to 2, delete [swap0], change [swap1] to [swap0], [swap2] to [swap1]