Can I run Linux on my Palm V?
I have an ancient Palm V device that I've been thinking of tossing into the junkheap of old computer gear, but someone told me I could actually run Linux on it. I find that unimaginable, but hey, I have time, is it possible? And if so, how the heck do I do it?
Believe it or not, they were feeding you accurate information! I also have a Palm V and it's also sitting on top of a bookcase, collecting dust at a furious rate, but the idea of running Linux on it is cool in a sick and twisted sort of way. It turns out that this is one of the coolest hacks from the generally cool book Palm and Treo Hacks by Scott MacHaffie. It's #17, and here's what it explains:
Although it's not the Palm version of Linux that will no doubt blow our socks off when it eventually arrives, uClinux is a good way to play around with an alternative operating system on your Palm.
If you haven't heard already, Palm is switching operating systems, and in the not-so-distant future, Palm-Powered will mean Linux-Powered, but with all the elegance and grace of the current Palm OS. It's going to take a while, though. If you want to give Linux a whirl on a Palm right now, it's quick and easy. You won't get any of the graphical goodness you'll eventually get with the future version of Palm OS, but you will have a chance to play around a bit and run this powerful operating system right on your little handheld.
Unfortunately, Linux doesn't run on a lot of Palms. The good news is that it runs on a lot of older popular models, such as the IIIe, IIIx, V, Vx, and even some of the m series. You can usually find these Palms very cheaply [Hack #50], so you can play around with this on the cheap. In fact, when I bought a used Palm Vx for $30, it included a USB-to-serial adapter, which was worth nearly the price I paid for both items!
Boot Linux on Your Palm
The simplest way to get Linux running on a Palm is to pick a well-supported Palm, such as the Vx, and download a binary release of Linux from Sourceforge. At the time of this writing, they had versions that worked with the m500 as well as a bunch of older models. What you'll get is a small PRC file (such as uClinuxPalm.prc) that has the Linux distribution and a bootloader. Install the PRC on your Palm, and you're just about ready to launch Linux.
I say just about, because you need a couple of things. First, you need to be prepared to sacrifice everything in your Palm's storage. After you launch Linux, you'll lose all your settings, appointments, contacts, and even installed applications. You can reset your Palm and go back into the Palm OS, but it will be as if you'd performed a hard reset.
Second, you need a way to talk to the Palm. Unfortunately, if you want to interact with the Linux operating system running on your Palm, you need to use a serial connection and a terminal program. So, you won't be taking your Linux-powered Palm on the go with you. Here's what you need to do to get this all working.
Setting up the serial connection.
If you've got a recent notebook computer, a Mac, or legacy-free PC, there's a good chance you don't have a classic serial port. However, there are many USB to serial adapters that can do the trick. The PalmConnect USB kit, shown in Figure 2-27, is a small dongle that will work for Windows and Linux users.
Figure 2-27. The PalmConnect USB kit
Although it ships with a CD-ROM, the PalmConnect hardware is of an old enough vintage that you should check Palm.com to see if there are any updates to the driver (Mac OS X users will not be able to use the PalmConnect kit for this, since the Mac OS X drivers do not represent the device as a serial port). Also, Keyspan makes a variety of USB to Serial adapters that work with Windows, Mac OS X, and Linux.
Once you've installed the USB to serial adapter, you need to figure out where it lives. On Linux and Mac OS X, serial ports appear as files in the /dev directory. On Windows, they appear as COM ports. Table 2-2 shows some possible candidates for serial ports for systems with both USB to serial and built-in serial ports.
Table 2-2. Possible serial port assignments
Installing Palm Linux.
Installing Linux on your Palm is as easy as installing the PRC I mentioned earlier. On Windows or Mac OS X, set up Palm Desktop and use Quick Install to install the PRC. The next time you perform a HotSync, Palm Linux will be installed. On Linux or Unix, you can use the pilot-xfer utility to install it:
$ PILOTRATE=115200 pilot-xfer -p /dev/ttyS0 -i uClinuxPalm.prc
Listening to port: /dev/ttyS0
Please press the HotSync button now… Connected
Time elapsed: 0:01:26
Warning: Be sure to set the PILOTRATE to the maximum you feel your hardware can comfortably support. It took 1 minute, 30 seconds at 115200 bps, but 13 minutes at the default speed!
Once it's installed, you'll see a Loader icon in the launcher, as shown in Figure 2-28.
Figure 2-28. The Palm Linux loader
Before you boot Linux, you should start talking to the serial port. If you're on Mac OS X or Windows, you've probably still got HotSync running and listening on the serial port. Since this will prevent you from opening a terminal session with the serial port, be sure to release the serial port before you proceed. You can either launch HotSync and configure it to not use the serial port, or shut it down altogether. If you do tell it to stop using the serial port, you'll need to switch it back before you can perform a HotSync again.
Once you've shut down HotSync, you can open a session with the serial port. On Windows, launch HyperTerminal (open the Start menu, choose Programs -> Accessories -> Communications -> HyperTerminal) and open a session with the serial port your Palm is connected to. You should use a serial port speed of 9600, and leave the rest of the settings at their defaults. On Mac OS X or Linux, you can use the screen program to connect to the serial port, as in screen /dev/ttyS0 (use Ctrl-A, K to end your session). You won't see anything at first, but once you make this connection, you're ready to boot Linux.
To boot Linux, tap the Palm Loader icon. You'll get the warning shown in Figure 2-29. Tap Boot Linux, and your serial port session will fill up with boot messages:
Figure 2-29. The Palm Linux warning
There will be a short delay, and then the boot messages will scroll across your screen. As this is all happening, the uClinux logo appears on the Palm, as shown in Figure 2-30. Once Linux is fully booted, your serial session will display a shell prompt:
For further information check:
Execution Finished, Exiting?
Congratulations, you've got Linux running on your Palm. When you're ready to go back to the Palm OS, you can type reboot and press return, or simply do a soft reset.
Figure 2-30. Palm Linux is up and running
Roll Your Own Palm Linux Distribution
uClinux makes it possible to put together your own Linux distribution for your Palm, but it takes a bit of work to get all the pieces together. The good news is, once you've got the necessary tools, it's pretty easy to build a bootable Linux image for your Palm. In theory, you just need a cross-compiler, Palm's PRC tools, and the uClinux source. The bad news is that I could not successfully compile a kernel for my Palm Vx using the latest releases of these packages. The good news is that there is a well-documented combination of versions that works like a charm. For more information on this combination, see this article. Here's what I grabbed to get it all working:
An m68k cross-compiler
This toolchain runs on x86 Linux and compiles the kernel and userland applications into binaries that run on the Motorola CPU inside older Palms. You should grab the m68k-elf-tools-20020410.tar.gz file from uclinux.org and extract it into your root directory (/), which installs the cross-compiler into /usr/local.
Palm's PRC tools are yet another cross-compiler, but are designed for building Palm OS applications. Since the uClinux launcher is a Palm OS executable, you need Palm's PRC tools to compile it. You can download the correct version of the PRC Tools at uclinux.org. You should grab both m68k-palmos-coff.tools-990108-linux-x86-glibc.tar.gz and prc-tools-0.5.0-5.i386.rpm. If you're on a Linux platform that doesn't support RPM, such as Ubuntu, use the alien utility to convert the RPM into a native package and install it. Extract the tar.gz file into your root directory
Once you have PRC Tools and the m68k-elf toolchain installed, you can grab the uClinux source distribution. The file uClinux-dist-20020701.tar.gz worked fine for my Palm Vx. Extract this file into a working directory, cd into the top-level directory (ucLinux-dist), and run make xconfig to configure everything.
Here's how I built Linux for my Palm Vx:
1. Select Target Platform Selection from the menu, choose 3com/PalmIIIx for the Vendor/Product, linux-2.0.x for the Kernel Version, and uC-libc for the Libc Version.
2. Make sure that Customize Kernel Settings is set to y and click Main Menu. Click Save and Exit. Now the kernel options appear. Under the kernel options:
3. You should be returned to the shell from which you ran make xconfig. Run the command make dep && make.
When it's done compiling, you should have a file called uClinuxPalm.prc in the images/ subdirectory. If something goes wrong, check out ucdot.org, which goes into this process in more detail. Once you've got it compiled, you can install the PRC file as described earlier in this hack.
You might get bored with the limits of running Linux on your Palm in the way described in this hack. Fortunately, you can go a bit further with some other gadgets. uClinux is used for both Nintendo DS Linux and iPod Linux too.
Also, there are many inexpensive embedded systems and single board computers that are capable of running uClinux.
This particular hack is from my friend Brian Jepson, actually, which is even cooler! Please note that this hack is reproduced here with explicit permission from O'Reilly Media Corporation.
More Useful iPhone and Cell Phone Help Articles:
✔ How do you share an iPhone photo on Facebook?
All my friends have figured out the magic to take photos on their iPhone and upload them to Facebook. Everyone but me. How...✔ Closed captioning for TV shows and movies on my iPhone?
Hey Dave, I saw your article from a few days about How to Turn on Closed Captioning in iTunes and am wondering if...✔ How do I create location-based iPhone reminders?
Thanks to Siri, I've become a big fan of the Reminders app on my iPhone. Being able to say "remind me at 3pm...✔ Enable Apple 2-Step Verification in iTunes?
I keep reading all these articles about iTunes account security and people having their accounts hacked. I have 2-step security verification set up...✔ Turn an iTunes song into an iPhone ringtone?
I want to have song from my song list in iTunes into a ringtone I can use on my iPhone? Is it even...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
I do have a comment, now that you mention it!
Check This Out Too...
Look for Answers
All Our Categories
Apple iPad Help
Articles and Reviews
Auctions and Online Shopping
Blogs and Blogging
Building Web Site Traffic
Business and Management
Computer and Internet Basics
d) None of the Above
Google Gmail Help
Google Plus Help
Industry News and Trade Shows
iPhone and Cell Phone Help
iPod, Sony PSP and MP3 Player Help
Kindle Fire Help
Mac OS X Help
Pay Per Click (PPC) Advertising
Search Engine Optimization (SEO)
Shell Script Programming
Tech Support Video Help
The Writing Business
Twitter, LinkedIn and Social Network Help
Unix and Linux Help
Video Game Tips and Help
Windows PC Help
Find Me on Google+
ADT on G+