A fact of which I’m reminded every time I try to do something cool/necessary/worthwhile that involves any kind of coding task at all. Even the easy stuff.
Friends, lend me your expertise. The goal is worthy: to build a maintainable live image for OLPC testing. And it should be simple, but I continue to be tripped up by my own ignorance.
First, some background. I believe that one of the biggest challenges facing the OLPC project is the disconnect between the intended user base (kids in the developing world) and the strongest potential contributor base (savvy Linux geeks). This problem is especially acute in the beginning stages, because there are comparatively few users, and they are all kids. Successful open source projects tend to be projects that draw their contributor base from the most knowledgeable user base of that project, right? That’s a problem for OLPC.
The way to mitigate that risk is by involving as many contributor-class users as possible — and one of the best ways to do *that* is to make it as simple as possible for people to experience OLPC. Give 1 Get 1 will help (four days left, get yours now!), but still, it seems to me that it’s absolutely crucial for an interested developer to be able to get “OLPC” running as quickly as possible, whether they’ve invested in the physical unit or not. Simply put: when I go to speak about the XO, I want to be able to burn a bunch of DVDs, hand them out, and say “there’s your XO, take it for a spin, get excited, and then get involved.”
Hence the idea for a live image. It’s not a new idea, either; there were Pilgrim builds happening months ago. But they bitrotted, and no one has really picked up this ball. I thought I’d give it a shot — since I used to be an engineer once. Allegedly.
So I built a kickstart file for a live image, to be used with Fedora’s livecd-creator. Here it is. What does it do? Simple:
1. Builds a Fedora live image with qemu and kqemu. kqemu, notably, is pulled from ATRpms. Yes, I know it’s dirty, but qemu+kqemu is the favored mechanism for OLPC emulation at this point. Yes, we should probably move on to kvm, but joyride isn’t building those images; it’s building ext3 images. Yes, I know it’s possible to convert the ext3 images to virtualbox / vmware / kvm-compatible images, but that’s not in the build process yet. I’m trying to work with what we’ve got right now. Patches welcome.
2. Downloads the latest build of the OLPC image and drop it into the Fedora Live image. Actually trickier than I’d supposed; apparently it’s necessary to wget this from a static IP address, since I guess dhcp isn’t running at this point. The only way I could get this to work was to run Apache on my build box and download from 127.0.0.1. Suboptimal, to be sure.
3. Writes a script to load the OLPC image into qemu with a single command. I’ve actually got this bit working. Pretty dead simple; even I can’t screw it up. Once the OLPC image is on the disk and kqemu is loaded, it’s just a one-liner to get it running.
4. Puts a link on the desktop to “click and run” that script. Except it doesn’t. This, friends, is where I appear to be completely incompetent. I try just telling the init script to dump a file into /home/fedora/Desktop, but then when I boot, that file doesn’t exist. I can dump it into / and it’s there, but the same file, dumped into /home/fedora/Desktop, disappears. And I have no idea why.
It’s killing me, because I’m really close to having an awesome live image, suitable for USB key or DVD, that would allow a user to boot up, click on the Big Glowing XO Icon, and see the OLPC come up in emulation — and not only that, but to have a kickstart that will allow the buildmaster (hi, Dennis) to automatically create that live media image with the build of every new OLPC image.
So, so close. But I’ve spent most of my Thanksgiving break on this, and I’ve got to move on to other stuff. Like making sure that FUDCon happens, and putting my hands on more community budget for the next fiscal year. So it goes.
Anyway. Try it out. Patches welcome.