Linux on iPAQ

How to make Tux's shining little face appear at bootup.

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.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Ipaq 2215

MeduZa's picture

Hi, Nice blog
I did that to, I remove the old and un-featured windowsCE 2003 and put familiar linux on my ipaq 2215, is really amazing!!!

Re: Linux on iPAQ

Slacky's picture

Have anyone installed linux over PPP with windows? I have tried to do that and ended to following situation: I have configured PPP to my ipaq's linux and got fully functionin connection between linux and w2k. I can make ssh connection to my linux device over tcp/ip but my Ipaq doesn't find packets with ipkg installation system... :(

I have all internet connection sharings on and they are working well with other connections. Both machines ping each other etc.... What could I do? Is it possible to install packet with some other way. or do I always have to use internet for installling? Could linux server solve this problem?

ps. thanks for talking about Ipaq with linux... It's nice system but doesn't have very much users yet....

Re: Linux on iPAQ

Anonymous's picture

Install some web server on your PC, e.g. Apache. Put your *ipk files to your www-server home directory (which contains index.html). Then login into your iPAQ by ssh and type something like this:

ipkg install http:///.ipk

Re: Linux on iPAQ

Anonymous's picture

I am a complete novice with linux but you do not mention DNS. I beleive this will be required by the installer.

Re: Linux on iPAQ

Anonymous's picture

Add following lines to /etc/resolv.conf
nameserver xxx.xxx.xxx.xxx
nameserver yyy.yyy.yyy.yyy
(replace xxx....and yyy..... by your primary and secondary DNS IP)

Re: Linux on iPAQ

Anonymous's picture

Have a look at www.lisa.de. They sell an ipaq

with linux already installed.