Handhelds.org - Open source for handheld devices

UserPreferences

HpIpaqH1940StepByStep


HP iPAQ h1930 / h1940 series

Home | Status | Hardware | Downloads | Documentation

Step-by-step userguide for Linux on the HP iPAQ h1930/h1940

Introduction

This guide is a work in progress. It aims to replace several outdated wiki pages and merge them into this one page. That will simplify keeping the wiki up to date, and also make it easier for first-time users to find the information they need.

This page will contain step-by-step instructions on how to get Linux to work on the HP Ipaq h1930 or h1940 series PDA. Both the commandline and graphical interface version are explained.

WARNING: Once you boot Linux on your PDA, all settings and programs you have in PocketPC will be erased! When you reset after playing with Linux, the factory default settings will be restored. So make a backup before continuing!

Step 1: Kernel

The kernel section is the same for the whole guide, so please follow this step first.

In this guide we use a patched vanilla kernel. That means that if you want to compile the kernel yourself, you'll have to download the tarball from [WWW]kernel.org and patch them using the patchsets found on the downloads page. The recommended method is to simply download the precompiled kernel image from the downloads page and use that one.

If you insist on compiling the kernel yourself, you can find more information on the HpIpaqH1940Kernel page.

Step 2 (option 1): Basic commandline-only system

Introduction

This part of the guide deals with getting a simple commandline/ssh only system running. It is based on an initrd (ramdisk) system, which is by no means permanent. All changes you make will be erased the next time you boot. If you don't know what the commandline or ssh is, this section is definitely not for you. This section is meant for (kernel) developers that don't want a heavy system, but merely want to have the tools available to test some stuff.

Initrd

To start the kernel with a rootfilesystem on a ramdisk, we'll have to use an initrd (initial ramdisk). It would be outside the scope of this document to describe how to create such an image, so just get it from the download page. Please make sure that the downloaded initrd is about 3.4 MB. If it's bigger, you probably have a browser that does on-the-fly gzip decompressing and you have to download the file using wget or another downloader.

HaRET

At the moment, the kernel can only be started from PocketPC using HaRET.

This is very simple to do. Just download the kernel, initrd and HaRET and put them in the same directory on your PDA. You have to create an extra file called 'default.txt' which describes to HaRET how it needs to boot the kernel.

Put this in default.txt and save it to the same directory on your device:

set MTYPE 347
set KERNEL "zImage"
set INITRD "initrd"
set RAMADDR 0x30000000
set CMDLINE "rw root=/dev/ram console=ttySAC2,115200n8 ramdisk_size=16384 panic=30"

bootlinux

Boot

Just tap on haret.exe on your PDA and look at the penguin. After booting, it will show you the login prompt and a message to unplug and replug the USB cable. You are now ready to ssh to the device! This is explained on the UsbNet page.

The root password of the console-only initrd should be 'abc123'.

Step 2 (option 2): Graphical (GUI) system

Introduction

This section explains the steps needed to get GPE and Opie running on your H1930 or H1940. For this we use precompiled images, which have been altered a little to make them work nice with our PDA. If you want to build images yourself, please see OpenEmbedded and [WWW]http://www.openembedded.org.

SD/MMC card

This section assumes you have an SD/MMC card which is working correctly with the available Linux kernel. To continue, you'll also need a cardreader on your desktop PC and know how to operate it from Linux.

To be able to run Linux from the SD card, you must make a dedicated partition for it. The minimum size is 50MB, there is no maximum size. If you want to use your card from PocketPC too, make sure your FAT16 partition is the first partition, otherwise PocketPC won't see it.

Create a simple Linux partition and format it to ext2 using mke2fs. Remember the partition number, when the new partition is /dev/sda2, the number would be 2. And please make sure the linux partition is a primary partition. It's unknown whether logical partitions work too.

So if you dedicate a whole SD card to Linux, you'll have only one big partition. It will be called /dev/mmcblk0p1 on the Ipaq, and /dev/sdX1 on your PC. Check /proc/partitions on your PC to see whether it is /dev/sda1 or /dev/sdc1 or something alike.

Images

The precompiled images can be downloaded from [WWW]http://anymore.nl/ipaq/files/graphical_images/.

After downloading, extract one of them (GPE or Opie) directly to the SD card using this command:

# cd /mnt/sdcard
# tar xfvjp /home/user/downloaded/gpe-image-arjan-<date>.tar.bz2
(of course this assumes you have mounted the card on /mnt/sdcard and downloaded the image to /home/user/downloaded/)

After extracting one of the images, edit etc/fstab to reflect the location and type of the root filesystem. The following line:

rootfs               /                    auto       defaults              1 1
should be substituted by something like:
/dev/mmcblk0p2       /                    ext2       defaults              1 1

In '/dev/mmcblk0p2', the last number is the partition number you remember from the previous step.

HaRET

At the moment, the kernel can only be started from PocketPC using HaRET.

This is very simple to do. Just download the kernel and HaRET and put them in the same directory on your PDA. You have to create an extra file called 'default.txt' which describes to HaRET how it needs to boot the kernel. A nice place to put this directory is on the iPAQ File Store, or on the FAT16 partition on your SD card. That way the files won't be erased when you boot Linux.

Put this in default.txt and save it to the same directory on your device:

set MTYPE 347
set KERNEL "zImage"
set RAMADDR 0x30000000
set CMDLINE "root=/dev/mmcblk0p2 console=ttySAC2,115200n8 panic=30 rootdelay=5"

bootlinux
Again, substitute '/dev/mmcblk0p2' with the correct partition.

Boot

Just tap on haret.exe on your PDA and look at the penguin. After booting, the calibration will come up and you will be able to use Linux on your PDA! Remember that the h1940 port is a work in progress, so a lot of things don't work yet. (ATM, this includes sound)