Originally Published: Wednesday, 6 June 2001 Author: Mike Baker
Published to: develop_articles/Development Articles Page: 3/9 - [Printable]

OSDN Handheld Months: Installing Linux on a Casio E105

Linux.com Senior Developer Mike Baker takes us step-by-step through installing a Linux system on a MIPS-based Windows CE device. If pre-built distributions are not for you, then this article is.

Rolling Your Own  << Page 3 of 9  >>

Rolling your Own

After trying out the pre-made distributions I decided to try my own. What I'd seen so far basically hid the fact that it was Linux, in my opinion, the whole point. I wanted a system that ran X and used standard applications, not just a PIM. It seems this is exactly what the folks from the Familiar distribution had in mind.

So why don't I just run Familiar? You'll notice I didn't review the Familiar distribution, and there's a simple reason for that -- the Familiar distribution is meant to be loaded into the flash Rom of Compaq's iPaq which uses the StrongARM processor. Unfortunately my cheap editors weren't about to buy me an iPaq, and none of the applications from the Familiar distribution will work without recompiling for the MIPS processor: back to putting together my own distribution!

The Basics: Storage

Unlike the iPaq models most WindowsCE devices don't have a flash Rom so the only way to boot Linux is through the use of a compact flash card. You'll need to think carefully about how large a compact flash card you'll need. Remember, the compact flash card will contain the kernel, the bootloader and the entire root filesystem and acts essentially like a hard-drive. In fact, as far as Linux is concerned it's just another IDE hard-drive. While it's entirely possible to build a system in 8Mb it's also all too tempting to fill up a 64Mb card and then some. With the advent of cheap gigabyte drives commonplace in the desktop world most of us don't give much thought to how much space we're actually using. Chances are your /usr/bin is larger than the memory and storage space of the handheld combined.

So, how much space do you need? The answer is really "it depends." If you want an X11 server, a small suite of command-line utilities and a few X applications you're easily looking at 64Mb. If you want a stripped down PDA approach with the standard set of PIM (Personal Information Manager) utilities then you can do that in as little as 5Mb, (just look at QT's Palmtop environment). Personally though, I'd advise you to buy the largest card you can afford since the prices are pretty low right now. This article was written using a 64Mb card.

There are two ways you can use the card. First of all you can have the file-system as part of the kernel in a ramdisk configuration. This means when the system boots it loads both the kernel and the file-system into memory. You'll have a longer boot-up time and less free memory with this configuration, but the benefit is that the file-system will be reset upon each boot-up so you will not need to worry about maintaining it. However, you will need to rebuild your kernel each time you wish to change the file-system.

The other choice is to repartition the compact flash card into at least two partitions: a boot partition and a root partition. The boot partition would be a 5Mb DOS file-system containing the CyaCE boot-loader, config and the kernel then the root file-system on the remainder of the card. You can partition for swap space, but it's unlikely to be of much use due to the slow writing speeds of compact flash.

Rolling Your Own  << Page 3 of 9  >>