Useful OLPC

1:06 pm hardware, olpc

So far, the “service machine” in my house was Power G5 running Ubuntu. 24*7. The main functions (beside being a desktop) was http proxying (squid + dansguardian) and X10 service (heyu).

Trying to save on my energy bills, and to make something useful of nice green OLPC laptop, I’ve decided to move these services to OLPC – that way, I could afford shutting down the Mac, at least sometimes (it just eats the energy).

So, yesterday I “yum install”ed dansguardian and tinyproxy (instead of squid) – and tried to make a transparent proxy of it. Unfortunately, the transparent proxying is disabled in Fedora’s build of the tinyproxy. So, I had to rebuild it. It was some kind of a challenge – the only machines I got was Mac (Power G5, as I said) and another laptop (Ubuntu x86_64). How would you build 32-bit x86 app in that world? Immediately I found that 64-bit Ubuntu cannot build 32-bit apps. At least I could not find the way. Well, “gcc -m32” works somehow – but some headers (like stub-32.h) and gcc libs and obj files are missing. Installing ia32-libs does not help (and they do not provide -dev package). But I was really lucky to have … some wreckage of (!!!) Maemo SDK (which I did not manage to enable under 64-bit OS BTW). Which includes, among other things, 32-bit gcc with all the necessary stuff. So … chrooting to that environment allowed me to build tinyproxy binary with transparent proxying support (even though I had to patch it a bit – there is an issue with binding). Now, this all is up and running.

Next thing would be to build heyu utility for x86 – I am going to do it the same way, using Maemo SDK. My X10 will be hosted on OLPC as well.

So, a bit of numbers. It is claimed that OLPC consumes about 3W of energy. According to Apple, Power G5 uses 140W (idle) to 604W (fully loaded). Actually, Ubuntu can not control CPU speed (constantly shows 2.0GHz) – so I guess even idle, my Mac eats around 200W. I do not even mention the 24″ monitor…

I want to make proxy work faster, so I guess I’ll get some cheap USB Ethernet adapter – in order not to use humble wireless abilities of OLPC. Recommendations are welcome.

If you participated in G1G1 program last year (or thinking about doing it this year) – you can do something similar with that nice little piece of hardware. It is much more than just a sexy toy.

4 Responses

  1. Alex Ott Says:

    Dansguardian – suxx. If you’ll look into code, you’ll see, that it has very poor quality 🙁 It’s possible to make a lot of attacks against it

  2. Sergey Udaltsov Says:

    Alex: better alternative, something working out of the box?

  3. A.T. Says:

    that “heyu” reference — hope you know about http://linuxmce.com/ ? 😉

    my poor guess is that average NAS is better as service machine thou YMMV

  4. Sergey Udaltsov Says:

    A.T. I heard about linuxmce – but I do not need these bells and whistles. I need something headless actually:)

    Regarding NAS – my NAS’s CPU is too busy supporting RAID5, so I would not like to add extra load (proxying) on it. And I am not sure why it would be faster anyway…

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.