Running Linux on an iPAQ
By Martyn Honeyford2005-04-13
Install Linux
For detailed installation instructions, consult the release notes on the Familiar Web site. The following instructions should give you a feel for the process, but, as ever in the world of Linux, these steps may well change.
The first step of the installation is to install a new bootloader. Akin to LILO or GRUB in a normal desktop system, this is the initial program that runs when the iPAQ starts and allows you to load Linux.
The bootloader installation is supplied as two files, WindowsCE executable (BootBlaster.exe) and the bootloader itself. To install the bootloader, you first need to transfer these files to the iPAQ. This can be done in a number of ways, such as via ActiveSync, via a storage card (CF/SD/MMC) if your handheld supports it, or via a network connection (if you have it configured).
Once the bootloader installation program and bootloader file are on the device, simply run the .exe and follow the onscreen instructions to back up the existing bootloader and operating system (in case you ever want to go back to the existing configuration). Two things to note:
* If you are backing up the existing OS via a serial link, be patient: it took approximately 15 minutes on my machine.
* The bootloader installation program seems to expect the bootloader file to be in the My Documents folder (or a subfolder).
Now that the bootloader is installed, if you restart the device, you should be greeted with a different screen from normal -- that of the new bootloader.
The next step is to install the OS itself, which is distributed as a single jffs2 (journaling flash file system version 2) archive file. Depending on what hardware you have available, there are now three distinct options for how to proceed:
* If you have a CompactFlash Jacket and a CompactFlash storage card (SD/MMC cards are not supported for this process), then by far the simplest method is to copy three files (the jffs2 file, reflash.ctl, and md5sums) to the root of the CF card using either WinCE or another computer and place the card in the Jacket (and the iPAQ in the Jacket as well, obviously). Now simply reset the device by holding in the record button (on the left side) and you should see a list of images on the card (usually only one). Select the image using the joypad and install it directly -- this takes a few minutes.
* If you don't have a CF Jacket/card, then you need to use a serial cable/cradle. Unfortunately, USB cables/cradles don't work, so if your device came only with one of these, then you will need to buy one (they are widely available and reasonably inexpensive). Again, it is best to consult the installation instructions supplied with the device for detailed instructions, but the basic process is to connect the iPAQ to a host computer and transfer the jffs2 file (using the ymodem protocol) to the iPAQ over the serial line. Once the file is on the device, it is flashed using the command boot, which will flash the device as before.
Note that the transfer can take some time (it took over 20 minutes for me).
* If you have a CF jacket, it is possible to install Linux on a CF memory card without re-flashing the internal device, thereby leaving PocketPC relatively untouched. I say "relatively" because, due to the way in which PocketPC stores user data (in DRAM), when Linux is booted, it will erase all the user data (as Linux uses all of the available DRAM). This is still a useful method as it does allow a primitive form of dual-booting (albeit requiring an additional backup/restore when switching to/from Linux). Unfortunately, there is little information available on this method; it is not supported directly in the Familiar distribution as it requires the user to create a custom initrd filesystem. For those interested in this method, there is a specialised distribution (an off-shoot from Familiar) tailored for those with large capacity (160 Mb+) CF cards called Intimate. Unfortunately, it doesn't look like this distribution is actively being developed: the last release was in November 2001, and the last news item on the Web page is dated June 2003.
Whichever method you decide to use, the flashing process is now complete -- congratulations! If everything went well, you should now have a Linux-based PDA.
Tutorial Pages:
» Put a Penguin in Your Pocket
» Why Run Linux Instead of Pocket PC?
» Choose Your Hardware
» Download the Distribution
» Install Linux
» Get Connected
» Develop for it
» Reinstalling PocketPC
» Conclusion
» Resources
First published by IBM DeveloperWorks
