Handhelds.org - Open source for handheld devices

UserPreferences

PalmLifeDriveHowTo


Linux on Palm LifeDrive How-To

Home | Status | Hardware | Downloads | How-To | Bootloader

Using binaries

This is the method most people will want to use.

Bootloader: Cocoboot

Cocoboot is a PalmOS program that loads the Linux kernel into memory, kicks out PalmOS and starts the boot process. Download [WWW]cocoboot.prc and install it on your handheld.

Kernel: Linux zImage

The zImage file contains the Linux kernel and some small boot environment called initramfs that mounts the hard drive and loads the rest of the operating system. You will need to download a [WWW]zImage and copy it to the root directory of the LifeDrive's hard disk.

Rootfs: Familiar distribution

The root filesystem contains a set of default programs to get you started using Linux. At the moment it comes in three different flavours of the Familiar distribution. You will need to download one of these images and uncompress it. On Windows use [WWW]7-Zip. Then copy the uncompressed ext2 file to the root directory of the handheld's hard disk.

Note: These are unofficial Familiar builds by the Hack&Dev developers. Familiar does not currently officially support any Palm devices.

Swap file

Swap space, sometimes known as virtual memory gives the OS an area to store temporary data when it has run out of room in RAM. This is optional, but will make a speed improvement, especially when running GPE as the LifeDrive only has 32mb of RAM.

Windows users
Download [WWW]swap.gz, uncompress it and place it on the handheld.
Linux users
If you use Linux on your desktop PC you can quite easily create your own swap image. For example, to create a 96mb image:  # dd if=/dev/zero of=swap bs=1k count=96k
 # mkswap swap

Copy the resulting file swap to your handheld's hard disk.

Boot configuration

The initramfs needs to be told which rootfs you want to load and whether you want to use a swap file. This currently done by manually creating a linux.boot.cfg file in the root directory of the hard drive, but in the future may be automatically done by Cocoboot. For example, to boot OPIE with a swapfile called swap put these two lines in the file:

SWAP_DEV=$FILES_MNT/swap
ROOT_DEV=$FILES_MNT/opie-image-v0.8.4-palmld.rootfs.ext2

If you're just going to be use OPIE with the above swap instructions, just download this [WWW]linux.boot.cfg.

Windows users
The file needs to be saved with unix line endings, so you can't simply use notepad to edit it. If you don't know what this means, just download my one.

Ready to go

A few cautions before you boot. Do not press reset while in sleep, wake the device up and then press reset. Otherwise you will get stuck in an unresettable and will have to wait until the battery goes flat or reconnect it. To get back to PalmOS, just reset the device. If you feel it getting warm, unplug it - there's currently no battery charging control. Finally, I am in no way responsible if you damage your handheld, void you warranty or whatever by using this software. Use at your own risk.

Fire up Cocoboot and press boot! Cocoboot will say "/initrd.gz not found". This is normal. The initrd (initramfs) is built into the zImage.

If all goes according to plan a few minutes later you should be presented with an OPIE or GPE touchscreen callibration program. If the device resets with the message "Fatal Exception",

Now I've got Linux, what can I do?

Have a look at the FAQ and links on the FamiliarDistribution page. A lot of the documentation for the iPaqs and other handhelds should apply to the Palms too.

Since there is currently no networking in LifeDrive linux, to install extra programs download them from the official Familiar [WWW]v0.8.4 feed and copy them to your handheld in PalmOS. Boot into Linux, run the package manager, chooose install from local file and browse to /media/hdd.

If you get something cool working, don't forget to [WWW]tell us about it. ;-)

Older instructions

Compiling from source

Tools needed

Install a Cross-Compiler

You first need to install an ARM cross-compile toolchain (gcc, libc etc for ARM target). Gentoo has a useful script for building toolchains:

$ emerge crossdev
$ crossdev -t arm-unknown-linux-gnu
$ crossdev -t arm-unknown-linux-uclibc

For RPM based distros, try: [WWW]this

Then once you have your cross-compiler installed, type this:

$ export CFLAGS="-mcpu=xscale -Wa,-mfpu=fpa11"
$ export ARCH=arm
$ export CROSS_COMPILE=arm-unknown-linux-uclibc-

Change CROSS_COMPILE to suit your cross-compiler. The kernel adds that value to the start of each command, so if your cross-compiler is arm-linux-gcc, you'd 'export CROSS_COMPILE=arm-linux-'.

Building the kernel

Download and build the [WWW]hackndev SVN kernel by typing:

File zImage will appear in linux/arch/arm/boot/ directory.

The newest way is similar to the on on the [WWW]Tungsten E2 page. Use palmld_defconfig instead of palmte2_defconfig.

Building initrd

Building an initrd is theoretically simple (the author has not tried it yet):

  1. Download current buildroot from above or [WWW]here

  2. tar -xjvf buildroot-snapshot.tar.bz2

  3. make menuconfig

  4. Select the programs you want included.

  5. Choose gzip under Target Options

  6. make

  7. You now should have root_fs_arm.gz

    You may want to rename it to initrd.gz

  8. rename root_fs_arm.gz initrd.gz *

Building GPE

Currently GPE is very slow and building it is painful. Contact the project team if you are interested in building GPE or OPIE.

Building Garux

You need the initrd.gz and zImage files. Copy initrd.gz and zImage files into the directory where Garux is placed, then type commands:

File garux.prc will appear in directory. If it doesn't, check the error message(s).

Uploading to PDA

Inside PDA

To get into a Linux environment, simply run the program called Garux. It will give you a warning, ignore it. Currently no backup is necessary but is still recommended.

In case of a freeze up, simply click the reset button and all will be fine.

Return to PalmOS

To return to PalmOS, click the reset button at the bottom of your LifeDrive and after the reset you will be back in PalmOS. However, the time may be incorrect for some reason and it will reset back to 12:00AM and the date will reset to the default date.