WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: OLPC XO  (Read 25803 times)

Offline roystonlodge

  • Newbie
  • *
  • Posts: 5
OLPC XO
« on: October 18, 2009, 09:27:04 PM »
I was just wondering if anyone has tried tinkering with TinyCore on the OLPC XO.

I just got an XO offa eBay, and I'm trying to decide how to run it.  The easiest option is to stick with the preinstalled Fedora (since it's customized for the XO's hardware) and just change the desktop environment.  There's also a Debian for XO, and a couple of other options.

With only 256MB of RAM and only 1GB of storage, TinyCore could be a nice fit.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: OLPC XO
« Reply #1 on: February 22, 2010, 01:35:03 AM »
There is Now ;D
Builds and sources are [removed: remaster]

BTW I'm trying to get a battery monitor for the XO and since apci is not working the available extension (watcher, flitk) do not work.
I was wondering if there is something similar to xfce GenMon made with fltk where the output of a command or script is shown. Battery scripts from other builds work fine under TinyCore but there is no way to display them.
I do not want to install XFCE, trying to keep it as simple as possible.
So if anyone knows of one or can build one would be nice.

You may try LXDE. Smaller than Xfce4 and there is a built-in battery monitor panel plugin.
« Last Edit: March 26, 2010, 11:53:16 PM by ^thehatsrule^ »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline mavrothal

  • Newbie
  • *
  • Posts: 43
Re: OLPC XO
« Reply #2 on: February 22, 2010, 04:30:42 AM »
You may try LXDE. Smaller than Xfce4 and there is a built-in battery monitor panel plugin.

Yes I could, but my point is that having such a simple thing you can have all kind of info from time. to network, to battery. to available disk space, to ram, to what ever you want, by an array of these things independent of any WM/panel/tray/desktop and with limited resource consumption.

Is such a simple basic and versatile infrastructure, I'm surprised is not available in TC ???

PS: Now that I realized your suggestion ( :D) No linux battery monitor will run with XO's battery that is going through the embedded controller. For the official Sugar build they are using a Python(!...) widget to present the output of /sys/devices/platform/olpc-battery.0/power_supply/olpc-battery/capacity which is actually % charged. So GenMon works grate with this.
« Last Edit: February 22, 2010, 04:31:31 PM by mavrothal »

Offline mavrothal

  • Newbie
  • *
  • Posts: 43
Re: OLPC XO
« Reply #3 on: March 17, 2010, 08:58:15 AM »
tc-xo v0.1 is [removed: remaster]
but still without a battery monitor  :(
« Last Edit: March 26, 2010, 11:53:24 PM by ^thehatsrule^ »

Offline Lerc

  • Newbie
  • *
  • Posts: 10
Re: OLPC XO
« Reply #4 on: March 25, 2010, 06:26:55 PM »
but still without a battery monitor  :(

I've got TC up and running on my XO,  I have a battery monitor as part of Plops.  it uses a tiny script to do the actual battery reading so it's an easy mod to make it read the XO battery level.

All-in-all I'm quite pleased with how it's going.  The only downpoint is that there is a delay on launching python (mounting?) which is a pain for scripts that really should be instantaneous launching.

 

Offline mavrothal

  • Newbie
  • *
  • Posts: 43
Re: OLPC XO
« Reply #5 on: March 26, 2010, 03:03:55 AM »
I've got TC up and running on my XO,  I have a battery monitor as part of Plops.  it uses a tiny script to do the actual battery reading so it's an easy mod to make it read the XO battery level.

So is it actually working on the XO? Plops looks light enough and should be a good match for the XO, if an fltk widget does not come through.


All-in-all I'm quite pleased with how it's going.  The only downpoint is that there is a delay on launching python (mounting?) which is a pain for scripts that really should be instantaneous launching.

Python is a real hog. Quite frankly I think that is the worse thing that happened to Sugar. Is used to implement an excellent idea in the worse possible way, based on FOSS politics and (misconceived) "ease" of development, wrapped in an "educational" cloak. But that's a different story...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: OLPC XO
« Reply #6 on: March 26, 2010, 03:25:15 AM »
I have a battery monitor as part of Plops.  it uses a tiny script to do the actual battery reading so it's an easy mod to make it read the XO battery level.

Can you use the flit extension for this?

Offline mavrothal

  • Newbie
  • *
  • Posts: 43
Re: OLPC XO
« Reply #7 on: March 26, 2010, 03:38:19 AM »
I have a battery monitor as part of Plops.  it uses a tiny script to do the actual battery reading so it's an easy mod to make it read the XO battery level.

Can you use the flit extension for this?

None of the TC available battery monitors work on the XO (see above). The worse thing is that even the XFCE extension does NOT include GenMon that could be easily used as battery monitor.

I guess someone could recode flit battery monitor module for the XO. I'm just too novice to do it.
But I would guess the simplest and most versatile thing would be a GenMon like widget that will display the output of a script or a command at predefined time intervals.
 Any fltk-expert willing for that?...

Offline Lerc

  • Newbie
  • *
  • Posts: 10
Re: OLPC XO
« Reply #8 on: March 26, 2010, 06:03:36 AM »
So is it actually working on the XO? Plops looks light enough and should be a good match for the XO, if an fltk widget does not come through.
Yup,  I wrote Plops with the XO in mind.  It could stand to be a whole lot lighter still, but it's a featherweight compared to the alternatives.  Most of the memory goes in rgba images which at least counts as usefully used memory in my book.

I've got a lot of things going as I had them under Fedora. Plops, PDF reading, Video playing, Doodle. I also got Chromium running which is nice (Remains to be seen if it's too memory hungry though)

Quote
Python is a real hog. Quite frankly I think that is the worse thing that happened to Sugar. Is used to implement an excellent idea in the worse possible way, based on FOSS politics and (misconceived) "ease" of development, wrapped in an "educational" cloak. But that's a different story...
Indeed,  I'm not much of a fan of it either, but I think the delay on launching scripts can be addressed.  The main thing that I need python for is ZeroInstall.  on the Fedora XO, 0launch-ing a program was close enough to instantaneous. on my Tiny Core XO there's a pause of a couple of seconds, which isn't the best, especially for command line programs that you expect to just happen.



   

Offline mavrothal

  • Newbie
  • *
  • Posts: 43
Re: OLPC XO
« Reply #9 on: March 26, 2010, 06:18:04 AM »
Yup,  I wrote Plops with the XO in mind.  It could stand to be a whole lot lighter still, but it's a featherweight compared to the alternatives.  Most of the memory goes in rgba images which at least counts as usefully used memory in my book.

So is it publicly available? If not could you post it here (assuming that is small enough to fit the attachment limit)

Quote
I think the delay on launching scripts can be addressed.  The main thing that I need python for is ZeroInstall.  on the Fedora XO, 0launch-ing a program was close enough to instantaneous. on my Tiny Core XO there's a pause of a couple of seconds, which isn't the best, especially for command line programs that you expect to just happen.

Is debugging/logging enabled in python? This may take a couple of seconds in launch time.

Offline Lerc

  • Newbie
  • *
  • Posts: 10
Re: OLPC XO
« Reply #10 on: March 26, 2010, 07:00:38 AM »
So is it publicly available? If not could you post it here (assuming that is small enough to fit the attachment limit)
At http://code.google.com/p/plops/
I think svn is fairly up to date.  Bedtime now, but I'll update the download in the morning.

Quote
Is debugging/logging enabled in python? This may take a couple of seconds in launch time.
I have no idea,  I grabbed the package, it made python run. 

Offline mavrothal

  • Newbie
  • *
  • Posts: 43
Re: OLPC XO
« Reply #11 on: March 26, 2010, 11:07:14 AM »
So is it publicly available? If not could you post it here (assuming that is small enough to fit the attachment limit)
At http://code.google.com/p/plops/
I think svn is fairly up to date.  Bedtime now, but I'll update the download in the morning.

I edited the /plops/baterry/IM_NOT_A_BATTERY file to point to /sys/devices/platform/olpc-battery.0/power_supply/olpc-battery/capacity but running `./plops battery' it says
"An unhandled exception occured at $08048523 :
EInOutError : Invalid input
$08048523
$080485AB
$08048141 "
`cat /sys/devices/platform/olpc-battery.0/power_supply/olpc-battery/capacity' reports the correct battery full perentage.
What's the setting in your XO?

Offline Lerc

  • Newbie
  • *
  • Posts: 10
Re: OLPC XO
« Reply #12 on: March 26, 2010, 06:54:54 PM »
`cat /sys/devices/platform/olpc-battery.0/power_supply/olpc-battery/capacity' reports the correct battery full perentage.
What's the setting in your XO?

I just uploaded the more recent build.  http://plops.googlecode.com/files/Plops-0.0.2.tar.gz  It's as a Rox AppDir so just clicking on it in Rox-Filer should run it. Alternately running the AppRun script should do the same thing in other environments.

This version uses a readbattery script for the battery. All the script contains is

#!/bin/bash
cat ChargeLevel_Link

and on my XO I've symlinked ChargeLevel_Link to /sys/class/power-suply/olpc-battery/capacity

I have an EEE701 which doesn't seem to have the number represented in a sane format so on that I have a python script to read it via hal.

Also in this version is a little lua script in the graph directory which works as a cpu monitor.  Just a quickly knocked together thing, but you run
Plops/Widgets/graph/monitor >Plops/Widgets/graph/data and you have a cpu load graph.

This version also bundles wcalc with the calculator.
« Last Edit: March 26, 2010, 06:56:41 PM by Lerc »

Offline mavrothal

  • Newbie
  • *
  • Posts: 43
Re: OLPC XO
« Reply #13 on: March 27, 2010, 02:35:00 AM »
No luck :(
All the widgets work but the battery monitor. Either by Rox-filer or by `./AppRun'
Actually `cat Plops/Widgets/battery/commands' suggests that the widget does not even run.
Running it from within the batery directory by `./battery' you can see the commands issued but no battery monitor and nothing in "results" or "events".
`./readbattery' reports the correct battery level when pointing to /sys/devices/platform/olpc-battery.0/power_supply/olpc-battery/capacity but not when pointing to /sys/class/power-suply/olpc-battery/capacity
There are no errors at any point.
 ???
Do you need any other extensions to run it in TC-XO? Which extensions do you have loaded when you can see that battery monitor on TC-XO desktop? Are you using flwm or an other WM?

Offline Lerc

  • Newbie
  • *
  • Posts: 10
Re: OLPC XO
« Reply #14 on: March 27, 2010, 07:03:34 AM »
No luck :(
All the widgets work but the battery monitor. Either by Rox-filer or by `./AppRun'
Actually `cat Plops/Widgets/battery/commands' suggests that the widget does not even run.
Ah right,  That'll be because I'm an idiot.

Have a look at the Plops/Launch/ directory
The symlinks in there are the widgets that actually get launched.
The default Launch directory has just the links

 calculator -> ../Widgets/calculator
 clock -> ../Widgets/clock
 graph -> ../Widgets/graph

Add one for the battery and it should launch.
The idea is that people can configure with drag and drop in a file manager,  but it doesn't work if I don't tell anyone about it.