Difference between revisions of "Linux on the Ipaq HX4700"

From IKE
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
* ??MB SD/MMC memory card
 
* ??MB SD/MMC memory card
 
* Some way to read/write CF and SD on your computer (not mandatory, but will make life much, much simpler)
 
* Some way to read/write CF and SD on your computer (not mandatory, but will make life much, much simpler)
 +
 +
==Enter the HP Maintenance screen==
 +
Enter the HP Maintenance screen by holding '''Addressbook''' and '''iTask''', then pushing the '''reset''' button at the bottom of the device. 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 visualize.
 +
 +
Sit the device in your cradle and plug the USB plug into your computer's USB port. At this point, a "USB" should appear at the top of the screen, replacing "SERIAL". You should also have a device '''/dev/ttyUSB0'''.
 +
 +
Access the device with any terminal program such as minicom. With minicom, I logged in as a superuser (''e.g.'', root) and then entered setup:
 +
# minicom -os
 +
 +
I then configured the serial setup so the device was set as '''/dev/ttyUSB0'''. I hit enter a couple of times at the terminal, and got the following:
 +
USB>
  
 
==Backup your shit==
 
==Backup your shit==
 +
I then backed up my old image to the SD ('''note: this destroys all data on the SD card'''). I would recommend using a 256MB SD or less, since that makes backing up the SD card to your computer system manageable. The progres in percent of this process will be shown on your device. The screen output follow:
 +
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:
 +
# Put the SD card in a safe place and never use it again on the off-chance that you may ever want windows again. Use a second SD card for the remainder. This option is not recommended.
 +
# Save the contents of the SD card onto a CD (if your SD is < 650MB) 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
 +
 +
To restore the image to the SD card, one would do:
 +
# dd if=mybackup.img of=/dev/sda
  
 
==Install the bootloader==
 
==Install the bootloader==
Line 67: Line 97:
 
  :wq -- Command (:), Write file (w) then quit (q)
 
  :wq -- Command (:), Write file (w) then quit (q)
  
==Add sources==
+
==Add package sources==
 
First, start editing the "feeds.conf" file, which is used by ''ipkg'', Familiar's package management system. Unfortunately, only ''vi'' is present at the moment, so we have to use that.
 
First, start editing the "feeds.conf" file, which is used by ''ipkg'', Familiar's package management system. Unfortunately, only ''vi'' is present at the moment, so we have to use that.
  
Line 84: Line 114:
 
Because of some problems with the packages, do the following to upgrade:
 
Because of some problems with the packages, do the following to upgrade:
  
  ### Fix the various things that are messed up
+
  ### Install packages that have to be done before the upgrade
# update-alternatives --remove lsmod /bin/lsmod  # deals with the lsmod bug
+
  # ipkg install diffutils                        # Installs diff-utils for later
  # vi /etc/passwd                                # Remove the line that starts with 'ppp'
+
  # ipkg install busybox                          # Fixes the busybox upgrade bug
# mv /etc/init.d/udev /etc/init.d/udev-old      # fix udev link problem
 
# rm /etc/rcS.d/S03udev                          # Fix udev link problem
 
# rm /etc/rc0.d/K20apmd                          # Fix apmd link problem
 
# rm /etc/rc1.d/K20apmd                          # Fix apmd link problem
 
# rm /etc/rc2.d/S20apmd                          # Fix apmd link problem
 
# rm /etc/rc3.d/S20apmd                          # Fix apmd link problem
 
# rm /etc/rc4.d/S20apmd                          # Fix apmd link problem
 
# rm /etc/rc5.d/S20apmd                          # Fix apmd link problem
 
# rm /etc/rc6.d/K20apmd                          # Fix apmd link problem
 
# mv /etc/init.d/apmd /etc/init.d/apmd-old      # Fix apmd link problem
 
# rm /etc/init.d/bluetooth                      # Fix bluez-utils-nodbus
 
  # rm /etc/rc0.d/K19bluetooth                    # Fix bluez-utils-nodbus
 
# rm /etc/rc1.d/K19bluetooth                    # Fix bluez-utils-nodbus
 
# rm /etc/rc2.d/S23bluetooth                    # Fix bluez-utils-nodbus
 
# rm /etc/rc3.d/S23bluetooth                    # Fix bluez-utils-nodbus
 
# rm /etc/rc4.d/S23bluetooth                    # Fix bluez-utils-nodbus
 
# rm /etc/rc5.d/S23bluetooth                    # Fix bluez-utils-nodbus
 
# rm /etc/rc6.d/K19bluetooth                    # Fix bluez-utils-nodbus
 
# mv /etc/init.d/dropbear /etc/init.d/dropbear-old # Fix dropbear links
 
# rm /etc/rc0.d/K10dropbear                      # Fix dropbear links
 
# rm /etc/rc1.d/K10dropbear                      # Fix dropbear links
 
# rm /etc/rc2.d/S10dropbear                      # Fix dropbear links
 
# rm /etc/rc3.d/S10dropbear                      # Fix dropbear links
 
# rm /etc/rc4.d/S10dropbear                      # Fix dropbear links
 
# rm /etc/rc5.d/S10dropbear                      # Fix dropbear links
 
# rm /etc/rc6.d/K10dropbear                      # Fix dropbear links
 
# mv /etc/init.d/hotplug /etc/init.d/hotplug-old # Fix hotplug links
 
# rm /etc/rc0.d/K89hotplug                      # Fix hotplug links
 
# rm /etc/rc6.d/K89hotplug                      # Fix hotplug links
 
# rm /etc/rcS.d/S40hotplug                      # Fix hotplug links
 
# mv /etc/init.d/networking /etc/init.d/networking-old # Fix netbase links
 
# rm /etc/rc0.d/K40networking                    # Fix netbase links
 
# rm /etc/rc1.d/K40networking                    # Fix netbase links
 
# rm /etc/rc6.d/K40networking                    # Fix netbase links
 
# rm /etc/rcS.d/S40networking                    # Fix netbase links
 
# mv /etc/init.d/opie /etc/init.d/opie-old      # Fix opie-taskbar links
 
# rm /etc/rc0.d/K99opie                          # Fix opie-taskbar links
 
# rm /etc/rc1.d/K99opie                          # Fix opie-taskbar links
 
# rm /etc/rc2.d/S99opie                          # Fix opie-taskbar links
 
# rm /etc/rc3.d/S99opie                          # Fix opie-taskbar links
 
# rm /etc/rc4.d/S99opie                          # Fix opie-taskbar links
 
# rm /etc/rc5.d/S99opie                          # Fix opie-taskbar links
 
# rm /etc/rc6.d/K99opie                          # Fix opie-taskbar links
 
# mv /etc/init.d/pcmcia /etc/init.d/pcmcia-old  # Fix pcmcia-cs
 
# rm rc0.d/K20pcmcia                            # Fix pcmcia-cs
 
# rm rc1.d/K20pcmcia                            # Fix pcmcia-cs
 
# rm rc2.d/S20pcmcia                            # Fix pcmcia-cs
 
# rm rc3.d/S20pcmcia                            # Fix pcmcia-cs
 
# rm rc4.d/S20pcmcia                            # Fix pcmcia-cs
 
# rm rc5.d/S20pcmcia                            # Fix pcmcia-cs
 
# rm rc6.d/K20pcmcia                            # Fix pcmcia-cs
 
  
  
  ### Do the upgrade
+
  ### Upgrade all packages
# ipkg install busybox                          # Fixes the busybox upgrade bug
 
# ipkg install sysvinit-pidof                    # Fixes some sort of pidof problem
 
# ipkg install detect-stylus                    # Fixes some sort of detect-stylus problem
 
# ipkg install diffutils                        # Installs diff utils for later
 
 
 
  # ipkg upgrade                                  # Upgrades all packages
 
  # ipkg upgrade                                  # Upgrades all packages
  
Line 152: Line 126:
 
# '''/etc/fstab''' - reject
 
# '''/etc/fstab''' - reject
 
# '''/etc/hostname''' - reject
 
# '''/etc/hostname''' - reject
# '''/etc/network/interfaces''' - reject (the IP changes to ''192.168.0.202'')
+
# '''/etc/network/interfaces''' - reject (the IP changes to ''192.168.0.202'' if you accept)
# '''/etc/network/interfaces''' - accept
 
  
 
==Add useful packages==
 
==Add useful packages==
 
+
Packages that I think have to be installed to make the system useful:
==Problems==
+
* [http://www.nano-editor.org/ Nano] text editor:
<pre>
+
# ipkg install nano
Downloading http://ewi546.ewi.utwente.nl/feed//task-bootstrap_1.0-r25_ipaq-pxa-2.6.ipk
+
* PDF viewer (gpdf)
task-bootstrap: unsatisfied recommendation for kernel-module-ipv6-2.6
+
  # ipkg install gpdf
task-bootstrap: unsatisfied recommendation for kernel-module-ipsec-2.6
+
* Xstroke and minipredict
task-bootstrap: unsatisfied recommendation for kernel-module-nvrd-2.6
+
*
task-bootstrap: unsatisfied recommendation for kernel-module-mip6-mn-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-tun-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ide-cs-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ide-disk-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ide-probe-mod-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-loop-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-vfat-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ext2-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-sunrpc-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-nfs-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-btuart-cs-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-dtl1-cs-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-bt3c-cs-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-rfcomm-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-bnep-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-l2cap-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-sco-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-hci-uart-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-pcnet-cs-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-serial-cs-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-airo-cs-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-af-packet-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ppp-async-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ppp-deflate-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ppp-mppe-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ip-gre-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ip-tables-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ipip-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-irda-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-irlan-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-irnet-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-irport-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-irtty-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-ircomm-tty-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-input-2.6
 
task-bootstrap: unsatisfied recommendation for kernel-module-uinput-2.6
 
 
 
Configuring pcmcia-cs
 
System startup links for /etc/init.d/pcmcia already exist.
 
Shutting down PCMCIA services: done.
 
Starting PCMCIA services: cardmgr[23450]: watching 1 socket
 
done.
 
 
 
Configuring portmap
 
  System startup links for /etc/init.d/portmap already exist.
 
/etc/rc2.d/S18portmap: 47: pmap_dump: not found
 
Stopping portmap daemon: portmapno /sbin/portmap found; none killed.
 
.
 
Starting portmap daemon: portmap.
 
/etc/rc2.d/S18portmap: 47: pmap_set: not found</pre>
 

Latest revision as of 13:37, 30 October 2005

Introduction

I have found no step-by-step guide on the web for installing Familiar for people who do not wish to spend their lives studying and understanding the technology. This is especially true for my device, the iPAQ hx4700. As such, I'm writing this manual. Thanks to Azad for his patience and testing of this manual.

Please note that I first made this manual on or around 25 October 2005. As such, hopefully some of the small idiosyncrasies disappear with time, and hopefully I document the others that come up. However, the chances are that I will not maintain this very well in the future, so please use some caution and feel free to update this page at your whim.

Ingredients

  • iPAQ hx4700
  • USB Cradle or Serial cable
  • 64+MB CompactFlash (CF) memory card
  •  ??MB SD/MMC memory card
  • Some way to read/write CF and SD on your computer (not mandatory, but will make life much, much simpler)

Enter the HP Maintenance screen

Enter the HP Maintenance screen by holding Addressbook and iTask, then pushing the reset button at the bottom of the device. 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 visualize.

Sit the device in your cradle and plug the USB plug into your computer's USB port. At this point, a "USB" should appear at the top of the screen, replacing "SERIAL". You should also have a device /dev/ttyUSB0.

Access the device with any terminal program such as minicom. With minicom, I logged in as a superuser (e.g., root) and then entered setup:

# minicom -os

I then configured the serial setup so the device was set as /dev/ttyUSB0. I hit enter a couple of times at the terminal, and got the following:

USB>

Backup your shit

I then backed up my old image to the SD (note: this destroys all data on the SD card). I would recommend using a 256MB SD or less, since that makes backing up the SD card to your computer system manageable. The progres in percent of this process will be shown on your device. The screen output follow:

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 windows again. Use a second SD card for the remainder. This option is not recommended.
  2. Save the contents of the SD card onto a CD (if your SD is < 650MB) 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

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

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

Install the bootloader

Flash linux onto the device

  1. Once the SDG Bootloader has been installed, enter the flash system by depressing the Addressbook and Email buttons, then pressing the Reset button at the bottom of the device.


1. Depress Addressbook and Email, then Reset to enter the SDG flash screen

Boot device

Configure internal network

On the iPAQ, first set the root password from the console:

root@ipaq-pxa2:/# passwd
Changing password for root
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
Enter new password:
Re-enter new password:
Password changed.
root@ipaq-pxa2:/#

By default, the IP of the iPAQ will be 192.168.129.211. When the cradle is plugged into the computer, the module usbnet should automatically be loaded. Set the IP on your computer device (presumably usb0) to 192.168.129.1, for example.

# ifconfig usb0 192.168.129.1

SSH in

After having configured the networks on both the iPAQ device and the computer, ssh into the iPAQ:

# ssh root@192.168.129.211
The authenticity of host '192.168.129.211 (192.168.129.211)' 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@192.168.129.211's password:
root@ipaq-pxa-2:~#

Configure external network (internet)

Now, we must also assin a gateway and select a DNS server. I will assume that the USB connection is being used to provide internet and that the computer attached knows how to serve the internet. Assuming that the computer's IP address is 192.168.129.1, we will do the following:

# route add -net default gw 192.168.129.1

Now we will enter the DNS server using vi. Use exactly the following keystrokes:

# vi /etc/resolv.conf
i
nameserver 192.168.129.1
<ESC>
:wq

Explanation:

i -- "Insert"
nameserver 192.168.129.1 -- The typed text
ESC -- exit "Insert"
:wq -- Command (:), Write file (w) then quit (q)

Add package sources

First, start editing the "feeds.conf" file, which is used by ipkg, Familiar's package management system. Unfortunately, only vi is present at the moment, so we have to use that.

# vi /etc/ipkg/feeds.conf

Use exactly the following keystrokes:

i
src/gz koen http://ewi546.ewi.utwente.nl/feed
ESC
:wq

Once this is done, update the feeds:

# ipkg update

Upgrade packages

Because of some problems with the packages, do the following to upgrade:

### Install packages that have to be done before the upgrade
# ipkg install diffutils                         # Installs diff-utils for later
# ipkg install busybox                           # Fixes the busybox upgrade bug


### Upgrade all packages
# ipkg upgrade                                   # Upgrades all packages

Personally, I did the following with regards to the changes to the files that it asked for:

  1. /etc/fstab - reject
  2. /etc/hostname - reject
  3. /etc/network/interfaces - reject (the IP changes to 192.168.0.202 if you accept)

Add useful packages

Packages that I think have to be installed to make the system useful:

# ipkg install nano
  • PDF viewer (gpdf)
# ipkg install gpdf
  • Xstroke and minipredict