LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to Linux Subscribe to Newsletters

Linux on an iPAQ
Pages: 1, 2

Installing Linux on your iPAQ

The actual installation process is fairly straightforward, although as with all such activities, care must be taken to prevent creating a brick. Compaq has committed to recovering any units which do meet with an unfortunate flash, but they'd really prefer not to have to. Also, it's advisable to make a backup of the current WinCE installation before you overwrite it; you paid for it -- might as well keep an image.



Ironically, the initial installation of Linux on the iPAQ requires the use of a Windows desktop platform. This is because we need to install the osloader program, which bootstraps the process. This can only be transferred to the unit by using Microsoft's ActiveSync tool. Osloader also creates the WinCE backup images, which are also transferred by ActiveSync.

Osloader contains a copy of the bootldr program, which handles how the iPAQ boots. This is similar to the Agenda VR3's PMON, or a PC's BIOS/LILO, and is written to the boot block of the device. As with other devices with a boot block in the flash, this should be write-protected to prevent accidental overwriting.

The remainder of the installation process is done by way of a serial connection using a communications program like Hyperterminal under Windows. As all color iPAQs come with USB cradles, it means a serial cable or cradle must be purchased before the Linux installation can be completed.

Once bootldr is installed and running, a dialog is established through the serial port at 115,200 Kbps. Installing or upgrading Linux simply involves entering "load [blockname]" (when {when "blockname" is replaced with bootldr, kernel or root, or a hex address), and then sending the appropriate file to the device via xmodem.

Earlier versions of bootldr had problems with transfers under Linux because of xmodem timing issues, but this has been improved with later versions, and can be further tuned manually by setting timeout values. For this reason, along with better power management support, I advise you to upgrade bootldr to the latest version -- rather than using the one installed by osloader, which will most likely be much older than what's currently available.

Exactly what files are flashed into which sections depend on the particular distribution being installed. They all share the bootldr, and they all have a kernel image and at least one file image, but these can vary considerably between distributions. Also, some use multiple cramfs format filesystems, while the latest Familiar uses a single JFFS2 format partition.

For specific installation instructions, see the ReadMe doc or other documentation included with each distribution. These documents are all quite complete, and can be followed by anyone with moderate technical ability. The good news also is it is actually rather difficult to incorrectly flash the units to a point of not being able to recover to bootldr. Once bootldr is installed and write-protected, upgrading between the different distributions is fairly easy.

Running Familiar 0.4

Booting the Familiar environment takes less than 20 seconds to go from a reset to having a full Linux and X Window system up and running, with the Blackbox window manager. By default, Familiar launches its full-screen handwriting recognition (HRW) program fscrib, a fork of xscribble, which opens a small window in the upper-left-hand corner of the screen.

Hidden at the very bottom of the screen is a control panel that can be fully displayed by tapping at the very bottom of the screen. This lets you move between the open windows on the current desktop, and switch between one of four desktops. Because this panel is always top-most on the display, you can use this to navigate around even when an application opens a full-screen window.

Applications are launched by tapping anywhere on the background desktop area. The menu is generated from a simple text file, /etc/X11/blackbox/blackbox-menu, which can be modified as desired to add new items. For those who have trouble reading the anti-aliased menu items, this can be a handy file to check out too.

Familiar 0.4 is configured to have the display in "landscape," or rotated mode, giving a 320 x 240 pixel display. "Portrait," or 240 x 320, can also be configured, if desired; a menu-option for this possible, using the xinerama extension of X, although isn't installed by default.

Selecting HWR.
Selecting stylus-as-mouse.
Handwriting recognition is activated by clicking on the keyboard icon on the fscrib window; clicking the mouse icon reverts to regular stylus-as-mouse mode.

 

The xvkbd keyboard.
The xvkbd keyboard.

The HWR program, fscrib, is interesting in that unlike most other handwriting-recognition systems, you draw (and leave a trail) on the entire screen. After each stroke, the trail is quickly removed, and you continue on. The trail drawing and removal is done by fscrib itself, and does not rely on having the applications redraw themselves. The HWR itself is activated by clicking on the keyboard icon on the fscrib window; clicking the mouse icon reverts to regular stylus-as-mouse mode.

While the character recognition is quite good (see HowToUseFscrib at the Wiki site), there are times when a virtual keyboard is needed. For this, the program xvkbd is provided. It is actually possible to have both running at the same time, for quick interchange between them.

While there has been quite a bit of software ported to the iPAQ, Familiar 0.4 does not come packed with very many applications. Instead, it is assumed you'll update and upgrade your iPAQ with desired software using the ipkg facility. Similar to the RPM or DEB facilities under desktop Linux distributions, ipkg is a user-friendly way of handling software packages, and is network enabled.

For console access to the iPAQ, there is the rxvt X terminal provided in the application's menu. Using a regular serial communications program, Familiar also is configured to allow serial console access (the root password is "rootme"). You can use this to ensure you have a good serial connection to the device.

xterm screen shot.\
The rxvt X terminal.

In addition, the serial port is also configured to detect the start of a PPP session. As root on the connected Unix desktop, enter:

/usr/sbin/pppd /dev/ttyS0 115200 192.168.1.100:192.168.1.3 nodetach noauth debug nocrtscts lock user ppp connect '/usr/sbin/chat -v -t3 ogin--ogin: ppp'

... and then wait. Within a few seconds you should get a report of success and should be able to ping the iPAQ. The above assumes your host computer's IP is 192.168.1.100, and the IPAQs is being assigned as 192.168.1.3. Also, adjust /dev/ttyS0 to be appropriate.

By default under Familiar 0.4, the only network service available (other than X at 8000) is ssh. So the next step is to ssh into the machine. Enter ssh root@192.168.1.3, and if everything's working OK you should quickly be greeted with a "request root's password" message. rootme, and you're in.

If ssh fails, but you're able to ping the iPAQ, it means the ssh daemon failed to launch. This is almost always because the ssh_host_key was not created, usually caused by not completing the install instructions. This can be rectified by running /usr/bin/ssh-keygen -f /etc/ssh/ssh_host_key -N '' on the iPAQ, and then sshd. This can be done via rxvt, or by breaking the PPP connection and using the serial console access.

Once you have a PPP session running with ssh access, additional configuration can be done through the comfort of TCP/IP networking. Files can be transferred between the iPAQ and the desktop machine using scp. To enable access to the full Internet by the iPAQ, its IP must be masqueraded. This is done on the host computer, and is detailed at the Handhelds Wiki site, among many others.

Once the iPAQ is able to connect to the full Internet, the last step is to configure either the /etc/resolv.conf file with one or more DNS servers, or at least set up an entry in /etc/hosts for familiar.handhelds.org. This will allow the ipkg system to connect to its server, allowing the ipkg update and ipkg upgrade commands to work correctly.

At this point, you're pretty much working with a standard Linux installation; it just happens to be sitting in your hand or in your pocket -- instead of on your desk or floor. I find it rather amusing that the display size, 320 x 200 pixels, is the resolution that many of us were first able to render to as a "bitmap," using our clunky old Apples and Commodore 64s.

Conclusion

The Compaq iPAQ is a remarkable piece of hardware engineering, with a tiny form-factor considering the power of the device. There is little wonder why the product has been in such high demand lately. Even without all the software of the Palm, an iPAQ running WinCE can be a great asset during those occasional "who's got the best PDA" contests.

Fortunately, and largely thanks to Compaq themselves, there are also several Linux-based options as well, as detailed above. The diversity of the offerings is also interesting, as we watch different groups (both commercial and not) build upon the base Linux kernel and OS to deliver different targeted solutions.

For anyone who's wanting to run a Linux-based iPAQ as a day-to-day PDA, one of the specialized distributions like PocketLinux or QPE would probably be your best option right now. Familiar is also a possibility, as there are a couple of Personal Information Management (PIM) suites available for the platform, including the PIM software for VR3 by Agenda Computing.

But really, where the most excitement seems to center is around making the iPAQ as capable as possible as both a Linux and a X Window system platform. The general option seems to be that, well, sure it can run PIM apps, but it could be a portable network analyzer, or a video-streamer, or the CPU for a wearable platform (PCMCIA video cards and all), or, well, just about anything.

The question as to which windowing system is best -- X, Qt, or Microwindows -- is still being "discussed." Those in the X camp argue that the ability to import and export displays, not to mention the ease of application porting, far outweigh the slight speed advantages of a direct-to-framebuffer option. This can be best measured by the number of apps being ported to the different platforms. Only time will tell for sure, but I suspect that X will end up the most common target.

Emulation is also an area receiving a lot of attention. People are porting emulations for older devices (Gameboys and Commodore 64s, for example) to the iPAQs, and running their old software within the machines. I'll personally bet anyone a pint of beer (at the pub of my choosing) that we'll see the POSE Palm emulator running on the iPAQ within a year. I own a Palm, so using an image of the ROMs in the POSE will be legal and give me access to all the Palm apps. I think this will be a common situation.

The community that has formed around the Handhelds.org site and the Linux iPAQ development project, is large and active. The development e-mail lists receive dozens of posts a day, with the IRC channels regularly attended. Development types will immediately feel right at home.

On the other hand, the Linux iPAQ user community is not nearly as well-represented. This can quite simply be explained by the fact that there aren't many end users using Linux on their iPAQs -- they're sticking with WinCE. And, in the short term, this isn't likely to change.

But for power users who want more, the iPAQ running Linux is a very versatile platform. While Linux isn't likely to cut much out of WinCE's market share, those using Linux are able to enjoy the inexpensive "kit" made possible because of the demand for product (the M$ "tax" non-withstanding).

Anyone interested in mobile, "personal" computing would be well rewarded giving Linux on an iPAQ a try. While not quite ready for end users yet, it is definitely worth experimenting with now -- a full-powered PC in your pocket. Besides, the weight of the iPAQ nicely balances that of your Palm in your other pocket, until the day you don't need it anymore ...

Online resources

There are considerable resources available online for iPAQ developers. Interestingly, there are fewer user-targeted sites, but these will no doubt develop over time.

Handhelds.org
Site run by Compaq to "encourage and facilitate the creation of open-source software for use on handheld and wearable computers". Hosts CVS and FTP servers with distributions, kernels and apps.

HandheldsWiki
User contributed/edited web resource pages.

Familiar homepage
Download and development resource site for PocketLinux.

PocketLinux.org
Download and development resource site for PocketLinux.


Have you tried any of the various Linux distributions available for the iPAQ? If so, tell us what you've discovered.
You must be logged in to the O'Reilly Network to post a talkback.
Post Comment
Full Threads Oldest First

Showing messages 1 through 14 of 14.

  • Please Help!!!
    2003-10-30 21:58:08  anonymous2 [Reply | View]

    hello.

    I'd like to port arm-linux 2.4.16 on Itsy pocket pc, which is now ported the Linux 2.0.30 on the system.

    Even though, after reading this article, I wonder that if I follow this direction, whether the Itsy will operate well or not.

    I don't know the way how to do this exactly.

    I didn't try to follow this direction, yet.
    Because of the lack of confidence of possibility.

    Before doing this, somebody who knows the way or the better way helps me. please...

    Thanks for your attention...
    God bless you...

    e-mail: phcsunny@davinci.snu.ac.kr
  • intimate linux on hp ipaq h2215
    2003-10-15 15:51:43  anonymous2 [Reply | View]

    does intimate linux run on the hp ipaq h2215?
  • Pls help
    2003-09-21 05:21:41  anonymous2 [Reply | View]

    I have got an iPAQ from a friend and the iPAQ is running on Linux and Opie is installed. Can anyone tell me how to set up a connection between the iPAQ and my notebook which has no serial port, so that I can transfer files between them? Urgent!
    • Pls help
      2006-11-06 01:05:47  face_man [Reply | View]

      I have a HP iPAQ running windows ce and contains alot of data which i wish to store in a linux computer via the USB.Give me info on the files needed to synch and update my diary, address book, etc.
    • Pls help
      2004-01-07 05:38:12  anonymous2 [Reply | View]

      If you have a USB get keyspan USb to serial and serch the web for a the activesync linux clone to sync the your device with your linux box

      good luck
  • Thereīs also the Zaurus
    2003-04-28 21:44:48  midtoad [Reply | View]

    While Compaq gets lots of press for the versions of Linux that are available for the iPaq, donīt forget the Sharp Zaurus, which also runs Linux. The 5500 and 5600 available in N. America use a version of Linux thatīs based on debian. There is a strong user community with forums at http://zaurus.com/dev or http://www.zaurii.net. And there is software available at handango, or at a number of other places.

    cheers
    midtoad
  • Opie on an iPaq 3650
    2002-11-23 19:20:51  sterling_aug [Reply | View]

    I just got Linux Opie running today on my iPaq 3650.
    It took about 2 weeks of experimenting with varios versions and distributions but it all came together this morning.
    I did find that most of the HowTo's are still missing info required to understand what is happening during the whole process. I plan on trying a few more versions and then adding my touch to the HowTo's so the next person has it a little easier.
  • back to Win CE
    2001-08-14 06:07:57  gdom [Reply | View]

    Now i have mLinux LISA 0,9 on my Ipaq 3630. And i really miss my WinCE 3,0.
    No connection to Win NT PC,
    No Outlook transfer,
    No E-Mail by infrared gsm Handy.

    Is the anybody can help me to get back WinCE 3.0!!
    • back to Win CE
      2003-08-06 16:04:04  anonymous2 [Reply | View]

      this is window$
      no backup cd, no tool to make a backup
      microsoft sucks
      • back to Win CE
        2003-11-20 06:16:28  anonymous2 [Reply | View]

        I really need to get mine back too.

        www.ipaqrepair.co.uk will retore it, bot tried them, but very tempted, anyone know if they're reliable?

        admin@lawrencenetwork.com
  • mLinux distribution
    2001-06-07 04:44:08  perak [Reply | View]

    To be complete i think you should add a german distribution for iPAQ called mLinux based on QTEmbedded (site in German?)

    The URL is :
    http://www.lisa.de/pages/de/mlinux/tech_daten.html
  • Why?
    2001-06-06 10:50:09  cspangen [Reply | View]

    Why install linux on an IPAQ when you will be able to get PDA's with linux pre-installed soon, like the on that sony is comming out with. People that do not use Windows do not need to go through the hassle of dealing with windows just to install linux.

    karl
    • Why?
      2001-06-14 08:27:10  tetherow [Reply | View]

      The author was incorrect in stating you have to use active sync to install the bootloader. I did a complete install on my iPAQ to HH v0.21 and the only windows I had to deal with was WinCE on the iPAQ while I installed OSLoader.
  • has anyone tried FreeBSD ??
    2001-06-05 18:33:52  rendhalver [Reply | View]

    hi all
    just a curiosity at the moment
    but has anyone considered or actually tried installing FreeBSD on an iPAQ ??


Tagged Articles

Post to del.icio.us

This article has been tagged:

ipaq

Articles that share the tag ipaq:

Linux on an iPAQ (3 tags)

Linux on Pocket PCs (2 tags)

View All

linux

Articles that share the tag linux:

Managing Disk Space with LVM (74 tags)

Use Your Digital Camera with Linux (60 tags)

mdadm: A New Tool For Linux Software RAID Management (59 tags)

Asterisk: A Bare-Bones VoIP Example (43 tags)

View All

pda

Articles that share the tag pda:

Java 2ME and MIDP Development (3 tags)

What Is a BlackBerry (3 tags)

Palmtop NetBSD (2 tags)

Linux on Pocket PCs (2 tags)

Linux on an iPAQ (2 tags)

View All

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com