Tinkering with iPodLinux

There's a new Linux distribution in town: It's called iPodLinux and runs on Apple's popular portable MP3 player. This project aroused my curiosity instantly, but the project page explicitly stated that my 4th generation white iPod wasn't supported.

Despite this (or even in spite of this), I decided to go ahead and try to get it running, support be damned. It proved to be considerably less difficult than I had anticipated. Following these instructions, I got my 4th generation iPod to run Linux:

Mind you, these instructions assume that you possess at least a moderate amount of knowledge about building UNIX software. If you're new to compiling and assembling UNIX software, you had better stick with a GUI installer and wait until the 4th generation is officially supported.


I got the kernel fairly quickly, but Podzilla took a while longer. (Podzilla is the Linux counterpart to the standard Apple iPod interface). Below you see images of my first bootable setup. In the shell, the iPod interface buttons produced mostly garbage text. However, by coincidence I managed to run the df command to see the filesystem overview. Images below: Click on thumbnails to get a larger image.

iPod Linux small
"Bad command or file name"

df output


A little more work -- in fact, quite a lot more work (see Building the Podzilla Interface), I finally managed to build Podzilla from the CVS checkout and get it to run after booting. Podzilla is a very impressive project. Although music-playing support is somewhat flaky still, in comparison with Apple's elegant implementation, it still sports a great deal of features lacking in Apple's software: games, demoes, recording, a file browser and more exciting stuff. I expect that iPodLinux will become the de facto way to extend iPod functionality in the future.

Below, I've placed a number of thumbnails of Podzilla in action. It should give you a feel for what kind of functionality we're dealing with here -- a whole development environment ready to be fleshed out.

The Podzilla Interface

Podzilla Record

Podzilla Calculator

Podzilla Cube
3D Cube

Podzilla Matrix
Matrix effect

Podzilla Mandelbrot
Mandelbrot calculations

Now, let's move on to the really exciting stuff...

Developing for iPodLinux

The very day I managed to get iPodLinux up and running, I felt compelled to program something for it -- get my own code in there, so to speak. Using just standard ANSI C libraries, I completed my first command line program in a matter of seconds: hellopod

Podzilla File Browser
Running the file browser

Podzilla Hellopod
My small program in browser

Podzilla Hellopod in action
hellopod output

I soon moved over to more interesting stuff, though. After messing about with the Microwindows API for a bit (that's what Podzilla uses), I decided to take a stab at generating a real Podzilla applcation. My idea was a music player of the more traditional kind -- the kind that plays music on a virtual instrument. Thanks to these excellent instructions I had a decent sketch of an iPod Piano player within an hour.

iPod Linux Piano

At some point, once I've properly implemented efficient audio handling, I'll be submitting this Podzilla addon to the main iPodLinux project. I would also like to find time to implement a version of Windmill Software's Digger on the iPod -- it's just the sort of game that works on small embedded devices. And then I want aalib up and running on my iPod -- if just for the pure geek factor.

If you're interested in helping out or continuing my work with the piano application, you can download the source code here. Please let me know if you make any progress.

Having to copy your iPodLinux code over the iPod and booting iPodLinux every time you want to test a program gets old very fast, let me tell you. If you intend to embark on serious iPodLinux development, you need install Apple's X11 (or an alternate X11 from Fink, or build it yourself), and then build for X11 while developing. The Podzilla interface looks quite strange in monochrome black and white on a crisp LCD screen instead of the iPod's small display:

Podzilla X11

Podzilla X11

Getting things to run correctly in X cost me quite a bit of trouble and nuisance -- I must admit I was quite frustrated at times, but it finally hitched up. Now I can test my projects without the pain of rebooting the iPod etc.

In Conclusion...

To make a long story short, iPodLinux is a damn cool project. It is extremely active -- the developers submit CVS patches every few days or so -- and the project maintains some extremely helpful and interesting forums where you can generally get answers to most questions not dealt with somewhere in the project Wiki.

The potential of this project is astounding: think in terms of iPod Linux servers, remote controls, speech synthesizers, visualizers etc. I, for one, will be contributing what I can in my spare time. This project has made giant leaps in the space of a couple of years. Another year or two, and we'll be seeing the really cool stuff start to surface.