7. Compactflash Comments

Once formatted with a Fat16 partition for EPOC and an ext2 partition for linux, EPOC will see only the Fat16 partition (the D: drive). Linux will see and access both partitions, just as the case for Windoze; the /etc/fstab file gives the name of the Fat16 partition, of course. With such partitions, the psion effectively becomes a dual boot system. If you want to run EPOC applications as well, then be sure to format enough space (32MB?) to allow for saving those applications on the D: disk.

Disk sizes of over 1 GB have been used successfully in a 5MX. There is no known case of a compactflash disk failing to work because of its design, actually. There are occasional outright hardware failures, of course.

At one point I was told that I might save space using a JFFS2 filesystem, rather than ext2. However, I ran across an e-mail archive that had a message from the author of JFFS2 to the effect that compactflash cards are for all intents and purposes IDE devices, and ext2 was the way to go. Treat them like an ordinary IDE disk. Compactflash disks can be written on about 100,000 times before they give out, but these cards are also smart enough to distribute/rotate writing on them so as not to "wear out" particular spots. [If you do a little math you will find that it will take a long, long time to make enough writes to wear out a compactflash card.]

Compactflash and swap space. Because compactflash disks can be written on about 100,000 times before they give out, one generally does not want to use swap space, and I add the "noatime" option when mounting the disk to ensure that the access times are not constantly written to the disk. It would seem to be worthwhile making some swap space, if you had a large disk, that you could enable from time to time should you need it. On the other hand, if you really needed swap space you could just make a file for it.

Most compactflash disks should work in the psion, but drives of size greater than 1-2 GB are as yet untested. Also be aware that some disks work better than others, others are flakey, and some of them are faster than others; "your mileage will vary". Some cards won't work at all. Check out the DiskBench page (there are others around, e.g. for cameras and write time for photos) for a list of results and a utility to test the speed of your disk. It is not always true that you get what you pay for in this case (IMHO) - price seems to bear little resemblance to performance. It is worth searching the web for a few minutes for reviews of compactflash cards before purchasing. If you want to have a fairly complete system with X-windows and compilers, and still have disk space to work in, a 256 MB disk or greater is recommended. As of this writing (April 2006) disk of 1 GB size could be bought for around US$50.

It is worth getting a pcmcia compactflash reader (US$10) or other USB reader (US$20) for formatting and copying information directly to the compactflash card - these cards are as fast as UDMA33 IDE drives, so writing directly to them is WAY faster than trickling over the information on the 115200 baud serial line. Disks in pcmcia are recognized as IDE drives (/dev/hde), while disks in USB are recognized as SCSI disks (see your /var/log/messages file after you plug it into your notebook/desktop to see which disk it is).

Currently the compactflash card must be in the socket when you boot, and must not be removed while running. The current driver does not support hot-plugging the card.

I've been informed that the IBM microdrives do not fit into the Psion 5MX, nor do they work. You can read about the sad, if courageous, tale HERE [broken link...]. One hypothesis is that the microdrives do not work (after prying open your psion to cram it in) because the psions may not supply enough power to run them. Some lunatics have suggested powering them externally, but we'll leave that as a rainy day project... :)

You can execute "hdparm -u1 /dev/hda" which keeps the clock from slowing down with writes to the CompactFlash. The -u1 enables the unmaskirq option for the IDE driver, so the timer does not miss interrupts during the writes.

The Psion 5MX disk benchmarks vary considerably between compactflash brands, but are generally a little under 1 MB/s write speed. Testing with file sizes over 1 MB currently causes roughly one lost interrupt for each MB written on Psion on a Sandisk 96MB card, so that's why writes can be much lower. This may not happen on faster cards, and they have values for write speeds that are closer to laptop values. The cause of the lost interrupts is unknown, there are no available documents for ETNA.

Write times determined using the "time" command can be flawed because it severely underestimates the actual time of execution for technical reasons.

It develops that not all compactflash disks keep strict adherence to the compactflash standard. There have been reports that some compactflash cards are not recognized by one linux kernel version, but recognized by other linux kernel version. In particular, the 2.4.27 kernel seems not to recognize a few compactflash card types at boot up, while the 2.4.19 kernel recognizes those cards. The issue seems to lie in the IDE code, rather than the Psion 5MX kernel patch. The issue is presently a research topic, but if you find your new linux installation fails to boot because the compactflash card is not recognized, you might try a different type of compactflash card.