This article describes the steps, that sould be done to port linux to palmos powered handheld.

Step 1

Create a page on wiki. The promary information, you need is: what hardware is inside your handheld. The most easy way to get it: disassemble the device ;)

Step 2

Get information about the CPU. Look for developer documentation. For example: if there's some PXA27x CPU, you should visit Intel site and download "PXA27x Developer's Manual". Register your machine ID here:

Step 3

This step may differ for various CPUs. But the idea is tha same. Find specific registers of the CPU, e.g. LCCRx in PXA that handle LCD. Most of such registers in PXA are located in 0x4XXXXXXX address space that's mapped by PalmOS (on most units) to 0x9XXXXXXX. So you can just use dump 94000000 0x9400000c command in HARET/P to get all the LCCR registers. If you need some other area of physical memory, use map command to map it to some virtuall address. BTW, check ARM Architecture Reference Manual. That's a great book abot ARMs, memory management and so on. Grab some other registers the same way. For example you can dump GPIO-related registers and get their meanings according to the CPU manual.

Step 5

Get hackndev SVN kernel source (linux/). In linux/arch/arm/mach-pxa (or whatever is appropriate for your CPU) make a new directory for your device. In that directory create Kconfig:


bool "Palm XX" select PXA25x ( or PXA27x etc ) help

This enables support for the Palm XX PDA.

Replace MACH_XSCALE_PALMXX with your ARM Linux registered MACH_ tag. Add Makefile:

# # Makefile for Palm XX support # obj-$(CONFIG_MACH_XSCALE_PALMXX) += palmXX.o

Create a main .c file, probably named the same as your directory, say palmXX.c:


  • Hardware definitions for Palm XX *
  • Author: You <your@…> * */

#include <linux/kernel.h> #include <linux/init.h> #include <asm/mach/arch.h> #include <asm/mach-types.h> #include <asm/arch/hardware.h> #include <asm/mach/map.h> #include <asm/domain.h>

#include <linux/device.h> #include <linux/fb.h>

#include <asm/arch/pxa-dmabounce.h> #include <asm/arch/pxafb.h> #include <asm/arch/pxa-regs.h>

#include "../generic.h"

#define DEBUG

static void palmxx_backlight_power(int on) {

/* TODO */


static struct pxafb_mach_info palmxx_lcd initdata = {

.pixclock = [b]fill-inb, .xres = [b]fill-inb, .yres = [b]fill-inb, .bpp = [b]fill-inb, .hsync_len = [b]fill-inb, .left_margin = [b]fill-inb, .right_margin = [b]fill-inb, .vsync_len = [b]fill-inb, .upper_margin = [b]fill-inb, .lower_margin = [b]fill-inb, .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,

.lccr0 = [b]fill-inb, .lccr3 = [b]fill-inb,

.pxafb_backlight_power = palmxx_backlight_power,


static void init palmxx_init(void) {




.phys_io = 0x40000000, .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, .map_io = pxa_map_io, .init_irq = pxa_init_irq, .timer = &pxa_timer, .init_machine = palmxx_init


Change all the name appropriately. Decode the LCD registers using the CPU's Developer Manual and fill-in the missing code.

Step 6

Build the kernel. Copy zImage into Garux directory. Wite a mach-palmXX.h file for Garux. Build Garux. Try to boot Linux ;)

Last modified 11 years ago Last modified on 10/25/08 03:43:55