Unlike my Windows CE rant, this page is about putting Windows CE devices (and "PocketPCs") to good use.
I have a Philips Nino and a Compaq Aero 1520 (upgraded to PocketPC) which I set up as Linux/CE devices. This is a mostly uphill battle, because the software hasn't really been developed and the documentation is vague on some of the finer points. The project seems to have since pretty much disappeared.The information that I provide here is accurate, but is almost certainly out of date. The best overall source of docs was the www.linux-vr.org website, which is now some commercial company instead.
6/28/00: I've gotten LinuxVR (which is the name of the MIPS port of Linux) running on my Compaq Aero 1520. It has no graphical interface yet, but I'm working with Nano-X to try and get something on it.
7/4/00: after some kernel bug fixes, I've got microwindows (nano-x) running on my Aero, along with an updated key-engine console.
7/5/00: Since my modification to key-engine to make it use tpcal (part of the Microwindows distribution) instead of calibrador, it has been brought to my attention that tpcal 0.5, as distributed with MicroWindows, doesn't work on at least some devices. The problem is that it no longer gets mouse up events (presumably because of changes in mwin). A quick fix is to add this case in the WndProc in tpcal.c, which forces mwin to pass on the events:
case WM_NCHITTEST: return 1;
9/5/00: I don't have much time to work on LinuxCE at the moment, and I'm waiting for some of the pending kernel changes to stabilize before I dive back in. I'm also about to lose my Aero 1520 for an iPaq, which will make it much more difficult to do work on LinuxVR! Anyway, due to demand, I've put my 2.4.0-pre3 kernel from July 16th online. I make no guarantees as to its fitness for your purpose, nor will I recompile custom versions for people.
To do what I've done, you need an Aero 1520, a compact flash card (mine is 15Mb), a PC to connect to the device, and a Linux box to set up the cross-compilers on. NOTE: Doing this *will* erase everything on your CE device. The boot loader re-initializes internal memory for Linux to use, which includes the internal storage. (The CF card is untouched.)
Step one: set up cross compilers. The instructions that you should follow to set up the cross compiler for MIPS were at the Linux-VR site. I had no problems with this documentation -- it was up to date and correct.
Step two: get the kernel sources. I downloaded the latest kernel sources via CVS from the LinuxVR CVS repository. I believe that they also have tarballs available.
Step three: grab a ramdisk. I'm booting the LinuxVR kernel with an attached compressed ramdisk (which is appended to the end of the kernel file). All together, this makes one big file of about 2.5 Mb, which I copy to the flash card. In order to do this, you need a ramdisk. I started with one from the Linux-VR web site, which goes in to some detail about how to get one and create a new one. For now, just follow its links and grab "ramdisk.o", which you should copy in to the arch/mips/boot directory of the linuxvr source tree.
Step four: configure your kernel. I spent some time figuring out what options I needed for the LinuxVR kernel to work properly on my Aero. Some of it is obvious (like choosing "Compaq Aero" from the family type). I've also configured it for a simple framebuffer, over which I hope to get Nano-X running, power management, which I hope to make work someday (the hardware doesn't easily hook in to this in any way that I've found, so you can't just push the power button to suspend the device), and a serial console (so that I can watch it boot). The serial console will be going away soon so that I can use the serial port to set up a PPP link (once I get PPP tools compiled for it). But I digress. There are some default configurations, and I based the other kernel options on them. Some day I may come back here and enumerate all of the options in detail, but the ones above are the important ones.
Step five: compile the kernel. If you don't know how to compile a kernel, then you shouldn't be trying this at all. If you know what you're doing, then use "make stripped" as your final make statement (instead of "make zImage/zLilo/bzImage" or whatever). The LinuxVR source tree's "make stripped" rules will strip out unneeded data from the kernel, making it smaller. Of course, if you intend to debug the kernel, you're already aware that you shouldn't do this, since most of what's being stripped out relates to debugging.
Step six: download CyaCE. CyaCE is a bootloader for Windows CE MIPS devices. It will "run" the kernel (much like how loadlin.exe or lilo deal with this on x86 boxes). Again, note that this will completely erase everything on your CE device's internal memory. (While CE has some partitioning scheme which uses some of the internal ram for storage, Linux does not, and it uses all of it as RAM.) If you're determined to continue, then edit the cyacecfg.txt file -- if you've ever edited a lilo.cfg file, then it will look vaguely familiar. The file is fairly self-explanatory. Create a new configuration section for your new kernel (called 'vmlinux-stripped', out of the arch/mips/boot directory of your linuxvr build tree), and add the line "append=root=/dev/ram0". (This tells the Linux kernel not to mount a real root filesystem, but to use the ramdisk that you've appended to it). Without this line, you'll get errors about being unable to mount the root filesystem (when you try to boot into Linux).
Step seven: go to town! Copy the cyace.exe and cyace config file into the same directory (I've got them in the root of my storage card), and also put your kernel file there. From within CE, run cyace.exe, type in the name of your kernel file (if you have multiple configurations set in the config file from the previous step), and watch the results on a 9600 baud terminal emulator connected to the device's serial port.
Step eight: additional development. This is where I stopped. Based on the Microwindows ramdisk, I improved the existing software to a functional state. I worked on key-engine and the kernel space power management for the Aero 15XX before moving on to a newer non-MIPS device.