Chapter 5. Installing ARMLinux on the Psion 5

This chapter describes how to install ARMLinux on your Psion 5 or Geofox One.

Introduction: Background

The Linux7k project is an effort to port the widely used Linux kernel to the Psion Series 5 and later pocket computers.

So far the team has ported the Linux 2.2.1 Kernel to the Series 5 and Geofox One and created Arlo and several initial RAMdisks (initrd) for the project. Work then stalled for a while as Psion were slow to release hardware information for later machines, but is now progressing again with the 2.4.1 kernel now booting on a Series 5mx.

Psion Series 5 Specifications

Specs

Memory

4 or 8MBs.

Processor

CL-PS7110 ARM Processor 18 MHz.

Display Resolution

640x240 (Half-VGA).

Display Type

Monochrome Touch-Screen (16 shades).

Removable Media Type

Compact Flash™ (CF) Disks.

Default OS

EPOC32 1.00 or 1.01.

How Does it Work?

  • Bootloader - The bootloader, Arlo does for EPOC what Loadlin does for DOS. It releases the memory from EPOC, places the kernel and initrd in the appropriate places in memory, and then boots the Linux kernel.

  • Kernel - The kernel has patches applied to it, which makes it compile for ARM based systems as well as having a few more patches for the Psion Hardware. The kernel port to the Series 5 is basically finished now.

  • Initrd - This is a virtual filing system image, which contains a miniature version of Linux. These can range in size but the more RAM used for the RAMdisk will leave less for the operating system. The kernel loads these images as the root partition.

Preparation

You will need:

  • A backup of your Psion's disks (this is very important as everything in your C: drive will be lost; your D: drive should escape, but don't count on it.

  • The Psion installer;

  • Arlo for your model of Psion (5 or 5mx);

  • A glued kernel image;

  • A compressed initrd;

  • A paperclip or similar, thin, blunt item (to reboot your machine).

Booting using Arlo

Copying Files onto the Psion

The easiest way to get the files onto your Psion is to use the transfer software for your host machine. This is PsiWin for Windows, Plp tools for GNU/Linux and PsiFS for RISCOS. Use this to transfer the necessary files onto the Psion's RAMdisk or CF through EPOC. For example, to copy the arlo.sis file onto the Psion's C: drive (RAMdisk) using plptools you type the following command:

rfsv write arlo.sis c:/arlo.sis

Installing Arlo

You need to install Arlo (the bootloader - equivalent to LILO) onto your Psion. To do this, extract arlo-0.51.tgz and copy the Arlo.sis file to your Psion, then copy INSTEXE.EXE and run it. This should change the icon for Arlo.sis which you can then run and it will install itself to either C: or D: as you select - it will work fine from either. You need to reinstall it each time you boot Linux. If you install it to a CF disk, you won't have to re-install each time - the section called Creating a Filesystem on your Compact Flash

Getting the Kernel

You need a kernel for this project. I would recommend trying one of Werner's precompiled ones. A good one to try is stable-221-cb23-519-psi.gz.

Next, uncompress the glued kernel image with:

gunzip <glued image name>

and copy the glued-* and initrd-*.gz files to C:\ on the Psion as image and initrd.gz.

Getting the Kernel from EPOC

Loading the Kernel

At this stage you are ready to boot into Linux. Double check you have good backups of your Psion and then double-click Arlo.exe. You will see:

Loading logical device Opening the channel Commands are: ... Option buffer at address XXX Memory description at address YYY > _

Now type:

l image

and you should see:

Opening file image Succeeded File size XXX Loading XXX bytes to address YYY Read XXX bytes No pages = ZZZ > _

Loading the initial RAMdisk (initrd)

Now type:

l initrd.gz

and you should see:

Opening file initrd.gz Succeeded File size XXX Loading XXX bytes to address YYY Read XXX bytes No pages = ZZZ > _

Passing Additional Parameters into the Kernel

If you need to pass any other parameters into the kernel at this point (for example an alternative root filesystem) you need to type:

o root=/dev/hda2

A full description of kernel parameters can be found in /usr/src/linux/Documentation/kernel-parameters.txt.

Running the Kernel

Now type:

b

Your Psion should now boot into Linux!

If it does a double bleep and then puts up the EPOC logo, something has gone wrong. Try reinstalling Arlo (from the Arlo.sis and INSTEXE.EXE files).

What can I do Now?

Good question. Start by mounting /proc, it's satisfying and actually useful.

Type:

mount -t proc /proc /proc

You can then ls /proc if you want, good, eh?

You can also mount CF disks with:

mount -t msdos /dev/hda1 /mnt

You will get some errors when you first mount the disk and long filenames will produce errors when they are ls'd.

If you are feeling brave you could:

dmesg > /mnt/dmesg.txt

But you run a greater risk of trashing your CF disk.

Creating a Filesystem on your Compact Flash

If you want to boot your system off a CF disk, you need to repartition it. You will need a reasonably sized CF though (over 16MB).

First, you boot into initrds3.gz with a kernel that supports CF disks. When this has booted up, you need to execute fdisk /dev/hda. You can then repartition your system. Ideally you should make a 4-6MB Fat16 partition as /dev/hda1, and then assigning the rest for Linux (/dev/hda2). When you have done this, boot into EPOC and format the CF. Install Arlo, a kernel and an initrd in the root of this partition. Now you don't have to re-install Arlo every time you reboot.

To boot a CF based system, you need to pass the appropriate option into the kernel (see the section called Passing Additional Parameters into the Kernel), alternatively, you will need to use the rdev command to alter the flags in your homebrew kernel before you glue it.

Autobooting Arlo from Reset

To automatically boot Arlo (or in fact any EPOC program) you must create a \system\data\wsini.ini file on your CF FAT partition; it should contain the following line:

STARTUP d:\arlo.exe

This presumes you have the Arlo executable on the D: drive (compact flash) and the associated Arlo.

How do I get Back to EPOC?

Type:

sync
sync
sync

Close the machine.

On the Psion:

Open the battery backup door and locate the small copper coloured circle near the battery, using a partly unfolded paperclip or similar, gently press in the copper coloured circle. Now close the backup battery door, and, while holding down both shift keys press the Esc/on key. The machine should bleep once and then display the Psion 5 splash screen, after a delay you will be back in the EPOC system.

On the Geofox: (info supplied by Hennie Strydom).

It is mostly identical to the Series 5, with the single exception that the reset switch is next to the speaker on the bottom of the Geofox.