Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: MikeLockmoore on June 03, 2013, 01:47:38 PM

Title: Flit for newer XO Laptops (Linux kernel 3.3)
Post by: MikeLockmoore on June 03, 2013, 01:47:38 PM
::DELURKING::   Hi TC people.  Flit 1.3.1 was released to the repository back in July of 2011, using source essentially the same as the beta 1.3.0 code I posted to this topic (http://forum.tinycorelinux.net/index.php/topic,8065.msg43350.html#msg43350 (http://forum.tinycorelinux.net/index.php/topic,8065.msg43350.html#msg43350)) with trivial version number changes.

A Flit user has kindly sent me a small patch that should make Flit power monitoring work properly with newer XO laptops using the Linux 3.3 kernel series.    I want to find out if this patch will be acceptable to other users of Flit on XO computers.  (Maybe not so many users of TC and Flit on XO?   :o)  SO, if you have a stake in using Flit on XO, does this patch look like it will work for you?  If not, is it because you plan to stay on an old release of the Linux on XO? 

If there are no protests, I will plan to release a minor update to Flit with this patch within the next few weeks.  Maybe later this summer I can get back to doing a some more FLTK stuff on TC again.  ;)

Thanks!

Patch content:
Code: [Select]
--- a/flit.cpp 2010-12-11 20:11:47.000000000 +0200
+++ b/flit.cpp 2013-06-02 22:01:14.000000000 +0300
@@ -275,10 +275,10 @@
 enum {BATT_SYSTEM_ACPI, BATT_SYSTEM_OLPC};
 int BatterySystemType = BATT_SYSTEM_ACPI;
 
-#define OLPC_BATT_CAP_DEVFILE   "/sys/devices/platform/olpc-battery.0/power_supply/olpc-battery/capacity"
+#define OLPC_BATT_CAP_DEVFILE   "/sys/class/power_supply/olpc-battery/capacity"
 //#define OLPC_BATT_CAP_DEVFILE   "/home/tc/projects/flit/capacity"
 
-#define OLPC_BATT_AC_DEVFILE   "/sys/devices/platform/olpc-battery.0/power_supply/olpc-ac/online"
+#define OLPC_BATT_AC_DEVFILE   "/sys/devices/0.battery/power_supply/olpc-ac/online"
 //#define OLPC_BATT_AC_DEVFILE   "/home/tc/projects/flit/online"
 #endif
Title: Re: Flit for newer XO Laptops (Linux kernel 3.3)
Post by: coreplayer2 on June 03, 2013, 06:31:01 PM
cool thanks
Title: Re: Flit for newer XO Laptops (Linux kernel 3.3)
Post by: Juanito on June 11, 2013, 04:00:38 AM
It would be good if you could recompile flit for tc-5.x (updated libpng)  :)