OVERVIEW

Proboot is a boot loader for Psion 5mx Pro. It can be used to load the
Linux kernel image from the sys$rom.bin file on the compact flash disk.

Later on the code may be combined with the Blob boot loader for more 
functionality...

IMPORTANT NOTES

Please note the following:

1. Proboot only works on 5mx Pro machines. These machines have a 
   128 byte EEPROM that loads the sys$rom.bin from the Flash card. 
   This code does not work on 5mx, Revo, Mako. This could could be
   modified to work on Netbook possibly.

2. Proboot currently does not have any LCD output.  It only prints one
   line to the serial console and then boots Linux.

3. Some Psion hardware is not initialized correctly in the Linux kernel
   version linux-2.4.16-rmk1-5mx1. For example, LCD and ETNA 
   CompactFlash drivers won't initialize the hardware correctly. Serial 
   console is the only thing that works. 

   I would recommend NOT TO USE (make backups!) proboot with version 
   linux-2.4.16-rmk1-5mx1, or anything earlier, as it may cause disk 
   corruption. Please use kernel version linux-2.4.17-rmk5-5mx1 or 
   later. 

4. I don't know what the sys$rom.bin file format is. No you cannot
   a custom Epoc sys$rom.bin file with this. The file contains a 
   header, boot code and the kernel. For Epoc, there is also a 
   virtual file system, and probably the user settings memory space
   at the end. For example, trying to truncate the Epoc sys$rom.bin
   will make Epoc not to boot. 


BINARY USAGE

Partition your CompactFlash with a FAT partition type 6, and a Linux 
partition. You must set the FAT partition bootable for the Psion 
bootloader to recognize it. The fat partition may also need to start
at 1, for example:

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1   *         1       121     15472    6  FAT16
/dev/sdb2           122       734     78464   83  Linux

Run proglue.pl Perl script to create the sys$rom.bin:

./proglue.pl Image none "root=/dev/hda2 ro console=tty0"

The "none" is for no initrd file. Run ./proglue.pl without any options
to see more examples.

Then copy the sys$rom.bin to your CF card. Back up the old one first if
you want to use Epoc.


COMPILING FROM SOURCES

First run make (Requires arm-linux-gcc cross compiler)

Then run the proglue.pl script mentioned above. There are some extra targets in the Make file, such as make lcd, or make initrd. You need to modify the paths 
at the top of the Makefile to use these.


HOW DOES IT WORK

Proboot creates a sys$rom.bin image that is compatible with the Psion
boot images. The image contains a header, the boot code, and the Linux
kernel Image.

Psion 5mx Pro machines have 128 bytes of boot EEPROM at physical 
address 0x10000000. This EEPROM code loads the sys$rom.bin image from
the CompactFlash card, moves it to the beginning of the RAM at
0xc0000000, and then starts executing the code.

The created sys$rom.bin file format is following:

Location        Size    Description
0xc0000000        4B    Warm reboot??? jump to 0xc0000100 (Unused)
0xc0000004        4B    Cold reboot jump 0xc0000f3b
0xc0000008      248B    Other unknown stuff (Unused)
0xc0000100     3645B    Warm reboot code start??? (Unused)
0xc0000f3b              Cold reboot code start (Proboot start)
...
0xc0028000     128KB    Linux kernel parameters (Not yet used)
0xc0048000              Linux kernel start TEXTADDR
...
0xcXXXXXXX              Linux initrd (Not yet used)


CREDITS & THANKS

This code is modeled after Ben Williamson's SRAM 
boot loader code for the EP7211 board.

The font file is snatched from the Linux kernel 
source.  

Linux boot function is snatched from Peter Van
Sebille's boot2nd.

The "glue" idea is from the old Psion 5/5mx 
boot loader boot-15.

Copyright 2002 by Tony Lindgren <tony@atomide.com>
