Can the XO Laptop Compile its Own Software?

   
   
   
   
   
olpc community
Seeking XO self-compilation

I'm a Canadian still waiting to hear when my G1G1 XO will arrive. In the meantime I daydream how the future of OLPC will unfold.

An interesting milestone that I anticipate will be the day when an XO is able to compile most of its own software. I am curious when and how this will happen, the pros and cons of enabling XO owners to do this, and whether I/we should provide any encouragement to the software developer community to make this milestone happen sooner rather than later.

If you have relevant experience or comments about reaching the self-compilation milestone, I would like to read them in my OLPC News Forum Post on this.

I am curious how much extra storage would be needed, how long self-compilation might take (hours or days or weeks?), and whether the process can be substantially automated so that a rusty old programmer like myself could get an XO to self-compile with no outside help aside from a README file.

A demonstration of self-compilation would be an outstanding milestone for the OLPC XO-1 Laptop. To anyone working (knowingly or not) to help make it happen, I thank you for giving me a fascinating project to watch!

Submitted by Peter Ruhe in hopes of generating discussion on One Laptop Per Child technology. To start your own XO hacking conversation, join the OLPC News Forums today.

Related Entries

11 Comments

Well, all the new software written for the platform is in Python, which is an interpreted language, so this question isn't super-relevant.

Hmm.. sounds like a geek checkbox. I can see some benefit to putting the GNU toolchain onto the machine and rebuilding a particular component, in a pinch, but this really isn't the goal of these machines. Or, to put it another way, the OLPC isn't really for Gentoo users.

Could you explain why such a thing would be important? I'm not a software guy and, while I understand what compiling an app is, I don't know why there would be any doubt as to whether the XO could do it--I mean, can't any computer compile it's own apps?

Having a compiler as a learning tool can be very valuable. While Python, Squeak, and TurtleLogo do serve their purpose; they do very little for those kids who are more ambitious.

Perhaps this is an artefact of growing up in the eighties, but I knew plenty of people (including myself) who started programming at a very young ago. Childhood and the early teens are a great time to learn programming because there is less concentration on formalism and more of a desire to make creative (fun) stuff.

Anyway, I was able to copy FreePascal onto an OLPC. By adding ld (the linker) I was able to compile small programs. FreePascal is able to link against GTK and SDL so you can make the programs fit into the system. Alas, it isn't an officially sanctioned language.

I did try to wedge tcc (tiny cc) in there. It compiled fine, but I would always end up with linker errors. Maybe I'll work on it more the next time I can borrow and OLPC (or if they actually get around to shipping to Canada).

Oh, and if you're just interested in getting existing applications onto the OLPC: there is no need to compile them. A binary package will do fine as long as you track down dependencies. I've done this for console mode programs, and it is quite easy (and quite tedious). I have not tried X programs. It is the same in principle, but the dependencies and quirky window manager may add quirks.

Of course that you can compile your own software!!, is not a 'restricted python' machine!, you can compile your own kernel, user level applications, whatever you want!

tips:
1) look at the planet: http://planet.laptop.org
2) Get in touch with staff and colaborators onIRC
3) Feel free to hack your XO!

cheers.

Eduardo (olpc colaborator)

I just wanted to say how impressed I am with this little machine that arrived yesterday. I am very excited to see how my son reacts to it in a few days, as this will be a Christmas present for him. It was very easy to use right out of the box and without instruction. My wife and I marveled at how well designed it is. I strongly recommend this solution for any parent looking to get their child's first computer.

From the wiki, Laptop News 2007-12-15: "Scott Ananian worked on numerous Pippy enhancements, the most intriguing being that Pippy can now create activity bundles, so you can run your Pippy programs as stand-alone applications." ... "Also, Scott reports that Pippy is now a Pippy application! That's right, you can load the pippy source code in Pippy, edit it, and create the Pippy application within Pippy."

I like Scott's thinking! This is a mini-milestone on the way towards the major 'self-compilation milestone', when the XO can compile ALL of its own source code, including firmware, Linux kernel, low-level drivers, the whole 1 gigabyte ball of bits. I don't think any Wintel or Mac laptop will ever do that outside of a secure corporate software lab. Total open-source self-compilation will distinguish the OLPC XO from its competitors, as well as maximally enable the user community.

Fascinating idea! I wrote about the benefits of the OLPC project on my blog and someone asked if the people in developing nations were involved in the desgin, etc. Software built by the people for the people.

I can already hear the naysayers at Microsoft and Intel further squirm.

I want Perl. Nothing against Python but I'm more at home with Perl. Anyone know if that's already installed on the unit? Failing that, anyone installed, say, the Fedora 7 RPM and checked how well it works?

This is certainly doable, it's just a matter of how long it will take.

Considering I've installed Gentoo on systems with lesser specs, I will say that it would take at least a day. Perhaps a weekend. And much of that is gcc and glibc. If you already have a toolchain, then time will be considerably shorter.

I'm not a big fan of yum, so setting up and alternate distro (all the same packages, just different package manager) would probably be something I would be interested in.

I've been working on something somewhat related. I used Yum which comes on the OLPC and got a LAMP stack running pretty quick, and then installed Drupal. I am excited about the possibilities to use Drupal for classroom collaboration, without the need of the internet...just the mesh (based on the idea each OLPC can be its own web server). This would also be a great curriculum to start teaching:
i. LAMP on OLPC
ii. LAMP on OLPC + Drupal
iii. Independent study: Design a Drupal-built application to serve your school or community

You can read more about the installation experience here http://www.developmentseed.org/blog/2008/feb/28/building-open-source-applications-olpc-drupal and follow further progress in the Drupal Group here http://groups.drupal.org/drupal-olpc

Ian

XO Tablets for Sale

Buy Your XO Tablet on Amazon.com
OLPC is selling the new XO Tablets on Amazon.com for just $149. Buy yours today!

xo-tablet-amazon.jpg

Discussions

Recent Comments

Community Forum

Close