Index of /Systeme/jlime/arch
It's doable and is working well on my mp900. I'm going to try to mention at least something about almost every step in the process, so it's not as hard as it may seem from the length of this tutorial.
[*] Arch Linux ARM is actively maintained, and has up-to-date packages for all the same software you would find on your desktop.
[*] Like with all Arch versions, you get to pick pretty much exactly what is installed and nothing else, which is good for size and speed.
[*] If you use Arch on your desktop, you can run the exact same OS on both your desktop and HPC.
[*] Tends to cater towards your HPC being a "micro-laptop", e.g. by default you'll get real bash instead of BusyBox, a full glibc, pacman instead of ipkg. This one's a matter of preference of course. I haven't noticed any significant speed or memory usage differences, btw, from running the full versions of software and enjoy the convenience and familiarity of stuff working exactly the same as it does on my desktop. Of course, you can always install BusyBox etc if you prefer.
First, grab your CF card from the MP900/Jornada/whatever, and put it into a card reader on your desktop. Format it with gparted to have the usual small FAT partition with haret and make the rest some Linux filesystem. I recommend ext4 with the journal disabled; it should be the same wear-wise as ext2 but benchmarks have shown it to be faster, and it is more modern code. To disable the journal type "tune2fs -O ^has_journal /dev/sdx??" after creating the partition.
We'll need to recompile JLime's kernel after having made some slight changes. The reason? Well, most of the JLime stuff hasn't made it into mainline yet, so we can't use the kernel that comes with Arch Linux ARM because it doesn't support your HPC's screen/keyboard etc. And Arch Linux ARM's userland is compiled with a newer calling convention, known as EABI, so we can't use the stock JLime kernel (it'll refuse to run any EABI binary, confusingly claiming the file "wasn't found").
You'll need to set up a cross-compiler to build the kernel. It's been discussed elsewhere how to do this and JLime provides one prepackaged on the wiki page somewhere, but I used crosstool-ng to bake my own. We'll be compiling the kernel for EABI; I'm not sure if JLime's cross-compiler supports that. Also by using ct-ng, you get the latest and greatest version of GCC (better optimizing, etc), whereas JLime's prepackaged cross-compiler is the somewhat aging GCC3, I think.
ct-ng is really easy to use, once you get the hang of it. You'll want to compile for "Linux" (not bare-metal) and ARM EABI, and should end up with a toolchain named "arm-unknown-linux-gnueabi". By default ct-ng installs the toolchain in a subdir of your home directory named "x-tools". Here is my .config file for ct-ng.
Once you have your cross-compiler checkout the linux-2.6-hpc source from JLime's git repository. It's discussed how to do that in the wiki.
Apply this small patch to the kernel to fix a typo which newer versions of GCC will complain about. Then apply this small patch to enable the accept4() system call, which newer versions of udev require; if you don't have it udev will freak out and fill your screen will thousands of error messages. Arch Linux ARM of course comes with the latest version of udev.
Now before we can build the kernel we need to add the cross-compiler to your path so the build process can find it, and setup the Linux build process to target a platform other than the one we're compiling on. I did that with two scripts, which you can find here:
First from your terminal you type ". setup" to add the commands in setup to your current environment (this sets up your path), then you can use crossmake in place of make to build the Linux kernel. You may notice that these scripts declare crossmake as both a script and an alias, there is a good reason for that, I just don't remember what it is.
Ok, great, we have the cross-compiler and you've run the setup script in your current terminal. Run "crossmake menuconfig" and we'll set up your kernel for EABI. Go to "Kernel Features", check "Use the ARM EABI to compile the kernel", and also "Allow old ABI binaries to run with this kernel" (that last option makes your new kernel able to still run the old JLime userland, and it doesn't hurt anything so you might as well check it).
The default JLime kernel doesn't support the ext4 filesystem, so you might want to enable it now if you think you're ever going to need it, or if you took my suggestion above to format your root partition as ext4. Compile it into the kernel instead of as a module, and you won't need to mess with making an initrd.
As usual with kernel builds, "crossmake -j4", then "sudo crossmake modules_install". Your new kernel will compile. Copy arch/arm/boot/zImage into the Windows partition on the CF card. Setup haret's startup.txt to use the new kernel.
Mount the Linux partition of your new CF card and unzip the Arch Linux userland into it. You can get this from Arch Linux ARM's site and just like JLime, their distro comes as a tarball of the root filesystem so just untar it into the CF card's partition.
Copy the modules from the "sudo crossmake modules_install" step to /lib/modules/ of the CF card. They will have been installed to /lib/modules/???? on your desktop system, you need to "cp -r" the directory with the version matching your HPC's new kernel into /lib/modules/ on the CF card.
Insert CF card into HPC and boot, and you should see Arch Linux start up!
Now, configuration; some small things. You should definitely mount your root fs noatime. I do this to every Linux computer I setup, but it's triply important if your root filesystem is on flash, if you don't do it every read will cause a write. You may want to do something about the syslog, which writes stuff every now and then into /var/. JLime handles it by making /var/ a RAM drive, I just disabled the syslog entirely by taking syslog-ng out of the DAEMONS array in rc.conf. You can do whichever you prefer. And lastly, Arch Linux comes by default with some annoying cron scripts that run things like mandb etc periodically. I think that's probably unnecessary, and when it goes off your HPC will suddenly start running like molasses as mandb hogs all of it's feeble processor. Remove man-db, shadow, and logrotate from cron.daily, or just disable the cron daemon entirely.
To configure X, use the fbdev driver (pacman -S xf86-video-fbdev). I haven't tried to make the touchscreen work yet because I rarely use it since the touchscreen on my MP900 is kind of crap, but it should be pretty easy, just install the appropriate package and it should be able to interface with the JLime touchscreen code in the kernel.
So I think that's everything I did to get this working, if anybody tries it and has problems post back and remind me of what I left out and I'll try to help.
Here is a precompiled kernel from my system, tested on mp900. May or may not still work for Jornada owners, I'm not sure. But will definetely boot latest Arch Linux ARM on the MP900/c.
And for source availability reasons, here's two other patches which are in that binary.
This one adds support for the MP900's alarm LED, and makes it operate as the hard drive light.
And this is a rewritten keyboard driver, which fixes problems I was having with dropped keys when typing quickly.