Article

Linux on PDAs: Linux in Your Vest Pocket

Stuffing Linux where neither God nor man intended

Now imagine you're a lone Linux hacker trying to get Linux to run on a device that can fit in your shirt pocket. And the device manufacturer actively hides any technical data you might need to make the port work. In fact, they designed it to run Windows CE, and only Windows CE.

If you're Ian Molton, a 26-year-old developer in England, it's just another mountain to climb on the way to delivering a functional Linux on the Toshiba line of Pocket PCs. He's been trying to stuff Linux into places that neither God nor man intended for quite some time now. "I've always been on small systems really," Molton says. "I started on the Acorn Archimedes. It ran an operating system called RISC-OS that's a relatively simple operating system. It hasn't got memory protection and all the things that Linux has now. But that got me interested in messing around with the operating system itself because it was really, really easy to get into the operating system on that particular setup. Without memory protection you could play with the registers, Basic even. I moved from that into Linux on ARM-based devices. First just running it as a desktop on the Archimedes and later on programming the kernel."

Problems with the Linux on the Acorn led Molton deeper into the kernel. "The kernel for that was terminally broken; it just didn't work," he says. "So I started splitting this off into its own architecture that is now arm26 in the Linux kernel because basically the ARM architecture was radically different by that time. It sort of grew from arm26 and became ARM and nobody cared about it anymore. So I just split it off into its own architecture with the blessing of Russell King who runs the rest of the ARM architecture."

But then something happened that has shaped much of Molton's past few years. "About that time I got myself a PDA that ran Windows CE, which I found diabolical. It crashed all the time; it lost all its setting; it was a really horrible operating system. And it's based on a full 32-bit ARM processor. I decided I wanted Linux on the device. Nobody had done it so it was basically down to me to start work on it. So I started pulling the actual firmware on the device's parts. Ultimately I found somebody who had written a boot-loader for Windows CE to get Linux running on other PDAs and used that to bootstrap my own very simple kernels on it and now I've actually written a boot-loader for the device, so it no longer needs the original boot-loader to run. And it's almost complete at this point."

Molton, who earns his living as an independent consultant, finds Pocket PCs (specifically the Toshiba line) a pretty good environment for Linux development. "The E-740 has a good number of little hardware features that seem to kill it on a reasonably regular basis. On top of that it runs Intel's earlier PXA-250, which has a number of bugs that not only slow it down but actually make it unreliable as well. The next model, the 750, is actually a very stable, very robust little device I've found; it's the next revision of the processor, the PXA-255, and as far as I can tell it doesn't have any problems like the E-740 does. For example, the E-740 often requires a reset when you put it in its cradle. The E-750 won't do that. So overall I have found the E-750 to be very solid. The later ones, the E-800 series seems to be pretty stable as well."

Getting Linux to run on a new PDA can be as much investigation with a multimeter as software engineering. "It depends on how much of the device I already know about," Molton says. "For example, the E-750 is very similar to the E-740, at least in terms of its spec on paper. However, once you get it apart it's radically different. For example, it's got the same processor, the same - well nominally the same video chip, the same I/O chip, the same amount of memory, and so on. But the way these things are all connected together in a PDA is very sort of ad hoc. In a desktop machine you've got systems like PCI and USB that are all standard. In the PDA, it's more like the old 486 days with a local bus. So you've got general-purpose I/O lines tying different devices together. So despite the E-740 and 750 being basically the same chip, they're connected in very different ways and the same kernel won't run on both of them.

"Sometimes you can work it out by just poking at registers on the processor and trying to make its I/O lines do what you want and watching what responses you get back, and in some cases it's actually been much easier just to get a hold of broken units and take all the chips off the motherboard and actually use a voltmeter to find out where the various traces on the board connect."

Of course, not having Toshiba's cooperation hasn't helped. According to Molton, "Compaq originally did release a lot of specs for their PDAs, which helped the Compaq people in the early days. Hewlett-Packard seems to be a bit more reluctant. Toshiba would tell me absolutely nothing, well, their PDA Division won't tell me anything. I have managed to get one or two very basic data sheets about one of their chips and it just be happens to be made by themselves as well, but, yeah, pretty much nothing forthcoming there at all."

Once Linux is up and running on a new PDA, there's a surprising amount of software to run on it. "Certainly the two desktop environments are becoming more mature now, GPE and OPIE being the main two," Molton says. "I haven't really had much of a chance to play with desktops and so on; I've been working on the kernel so much on these. I mean they really are basically small pocket-sized computers when you run Linux on them. The ones I'm working on have USB ports, VGA outputs that you can connect to a monitor and so on. So you know the potential for them is pretty much limitless really. It can do all the same things that a desktop machine can albeit slower with the videos in lower resolution."

And the interest in getting Linux up on PDAs isn't just an idle hobby for a few hard-core Linux nuts, Molton explains. "The reason I'm working on the E-740 rather than ditching it and just working straight on the E-750 is that I originally had an E-740 but I got rid of it. Toshiba replaced it with the E-750 because I complained to them about it too much, and I was actually working on Linux on it at that point and obviously I couldn't anymore, so I decided I would work on the E-750 instead. But Toshiba basically left its users high and dry in terms of having no upgrade for their Windows CE on the E-740 and the people who had the E-740 who knew about my Linux work on it said, 'If we buy you one, will you continue?' So I said, 'Sure, okay.' So they all got together and got me an E-740 and I've been working on Linux on that as well as the 750 I have and the 800 as well."

For those Toshiba PDA users interested in trying out Linux on their units (fair warning, back everything up first), all the details and boot images can be found at: www.mnementh.co.uk/

More Stories By James Turner

James Turner is president of Black Bear Software. James was formerly senior editor of Linux.SYS-CON.com and has also written for Wired, Christian Science Monitor, and other publications. He is currently working on his third book on open source development.

Comments (4) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
M Knight 10/23/05 01:37:40 PM EDT

The URL www.mnementh.co.uk doesn't work or its web server doesn't respond, blocking access to additional information/details. Otherwise a great article. As an owner of a Toshiba e805, it leaves me wanting more, though.

kaafree 10/23/05 11:54:40 AM EDT

I wonder why handhelds.org was not mentioned at all ? How can someone speak about Linux on handhelds and not say about special distributions like Familiar ?

Also, Linux is now ported not only to Windows-based handhelds but to Palms, including latest ones (like LifeDrive).

Mace Moneta 10/22/05 12:21:36 AM EDT

Getting Linux running on a Toshiba PDA is counter productive. Here we have a vendor that is as contrary to the concept of open source as they come. Why should they benefit from the efforts of such talented people?

On the other hand, we have a company like Nokia taking their first open source steps - releasing the Nokia 770 handheld:

http://www.nokiausa.com/770

and supporting both Linux development and open sourcing its user interface:

http://www.maemo.org/

This is a company that deserves support from the open source community. Why punish them for doing the right thing by putting their competitor on an even footing?

News Desk 10/21/05 09:46:57 PM EDT

Linux on PDAs: Linux in Your Vest Pocket. Now imagine you're a lone Linux hacker trying to get Linux to run on a device that can fit in your shirt pocket. And the device manufacturer actively hides any technical data you might need to make the port work. In fact, they designed it to run Windows CE, and only Windows CE.