This page is about experiences, hacks and general knowledge regarding GNU/Linux on iPAQ.

Why linux on ipaq?

Basically, just for the fun of it. I used to have an old palm-pilot manufactured by US-Robotics running Palm-OS v2.0.5. I did a RAM-update by myself and now it shows up something like 992K RAM. It is pretty amazing what a simple Dragonball microprocessor can do for you at 16MHz!

But I got myself a nice Ipaq 3630 - colour display, fast cpu - all the things that I thought that they would really make my day nicer. But what did I get? A handheld with great hardware but a lousy OS on it. IMHO a palm is much more usable than a win-ce machine - at much less cpu-power. I hate a pda crashing twice a day. Maybe I am just too dumb for this win-ce thing but I do not give much on a nice gui if I can't do what I want to.

That was the moment I decided to put linux on it.

Linux on Ipaq is far away from beeing usable for the average Palm or win-ce user. But at least it is showing much more of the hardware's capabilities. And it's a nice toy.

My objective using linux on ipaq is to have at least the same functionalities (basic PIM apps, IRDA-connection to my PC, full internet services like www, smtp, pop3/imap4 and X11). The bad thing about linux on ipaq has allways been the battery draining so fast compared to win-ce. Maybe unix is not the right power-saving OS for a PDA. Don't know, but things are getting better. [ Now I now it better: In the 2.4.16-Kernel series, power management was improved a lot!]

The trip.

To get linux on your ipaq you have to be informed about a few things. Things like making your ipaq a 500$ paperweight if things go wrong during the flash-procedure. Things like bootloaders, distributions for ipaq, latest kernel-patches etc.

All these things can be read at http://handhelds.org. This is the very basic starting point. Also many things here come from irc.openprojects.net (#handhelds.org, #familiar, #opie and #ipaq).

Basic Installation

  • Do the steps described in http://familiar.handhelds.org/familiar/releases/v0.5.1/install/H3600/install.html to get a booting ipaq. I used "Root Image (larger) for PPP or USB networking install (5.2MB)" because I do networking via ttyS0.
  • ipkg install_pending
  • echo "stty erase ^?" >> /etc/profile to make backspace delete chars in the shell
  • Prepare PPP
    • add slhc, ppp_generic and ppp_async in /etc/modules. Load these three modules manually using insmod.
    • create a /etc/ppp/peers/ipaq on the linux-pc looking like this
-detach
noauth
nocrtscts
lock
user ppp
connect '/usr/sbin/chat -v -t3 ogin--ogin: ppp'
/dev/ttyS0
115200
192.168.1.100:192.168.1.101

  • on the ipaq-shell say exit otherwise ppp login will not work
  • on Debian do a pon ipaq or on other linux do /usr/sbin/pppd call ipaq - you should be able to ping 192.168.1.101 now!
  • now do something like ssh root@192168.1.101 do get a ssh-login.
  • on the pc do echo 1 > /proc/sys/net/ipv4/ip_forward to enable ip-forwarding (necessary to make an internet connection via your pc)
  • echo "nameserver w.x.y.z" >> /etc/resolv.conf

Installing QPE/Qtopia

Follow the instructions that are published here

Installation familiar

  • ipkg update / ipkg list to list what packages are available
  • ipkg install ntpdate
  • ntpdate clepsydra.research.compaq.com to have the time/date set correctly. Otherwise you will get lots of messages about timestamps in the future in the next step!
  • ipkg install task-complete/task-x

Other nice things

modules

sh-2.03# cat /etc/modules
apm
h3600_ts
sa1100-rtc
h3600-sleeve
h3600_generic_sleeve
h3600-uda1341
sa1100_cs 
slhc
ppp_generic
ppp_async
sa1100_cs
ircomm-tty 
irtty
sh-2.03# 

Setting up usefull stuff

  • ipkg install vim ftp

Setting up irda

  • ipkg install irda-common
  • ipkg install irda-modules-2.4.16-rmk1

  • /usr/sbin/pppd /dev/ircomm0 on the pc
  • irattach /dev/ttyS0 -s & on the ipaq
  • ifconfig irda0 up on the ipaq
  • pppd /dev/ircomm0 115200 192.168.1.200:192.168.1.201 user 123 defaultroute local lock usepeerdns on the ipaq

setting up ssh-keys

  • to generate an old (v1) rsa key: ssh-keygen -N '' -C '' -f /etc/ssh/ssh_host_key
  • to generate a new (v2) rsa key: ssh-keygen -N '' -C '' -f /etc/ssh/ssh_host_rsa_key
  • to generate a new (v2) des key: ssh-keygen -d -N '' -C '' -f /etc/ssh/ssh_host_dsa_key

Mounting the cf-card

  • ipkg install pcmcia-cs
  • ipkg install pcmcia-modules-2.4.16-rmk1
  • also make sure that ide-modules and vfat-modules are installed

Best filesystem is ext3 - ext2 does fsck which takes ages, jffs2 is for flash memory only and reiserfs needs a 32mb log file. Make sure to use "noatime" when you mount it, otherwise the directory inode will be updated everytime you open a file - might be is a lifetime issue for flash.

rsyncing

on host

  • /etc/rsyncd.conf
gid = mattzz
uid = mattzz
read only = false
use chroot = false
transfer logging = true
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log

[ipaq]
        path = /home/mattzz/ipaq/rsync
        comment = here goes the ipaq-stuff

  • start rsync with rsync --daemon

on iPAQ

  • rsync -varpoz --exclude=/proc --exclude=/dev  / 192.168.2.100::ipaq

Congiguring automounting the cf-card

  • edit /etc/pcmcia/ide.opts

Using the skiffcluster

  • telnet to skiffcluster[1-6].handhelds.org as user guest (ssh/ftp not working here)
  • cd guest; cd your@email.address

Making screenshots

old fashioned way

  • cat /dev/fb0 > /tmp/screen.raw
  • sz /tmp/screen.raw or better do an ftp-transfer
  • raw2ppm screen.raw > screen.ppm
  • convert screen.ppm -rotate 270 screen.png for screenshots in portrait-mode

using http://desk.crynwr.com/scap

  • nc desk.crynwr.com 5473 </dev/fb0.

Converting the serial cradle to USB

Unfortunately the normal way described here of soldering the 4 USB wires to CON2 did not work for me, because these pins are not connected to CON1 - Compaq changed the PCB layout. BUT: There are 4 tiny holes where the USB wires can directly be soldered to, with all the protection diodes present big grin So this is much simpler! Beware of CON2 still fitting after soldering.

USB Cable Description Cradle PCB
black GND H3
red 5V H2
white USB Data - H5
green USB Data + H6

Making Ethernet over USB work smoothly

The network is looking something like ipaq 192.168.2.101 <---> host usb0 192.168.2.100, eth0 192.168.1.11 <---> gw 192.168.1.254 <---> internet

on iPAQ

  • modprobe usb-eth
  • ifconfig usbf up 192.168.2.101 netmask 255.255.255.0

on host

  • modprobe uhci
  • modprobe usbnet
now connect iPAQ to host via USB
  • echo 1 > /proc/sys/net/ipv4/ip_forward
  • ifconfig usb0 up 192.168.2.100 netmask 255.255.255.0
  • iptables -t nat -I POSTROUTING -j MASQUERADE -s 192.168.2.101/32 makes the ipaq see more from the world

Making usb working plug'n play

on ipaq

  • edit /etc/network/interfaces:
# usb network 
# (192.168.0.202 is the iPAQ's IP, 192.168.0.200 is the host's IP)
iface usbf inet static
        address 192.168.0.202
        netmask 255.255.255.0
        network 192.168.0.0
        gateway 192.168.0.200

on host

  • apt-get install hotplug
  • add alias usb0 usbnet to /etc/modutils/alias (Debian Woody) or to any other appropriate plate e.g. /etc/modules.conf
  • edit /etc/network/interfaces:
iface usb0 inet static
        address 192.168.0.200
        netmask 255.255.255.0
        up echo 1 > /proc/sys/net/ipv4/ip_forward && \
        /sbin/iptables -t nat -I POSTROUTING -j MASQUERADE -s 192.168.0.202/32
        down /sbin/iptables -F -t nat
  • put this in /etc/hotplug/usb/usbnet and make it executable:
#!/bin/bash
        /sbin/ifup usb0
  • add this line to /etc/hotplug/usb.usermap
# ipaq
usbnet  0x0003 0x049f 0x505a 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000

  • do /etc/init.d/hotplug restart
Now the usb0-interface should be brought up automatically whenever the ipaq is connected via usb.

Hacking opie

There is some information at http://dudu.dyn.2-h.org/nist/qt-notes.php on how to set up the compiler environment for ARM and x86


glorious screenshots

  • running qtopia/opie with bash:
    ipaq.jpeg
  • running xmame (marble madness):
    toipaq.png
  • Topic revision: r18 - 01 May 2009, UnknownUser
     
    This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
    Ideas, requests, problems regarding Foswiki? Send feedback