Boot image constructor
----------------------

In order to boot a Linux kernel on a Psion S5 or a Geofox One, you need:
 - this package
 - binutils and egcs installed
 - Arlo installed
 - a kernel image
 - an initrd (see ftp://lrcftp.epfl.ch/pub/people/almesber/psion/env-*.tar.gz
   or download one from ftp://lrcftp.epfl.ch/pub/people/almesber/psion/binary)

Installing binutils and egcs:
 - read the build and install instructions on
   ftp://lrcftp.epfl.ch/pub/people/almesber/psion/xdev-0.README
 - either build binutils-2.9.1.0.15 and egcs-1.1b according to the
   instructions, or
 - download ftp://lrcftp.epfl.ch/pub/people/almesber/psion/xdev-0.tar.gz and
   install according to the instructions (they're also contained in xdev-0, in
   scratch/psion/xdev/README)

Arlo can be installed as follows: 
 - get Arlo 
   http://www.yipton.demon.co.uk/arlo/latest/
   or
   ftp://linux-7110.sourceforge.net/pub/linux-7110/Arlo 
   (at the time of writing, the latest version is 1.23)
 - unpack Arlo 
   unzip arlo.zip
   (Warning: Arlo extracts into the current directory.)
 - follow the instructions in readme.txt

The kernel image can be built as follows:
 - get linux-2.2.1.tar.gz from your favourite mirror
 - get the following two ARM Linux patches
   ftp://ftp.arm.linux.org.uk/pub/linux/arm/kernel-sources/v2.2/
     patch-2.2.1-rmk2.gz
   ftp://ftp.netwinder.org/users/p/philb/linux-2.2.1-philb-990208.gz
 - get the linux-7110 patch
   ftp://lrcftp.epfl.ch/pub/people/almesber/psion/crash+burn-NN.patch.gz
   (at the time of writing, the most latest version of the patch is 24;
   more recent versions are very likely to work too)
 - extract the kernel and apply all patches
   tar xfz linux-2.2.1.tar.gz
   zcat patch-2.2.1-rmk2.gz | patch -p0
   zcat linux-2.2.1-philb-990208.gz | patch -p0
   cd linux
   zcat ../crash+burn-NN.patch.gz | patch -p1 -s
 - either  make xconfig  or use a default configuration with
   cp myconfig .config
   make oldconfig	(just hit Enter if it prompts for some choices)
 - build the kernel:
   make Image
 - the kernel image is now in linux/arch/arm/boot/Image

Building and running the boot image constructor:
 - unpack everything
   tar xfz boot-14.tar.gz
   cd boot
   make
 - ./glue.pl /wherever/Image >boot_image
   (Note that the sizes displayed by glue.pl do not include the padding, so
   the result is always bigger than the sum of the components.)

Running the kernel:
 - download the boot image and, if desired, an initrd image, to the
   Psion/Geofox, directory C:\
 - run arlo.exe
 - start a terminal emulator on your PC, set to 9600 bps, 8n1 (optional)
 - on the Psion/Geofox, go to the a)dvanced e)expert menu and type
   l boot_image
   l initrd.gz		(optional; or initrd, etc.)
   b
   or:
   use an arlo.cfg file

Adding support for a new memory layout
--------------------------------------

You don't need to do this if you have a Psion S5 or a Geofox One.

 - determine all possible memory configurations
 - write a file mem.<name> listing all memory areas, with each line containing
   the start address and the length in bytes, both numbers in hex (no 0x
   needed)
 - add mem.<name> to MEMFILES in Makefile
 - make
 - check the resulting map.inc file
 - if the map gets too complex, remove other configurations or remove/change
   areas which yield tiny detection steps. If all else fails, add support for
   variable step sizes to findmem.S
