Linux on Palm TX How-To
Home | Status | Hardware | Downloads | How-To | Binary Install How-To | Bootloader
DISCLAIMER
Before starting testing linux on your Palm TX backup your data as actually there's no guarantee that after a soft reset your PalmOS data and applications are preserved and/or not corrupted. The only way to restore the contents is to backup before starting testing linux, hard reset and restore your handheld data with a hotsync or with a backup tool(some applications may need to be reinstalled).NOTE: the support for Palm TX is actually in a very early stage, so expect to see every kind of problems and kernel errors
Tools needed
To build the kernel:In order to build the kernel you need a cross-compiler that generates code for the arm processor. Cross-compilers are often distributed as ToolChains, packages that contain all the tools needed to cross compile. Depending on your linux distro, you may find different toolchains binaries. Have a look at this page (DevelopmentToolchains) to have more information.
Some installations known as working:
-
Gentoo: crossdev (emerge crossdev and run crossdev -t arm-unknown-linux-uclibc)
-
Debian:
scratchbox
-
Mandriva 2006: arm-linux-gcc-3.4.1.tar.bz2 package at ftp://ftp.handhelds.org/projects/toolchain
to build garux:
-
palmos-sdk - PalmOS header files
-
prc-tools - cross-compiler for m68k and ARM platforms
-
pilot-link - application to upload files to PDA from Linux
to create the initrd:
-
buildroot - for building custom initrd
Initramfs / Initrd
Newer releases of the kernel will use initramfs. To build an initramfs:-
check out latest source: svn co https://svn.sourceforge.net/svnroot/hackndev/linux4palm/initramfs initramfs
-
make
-
The result should be a file named: initramfs_data.cpio.gz, otherwise check error message(s).
-
Note: If you build an initramfs be sure to set the Initramfs Source to your archive in your kernel config.
However, If you still want to use an initrd: You can grab one from
mem0.com
Building the kernel
The kernel containing the latest changes for the Palm TX is actually hosted by the project-
check out the latest sources: svn co https://svn.sourceforge.net/svnroot/hackndev/linux4palm/linux/trunk linux
-
cd linux
-
make palmtx_defconfig
-
make oldconfig
-
make
Root Filesystems
You can get prebuilt root filesystems fromFrom there you can modify and do as you please with them.
TODO: info about creating rootfs from scratch.
Bootloader: Cocoboot or Garux
While Cocoboot is the newer of the two bootloaders (and could be considered less stable), it has one big advantage over Garux: You don't have to recompile cocoboot for each kernel you build. Garux requires the kernel and initrd to be compiled into itself, but is tried and true (more stable).Option 1: Building Cocoboot
-
Cocoboot's latest source is hosted by
-
check out the latest sources: svn co https://svn.sourceforge.net/svnroot/hackndev/cocoboot/trunk cocoboot
-
cd cocoboot
-
make
This will create cocoboot.prc. If the file is not created, check the error message(s).
Option 2: Building Garux
-
The Garux' latest sources are actually hosted by the project
-
login anonymously to the CVS: cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/garux login
-
check out the latest sources: cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/garux co -P garux
-
cd garux
-
copy the zImage to the garux directory
-
copy the initrd.gz to the garux directory
-
make clean
-
make palmtx
A file garux.prc will be created. If it doesn't, check the error message(s).
Uploading to PDA
linux.boot.cfg-
The boot config is a simple file that lets linux know the location of your rootfs and swap file(if you have one)
-
create a new file (unix line endings only, no CrLf)
-
add the line: ROOT_DEV=/media/mmc1/put_your_root_image_name_here (replace put_your_root_image_name_here with your actual root image filename)
-
for a swap: SWAP_DEV=media/mmc1/put_your_swap_image_name_here (replace put_your_swap_image_name_here with your actual swap image filename)
Using pilot-link
-
via USB: PILOTPORT=/dev/ttyUSB0 pilot-xfer -i garux.prc
-
via serial port: PILOTPORT=/dev/ttyS0 pilot-xfer -i garux.prc
Some distributions may automatically create a link /dev/pilot, so you can transfer with
-
pilot-xfer -p /dev/pilot -i garux.prc
Using Card Export II
-
Start Card Export II on handheld
-
Linux: mount /dev/sdaN /mnt/card (replace the N in sdaN with the device number [ifyou only have ide drives this will most likely be sda1] Card Export makes the palm show up as a scsi device)
-
Windows: You should see a new drive under My Computer
General
-
copy the bootloader to /Palm/Launcher on the card
-
copy your root filesystem (ext2 image) to the root of the card
-
copy your swap file to the root of the card
-
copy the linux.boot.cfg file to the root of the card
-
Cocoboot users: copy your kernel (zImage) to the root of the card
-
Cocoboot users: if you use initrd copy your initrd (gzipped) to the root of the card
Return to PalmOS
Soft reset generally seems to work, but the only way to gaurantee everything is back to normal is to hard reset and a restore.NOTE: backup your data!! There is No Guarantee that after a soft reset your PalmOS data and applications are preserved and/or not corrupted. The only way to restore the contents is to backup before starting testing linux, hard reset and restore your handheld data with a hotsysnch or with a backup tool (some applications may need to be reinstalled)