Handhelds.org - Open source for handheld devices

UserPreferences

HpIpaqHx4700HowtoInstallLinux


NOTE: THIS MANUAL IS NOT YET SAFE FOR USE

Installing Linux on HP iPAQ hx4700 series

Home | Status | News | Kernel | Hardware | Drivers | Serial Cable | Bootloader | Installing Linux

Introduction

This is a step-by-step guide to installing the Familiar Distribution for the iPAQ hx4700.

Warning: The installation instructions for version 0.8.4 of Familiar Linux do not apply in their entirety to the hx4700. The most important exception is that the hx4700 requires another bootloader than the standard one. If you download from the [WWW]Familiar Download page then your tarball contains the right bootloader, maintained by SDG.

Ingredients

Pre-install

Before you go through the efforts of installation and configuration. You might want to know a little bit more about what linux software is available for the hx4700. Here is a list of packages that are available for installation through the ipkg's repositories for the GPE gui environment as of 07/3/23.

As you'll notice, this list is lacking a audio / video player. This is because there isn't one available for the GPE environment at the moment (3/23/07). There used to be one named gpe-nmf, but it didn't work in this version of Familiar, so it was removed from the repositories. There are a number of other media players ported to, or in the process of being ported to, Familiar; but of course none of them seem to work either. Check out the PortingProjects for a complete list of what looks to be non-working media players. There is one mp3 player madplay, but it a command line only program.

A similar list is not currently available for the OPIE environment, but you can poke around [WWW]here to get a feel for the software available for OPIE. On the plus side OPIE does have a working media player, but it doesn't seem to work with hx4700's wifi.

Backup

Enter the HTC bootloader shell

The HTC bootloader is the original bootloader program that comes with the iPAQ. Enter the the HTC bootloader shell by holding Contacts and iTask (the little curvy arrow), then pushing the Reset button at the bottom of the device with the stylus. The screen you arrive to should say "v1.01" and have an "hp" logo. However, the screen is not backlit, so it may be difficult to see.

Set the device in the USB cradle and plug the cradle's USB cable into PC's USB port. At this point, a "USB" should appear at the top of the screen of the iPAQ device, replacing "SERIAL". On the PC, if it is a *NIX system, there should appear a device at /dev/ttyUSB0.

Access the device with a terminal program. On GNU/Linux systems minicom is frequently used. You may have to install the minicom package; not all GNU/Linux distributions include this package in the base installation.

You may have to enter minicom's setup mode to configure the modem link to /dev/ttyUSB0:

 minicom -os

Configure the serial setup so the device is set as /dev/ttyUSB0. You may have to hit Enter a couple of times at the terminal, but should get the following:

 USB>

Backup your original flash ROM contents

You should backup your ROM contents by means of the HTC bootloader's d2s command. At this point in time, backups can only be written to SD/MMC cards (Note: This will destroy all data on the SD card). You should use a card that is 256MB, since that makes backing up the SD card to your computer system manageable. However, it is not overly problematic to use a larger size. The progress in percent of this process will be shown on your device. The screen output follows:
 USB>d2s
 SD:Waiting for card insert.........
 CMD3 for SD, it's OK, ready to get RCA from response.
 SD:Detected one card
 SD:ready for transfer OK
 Total card size=3D680000e=0
 SDCARDD2S+,cStoragePlatformType=FF
 ***************************************************************************
 Store image to SD/MMC card successful.
 USB>

At this point, there are two options as to what to do:

  1. Put the SD card in a safe place and never use it again on the off-chance that you may ever want to reinstall Microsoft Windows again. Use a second SD card for the remainder.

  2. Save the contents of the SD card onto a CD or DVD, then continue. Assuming that your SD reader is /dev/sda, backup from SD of the main computer system is as follows:

 # dd if=/dev/sda of=mybackup.img bs=130M count=1

To restore the image to the SD card, one would do:

 # dd if=mybackup.img of=/dev/sda

Installation

Install the SDG bootloader

First, download the [WWW]bootloader ROM from the SDG Systems web site. As of this writing, the most up to date version is in the 20060615-gpe folder Note that this bootloader is not the same as the "bootldr" program that the Familiar Linux installation instructions may tell you to install on an (other than hx4700) iPAQ. Get the bootldr-1.2.3.rom (or later) file from the starter kit directories.

You may replace all occurrences of <sda> with the appropriate device name for your SD Card reader.

Write bootldr-x.y.z.rom image to the SD card using your PC. On a *NIX system:

 # dd if=bootldr.rom of=/dev/<sda>      # Wipes SD card clean!

On FreeBSD you need 'conv=osync' to pad the final output block and prevent a write error, e.g.,

 # dd if=bootldr.rom of=/dev/<daN> conv=osync

Insert the SD card into the iPAQ with the bootldr on it.

Now, start the HTC bootloader: Contacts + iTask + Reset. It will detect the SDG bootloader on the SD card and run it. The SDG bootloader will install itself into the iPAQ's flash ROM alongside the HTC bootloader. Just follow the on-screen instructions (no backlight!), ignoring the checksum failure report.

Flash Linux onto the device

Whereas the bootloader was flashed from an SD card, Familiar Linux can only be flashed from a CompactFlash (CF) card. The following instructions document how to install GPE or OPIE Familiar. Currently, (4/18/2007), Familiar v 0.8.4 is the most current release of Familiar. It can be downloaded [WWW]here . Note: the v0.8.4-rc* versions are precursors to the 0.8.4 branch. Don't use them unless you have a reason to.

  1. Make sure that the CF card is formatted with a FAT16 partition.

  2. Download the necessary files from the above link

  3. Lock the battery in place. This is not just a precaution: the machine will not restart in the bootloader unless the switch is in the locked position.

  4. Insert the CF card into the slot on the iPAQ, and start the SDG bootloader's flash utility by depressing the Contacts and Inbox buttons and pressing (with the stylus) and releasing the Reset button at the bottom of the device.

  5. You should see the SDG Systems logo and the message Scanning for images... for a couple seconds. Following that, the screen should prompt you to select an image file to load. Sometimes the screen gives the message Can't read control file. Pushing Record several times solved this issue for me.

  6. Once the control file is loaded, first select the kernel (you can scroll up and down with the Contacts and Calendar buttons on the left, then select the image you want to burn by hitting iTask). Proceed according to the instructions.

  7. If you get the error message Erase failed during the erase stage, try pressing Reset, immediately removing the battery, leaving it alone for a while (5-10 minutes), then trying again from step 1. Some people have reported they had to do this up to three times before the erase stage finally succeeded.

  8. Next, select the root image, and follow the directions. This one can take a while, be patient!

NOTE: I could not get my 512MB CF card to work. Workaround was to partition the first 63MB (not 64MB!) of my 512MB CF card to FAT16 and then copy the required files mentioned above to it.

Boot device

After the flashing has been completed, hit the power button on the top right of the iPAQ device. The device should now restart and boot into GPE or Opie depending on which one you installed. If it does not then try pressing the Reset button or removing the power cable and battery. On the first boot, Familiar Linux takes several minutes to start. It displays the Linux penguin and then "Please wait: booting...". You may find that only a text-based login prompt appears the very first time you boot. If this happens, press the Reset button again and it should successfully boot into GPE.

After calibrating the touchscreen, create a user account and log in.

==Increase Font and Icon Size== Right about now your eyes might start hurting from the small font and icon size. This can be easily fixed by clicking on the Settings folder and the the "Look and Feel" button and making a few adjustments.

Networking

Also see UsbNet and/or WindowsXpUsbNetworkHowTo

To get the unit's integrated wifi working with Familiar v .84 release mentioned in the previous install section, you first need some bin files from SDG Systems:

Copy this files to a cf card. From there, copy the files to the /lib/firmware/ directory on the hx4700. Make sure that when the files are copied over, that they remain in all CAPS. If your not familiar with setting up wifi, take a look at this [WWW]page.

SSH into the iPAQ device

After having configured the networks on both the iPAQ device and the computer, ssh into the iPAQ from the computer:
 # ssh root@192.168.0.202
 The authenticity of host '192.168.0.202 (192.168.0.202)' can't be established.
 RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
 Are you sure you want to continue connecting (yes/no)? yes
 root@1192.168.0.202's password:
 root@ipaq-pxa-2:~#

Note: to enable X forwarding when sshing into your device, use

ssh -Y root@***ip address of pda***

Upgrading

Upgrading the Installed Packages

After establishing a network connection, you should upgrade all the packages that were pre-installed to your root image. To do that you need to have network and DNS configured. On the IPaq, as root:

 # ipkg update
 # ipkg upgrade

This will download the package list from the stable feeds that are pre-configured on the root image and upgrade all the packages that have newer versions.

System Configuration

Bluetooth

Edit /etc/sysconfig/bluetooth to contain:

 BLUETOOTH_PORT=ttyS1
 BLUETOOTH_PROTOCOL=texas
 BLUETOOTH_SPEED=115200 

And apps such as gpe-bluetooth will now work.

Volume Control

To be able to manipulate the sound card's mixer levels via an ALSA-compatible mixer, you need to add yourself to the audio group. Do do so, as root enter the following keystrokes as shown:

vi /etc/group [press Enter]
/audio [press Enter]
A [type your UNIX username, then press ESC]
:wq [press Enter]

If you're logged into GPE, log out and log back in. At this point you should be able to control the mixer levels using an ALSA-compatible mixer, such as the command line-based amixer and alsamixer. GPE's minimix applet is currently unable to control the volume because the hx4700's current soundcard driver (snd_ak4641) doesn't provide a "Master" volume control. PaulHoepfnerHomme is working on improving this situation at time of writing.