Recent Linux on the iPaq (Kernel v4.6 (OE kernel 4.4) 2016-05-02)

This documents my attempt at booting the iPAQ 3630 using a recent Linux v4.x kernel. This machine has not seen a lot of love recently. This documents my attempt at booting it using a recent Linux v4.x kernel. It has a SA1100 StrongARM CPU and that is an exotic system that I need to get familiar with.

Get a boot loader onto the iPAQ

This was a huge obstacle for me, and once you've managed to do this you can erase all the httpd, pppd, opening of firewall etc settings you have to go through to get the boot loader onto the iPAQ. The boot loader is named ARM Bootloader and was developed by Compaq as part of a Linux attempt I think.

First install prerequisites, this is Fedora-based:

yum install -y ppp httpd ftp

Set up this script in /etc/ppp/peers/pocketpc which is close to the iPAQ Linux FAQ version, just that I use the 169.254.0.0 network instead of the 192.168.1.0 network:

dump
debug
/dev/ttyS0
115200
connect "/usr/sbin/chat 'ATZ\r' OK 'AT' OK 'AT' OK 'AT' OK 'AT' OK 'AT' OK 'AT' OK 'AT' OK 'AT' OK 'ATDT' CONNECT"
asyncmap 0
noauth
nocrtscts
local
lock
-detach
netmask 255.255.0.0
169.254.1.1:169.254.1.2

I also set up an alias in /etc/hosts like this: 169.254.1.2 ipaq ipaq.localdomain but it is not necessary, you can use the IP-number to do FTP to the device.

On the iPAQ: Start/Programs/Connections/Go to modem settings/New Connection, select "Hayes Compatible on COM1:", 115200 baud, Advanced, No HW flow control, 8N1, Bring up terminal and manually enter commands, Next, remove numbers just "0" as phone number, Finish, OK: "My Connection" should appear in the "Connections" folder, OK again. Select the connection, hit connect.

On the host, as root, type: /usr/sbin/pppd call pocketpc it is a bit counter-intuitive as you're not calling out to the Pocket PC, it's the pocket PC calling to you. And you respond, as if you were a modem. The terminal comes up on the iPAQ, I clicked the keyboard icon and manually entered the modem connection commands: ATZ AT AT AT AT AT AT AT AT ATDT and then it connected, clicked OK. Connection is up. You can probably modify the script above so it does not need so any "AT":s. You're just talking to that chat script.

Set up httpd (Apache) put ftpsrv.exe in the root folder, click and access it from the Internet Explorer on the iPAQ.

You may have a problem with Firewall and HTTPD at this point: run firewall-config as root, enable httpd service to be publically accessible.

Once the ftpsrv.exe is on the iPAQ, run it. Nothing will happen, as it is a pure internet service.

Access it from your host: ftp 169.254.1.2 it should either work, or you get a new problem with Firewall and FTP: run firewall-config as root, enable the ftp service to be publically accessible. Once the connection comes up log in as root with no password, then:

passive
binary
ls
put bootldr-sa-2.21.12.bin
put BootBlaster_1.19.exe

Then you can run BootBlaster to back up WindowsCE (if you want to keep it...) then write the Linux boot loader and reflash according to the iPAQ FAQ.

Once the boot loader is in place you can get it into gear by hitting the lower left key (with some calendaring icon) when powering on the device to get a serial console. It will say something like boot> and from there you can reflash the device with the supplied 2.4 bootstrap image (familiar Linux v0.8.2 from 2005, the newest version I could find) so you get a command line Linux version on the device. It is done like this simply:

boot> load root

Then hit e.g. CTRL+A followed by S (as in Send file) and select a .jffs2 image from the dialog. The bootstrap image will have a name like bootstrap-image-h3600-20050407124742.rootfs.jffs2.

Compiling a kernel

Booting a kernel

First set up the params linuxargs such that the console isn't turned of (as is the default in the flashed boot loader). Type params and check the linuxargs, then alter properly to turn on the console and save the new params like this:

set linuxargs = root=/dev/mtdblock1 init=/linuxrc noinitrd console=ttySA0,115200n8

This is not possible to set in any other way so this has to be set on every boot unless you do like me and put the cmdline into the kernel and override the boot loader command line. And that works nicely too.

The boot loader expects you to load the virtual address 0xc0008000 as it apparently configures the machine into virtual memory mode at boot. So issue:

load ram 0xc0008000

Upload the zImage using ymodem. Then boot the loaded kernel with:

boot addr 0xc0008000 SIZE

The SIZE is stated after the complete download of a kernel.

Compiling Basic OpenEmbedded

Clone the basic OpenEmbedded core by first installing prerequisites as stated on their getting started page, then cloning the OE-Core standalone setup. You can try building this with bitbake core-image-minimak to just test it. Then add the layers named meta-handheld and meta-initramfs by cloning them inside the OE base directory (the meta-initramfs layer is a subdir of meta-openembedded:

git clone git://git.openembedded.org/meta-handheld
git clone git://git.openembedded.org/meta-openembedded

Next add the layers to to build/conf/bblayers.conf like this:

BBLAYERS ?= " \
  /home/linus/oe-core/meta \
  /home/linus/oe-core/meta-handheld \
  /home/linus/oe-core/meta-openembedded/meta-initramfs"

Next set up the MACHINE and some proper parallelism in build/conf/local.conf:

MACHINE ?= "h3600"

Maybe make sure you have no cruft in your path with export PATH=/usr/bin:/usr/sbin:/bin:/sbin

Then just bitbake the result in your build directory:

bitbake core-image-base

Prebuilt images are available below.

Compiling GPE

NOT REALLY WORKING

GPE is probably still working as a viable palmtop environment, but I haven't figured out how to build it. As OpenEmbedded was formed from e.g. OpenZaurus and other GPE-centric distributions, it is very straight-forward to just enable the GPE layer and compile it into an OE build. Just add the required layers:

BBLAYERS ?= " \
  /home/linus/oe-core/meta \
  /home/linus/oe-core/meta-handheld \
  /home/linus/oe-core/meta-openembedded/meta-oe \
  /home/linus/oe-core/meta-openembedded/meta-initramfs \
  /home/linus/oe-core/meta-openembedded/meta-gpe"

Then just:

bitbake core-image-base
This will build a .jffs2 image with GPE enabled but I have not clue how to make the thing start :(

Compiling Opie for 16 MiB Flash

NOT REALLY WORKING

Follow the procedure above but clone meta-opie and add some more layers (including meta-qt4, which you need to clone):

BBLAYERS ?= " \
  /home/linus/oe-core/meta \
  /home/linus/oe-core/meta-handheld \
  /home/linus/oe-core/meta-qt4 \
  /home/linus/oe-core/meta-opie \
  /home/linus/oe-core/meta-openembedded/meta-oe \
  /home/linus/oe-core/meta-openembedded/meta-networking \
  /home/linus/oe-core/meta-openembedded/meta-initramfs"

You also need to select a version of the Opie environment to build by editing your build/conf/local.conf and adding a oneliner like this:

require conf/distro/include/preferred-opie-versions-1.2.5.inc

Then build the 16mb image using bitbake as usual:

bitbake opie-image-16mb

Flash the resulting .jffs2 file using load root on the H3630. Complete pre-built images are available below.

Files and prebaked images

Links