Linux on iPAQ

by John Biggs

For those looking for a powerful ultra-microcomputer that runs Linux, Compaq's shiny iPAQ 3600 series is the answer. The latest generation of handheld, the 3600 series comes with up to 32 megabytes of flash ROM and a TFT touchscreen that supports up to 4,086 colors. A digital (Intel) StrongARM 32-bit processor, clocked at 206MHz, as well as sound recording and playback facilities round out an already impressive package.

"The fundamental watershed that distinguishes the iPAQ from what came before is it's capable of being a full-fledged computer. We shouldn't think of it as a little thing on the end of a dongle", said James Gettys, researcher at Compaq's Compaq Research Lab (CRL) and co-author of the X Window System. "You have serious compute capability, significant amounts of memory. So for the first time you don't have to view this thing as something that is divorced and different. It's a full-fledged computer that happens to fit in your hand."

That said, let's look at how to scrape Windows CE out of our shiny new handheld and see the smiling visage of Tux greet us on reboot.

Installing the Boot Loader

Remember, in the world of the iPAQ, there is a fine line between a working handheld and a paperweight. I've experienced both, and the feeling of dread you get when a transfer glitch reduces your iPAQ to a dead rodent is quite striking. The day my iPAQ died, I went to Boston where the kind folks at the CRL in Cambridge rescued my iPAQ by opening the case and reFlashing the memory directly. It's not a trick you want to try at home.

Handhelds.org, sponsored by Compaq, holds a treasure-trove of information on ARM programming and OS implementation.

First, you need an iPAQ H3650 (or a similar iPAQ with an ARM processor, except the H3800) and a serial cradle/cable. USB is not supported at this time, but you can easily find the serial cable on-line. It allows for 115200 baud connections to your iPAQ for fast uploads and downloads.

Next, download the latest stable release from handhelds.org. As of this writing they are: bootldr-2.14.15; wince-bootldr.bin; and osloader-1.5.4.exe. However, I suggest using bootldr-2.14.8, as it supports the suspend/resume feature more readily.

Use the Windows ActiveSync application that comes with Windows CE to upload the osloader-1.5.4.exe to the iPAQ, ignoring any messages that come up. Execute the osloader and select Tools->Flash->Save to files... This will save four Flash files called flash_00000000.bin, flash_00400000.bin, flash_00800000.bin and flash_00c00000.bin. Download those and save them somewhere safe. They can be used to return your iPAQ to its original state.

Copy wince-bootldr.bin to the My Documents folder on the iPAQ, and run the file. Select the Tools->Bootldr->RunFromFile menu entry and bootldr should run from the osloader program.

Now, close the ActiveSync application completely, freeing the serial port. Open a terminal emulator like Minicom or HyperTerminal, and connect directly to your serial port with these settings:

115200 baud8 bitsNo Parity1 stop bitFlow Control set to "None"

Press the Enter key a few times in the terminal emulator, and the boot prompt will appear. Type help to see a list of commands.

At the boot prompt, type load bootldr, then start an xmodem download of the file bootldr-2.14.15. If verifying ... done. does not appear, try again. Reboot the iPAQ and place it back into the cradle. Push the calendar button or the space bar in the terminal emulator to get the boot prompt. Type qflash to make sure the boot loader is protected, and check to see that 00010001 appears for the H3600.

Loading the Kernel

Now you must set the bootloader parameters. Type the following at the boot prompt, pressing Enter after each line.

set linuxargs "noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttySA0" 
set copy_ramdisk 0x0 
set baudrate 115200 
partition reset 
partition define kernel 0x80000 0x80000 0 

Type qflash 1 to detect your flash ROM size. If the result is "00170017", then you have a 16MB flash ROM and need to enter partition define root 0x100000 0xf00000 16 at the boot prompt. If the result is "00180018", then you have a 32MB flash ROM and need to enter partition define root 0x100000 0x1f00000 16 at the boot prompt Finally, enter params save.

Next, go back to handhelds.org and download the latest kernel image. Type load kernel at the boot prompt, and upload the kernel using the zmodem protocol. You should see verifying done.

Now download the latest root file system image from handhelds.org. As of October, 2001, the root filesystem is: familiar.handhelds.org/familiar/releases/v0.4/install/H3600/task-familiar-complete.jffs2. Type load root at the boot prompt, and upload the root file system using the xmodem protocol. Again, you should see verifying done. Once you follow these steps, type boot. Tux should appear in all his majesty. Congratulations, you now have a working Linux system.

Some Cool Apps

Most of the iPAQ applications are stored in Debian-like ipkg files. To install packages, simply upload them to your handheld using the zmodem protocol (or configure network access, which is beyond the scope of this article). Then type ipkg install <package name>.

If you feel that you're missing something on your iPAQ, head over to ftp.handhelds.org/pub/linux/dists/familiar/releases/v0.4/packages/armv4l. Here you'll find a full set of packages to upload, including Checkers and a few other interesting productivity tools.

For basic PDA functions, you can also install Agenda Computing productivity apps like Calendar, ToDo and Contacts. They are available at www.findsimon.com/agenda_apps.tgz.

Get to know your new iPAQ. By working through the handhelds.org site, you'll find a number of interesting applications including the Ice window manager for the ARM processor and MP3 record and playback programs.

John Biggs is a writer and consultant in Brooklyn, New York.

Load Disqus comments