Zhong's Blog

# My uClinux on Sony Clie project

## Intro

This page is about getting uClinux to run on Sony Clie Palm OS handheld devices. Why do it? Because it's fun and because I could learn something along the way. I have got a Clie PEG-T615C handheld that I do not use anymore, so I thought it would be cool to use it to run Linux.

My initial Google search netted a site dedicated to running Linux on Palm OS handhelds. It is a bit outdated, but has quite a bit of useful information and it actually got me started in the first place.

## News

• The new uClinux Clie support patch file that fixes bugs I mentioned earlier
• The patch that adds MediaQ-1100 framebuffer support
• The new uClinux image built with the above two patches included
• 09/05/2004 I have got Microwindows working on Clie. No touchscreen yet. I have established that it uses Burr-Brown ADS7846 touch screen controller, but I do not know what ports it is connected to. If I am able to find this information, I will try to get it working

• 09/02/2004 Another cool site about uClinux on Dragonball. Currently I am using the information from this page to get microwindows running on Clie

• 09/02/2004 This is a commercial offering of uClinux for Palm III and Palm V There is kernel source archive available and it is an old (2.0.x) uClinux kernel with a couple of drivers added.

• 08/30/2004 I have been working on a framebuffer driver for the Clie's MediaQ-1100 graphic controller. At this point I have got a simple driver that works reasonably well. Here is a picture. Yeah, that's a normal 8bpp framebuffer Linux console with familiar logo :) Once I am ready I will submit it to uClinux tree

• 08/30/2004 I have been chasing a nasty bug (actually two) in the Palm Loader (a PalmOS application that is used as a boot loader for Linux). One was introduced by yours truly, another has been there all along. Again, I will submit a patch soon

• 08/30/2004 I need to take a breather from hacking at Clie, staying up late and consuming inordinate amounts of coffee

## Running the pre-built uClinix image

If you just want to check it out:

2. Get a serial cable. See below for instructions on how to make one

4. Copy the prc file to your Clie. Connect a terminal at 9600 baud, no parity, 8 bits per character, 1 stop bit to the serial port you had connected the Clie to. Start the palm loader application. Observe the kernel boot messages in the terminal window

If you want to build your own image here are the steps:

1. First of all, this uClinux port has been developed and tested on Clie PEG-T615C device. It will probably also work on other Sony Clie T and S series devices. See above for the list of tested hardware.

It will probably also work on other PalmOS 4.x based devices running on Motorola MC68VZ328 Dragonball VZ CPU. There are seem to be some differences related to which of the 2 Dragonball UARTs (serial ports) a particular device is using, so there might be an issue there.

2. Clie comes with a USB cradle or cable. In order to get a serial console you would need a serial cable. You can make your own serial cable or buy one from a Web retailer or on ebay. I desided to make my own cable just to get a chance to learn proper soldering and get the right tools. Keep in mind, that the spacing between Clie connector contacts is very narrow, so soldering the connector is hard.

3. Back up your Clie. The palm loader application will wipe out the contents of your RAM and once you are done with Linux you will need to reboot. Clie will come up as if it was cold reset with all of the RAM data lost. Since I stopped using my Clie long ago it was not a problem for me.

5. Download the most recent m68k toolchain from this page. You can either get binaries and save yourself some work, or get the source and build it on your own. I do not like stuff trying to install into /opt or some such, so I built it myself.

If you chose to build the tool chain from the source, download all those dozen or so files and read the notes in the beginning of the supplied shell script build-uclinux-tools.sh.

6. Download the Prc-tools here. This is needed to build the palm-loader (the Palm OS application that serves as a boot loader for Linux)

9. Now build all the tools. I installed all of them into separate subdirectories of my uClinux working directory. Of course you could use /usr/local or any other directory of your choice. The supplied configure scripts work fine.

Update your environment. You should have the bin directories of your m68k toolchain, prc-tools and pilrc in your PATH before your normal paths. which gcc should return your regular host gcc, which genromfs should return the binary supplied by the uClinux tools.

10. As of the time of this writing uClinux does not have Clie (or other Palm handhelds based on Dragonball VZ) support. So, download my patch to get it. The patch is done against the uClinux-dist-20040408.tar.gz distribution. If your distribution is newer, you may have to apply it manually.

11. Extract the uClinux source archive and apply the patch:

tar xvzf uClinux-dist-20040408.tar.gz
cd uClinux-dist
patch -p0 -u < clie.diff

12. Run configure process:

make config

and chose Sony for a vendor, Clie for a board and linux-2.4.x for a kernel version. Chose default (hit enter) on all other questions.

If this succeeded (this step is sensitive to your pathing, so remember that your "gcc" has to be the host gcc, /usr/bin/gcc!) run

make dep && make

Now get yourself a cup of coffee and check your terminal again in a few minutes. If everything went allright, you should have a file called uClinuxPalm.prc in the ./images subdirectory.
13. Copy the prc file to your Clie. Connect a terminal at 9600 baud, no parity, 8 bits per character, 1 stop bit to the serial port you had connected the Clie to. Start the palm loader application on your Clie. You should see something like:

ABCDEFG
Linux version 2.4.24-uc0 (solovam@kremvax) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared
lib patches from http://www.snapgear.com/)) #1 Wed Aug 4 18:13:23 MDT 2004
68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.

uClinux/MC68VZ328
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
On node 0 totalpages: 4096
zone(0): 0 pages.
zone(1): 4096 pages.
zone(2): 0 pages.
Kernel command line:
Calibrating delay loop... 2.64 BogoMIPS
Memory available: 14468k/15807k RAM, 0k/0k ROM (573k kernel code, 239k data)
kmem_create: Forcing size word alignment - vm_area_struct
kmem_create: Forcing size word alignment - mm_struct
kmem_create: Forcing size word alignment - filp
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
kmem_create: Forcing size word alignment - bdev_cache
kmem_create: Forcing size word alignment - cdev_cache
kmem_create: Forcing size word alignment - kiobuf
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
kmem_create: Forcing size word alignment - sock
Starting kswapd
kmem_create: Forcing size word alignment - file_lock_cache
MC68328 serial driver version 1.00
ttyS0 at 0xfffff900 (irq = 2) is a builtin MC68328 UART
kmem_create: Forcing size word alignment - blkdev_requests
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem 1 disk images:
0: CBEAC-1AEAAB [VIRTUAL CBEAC-1AEAAB] (RO)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
PPP generic driver version 2.4.2
PPP MPPE compression module registered
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
kmem_create: Forcing size word alignment - ip_dst_cache
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 1024)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Welcome to
____ _  _
/  __| ||_|
_   _| |  | | _ ____  _   _  _  _
| | | | |  | || |  _ /| | | |/ // /
| |_| | |__| || | | | | |_| |/    /
|  ___/____|_||_|_| |_|/____|/_//_/
| |
|_|

For further information check:
http://www.uclinux.org/

#

14. That's it for know. Once you are done, reset the Clie and you will get a brand new Palm OS startup. If you can think of a cool hack to run on Clie with uClinux, please let me know.

#### My cake project

2011年07月05日 2.07MB 下载

#### my project

2013-09-10 21:05:06

#### my wf project

2009年07月20日 38KB 下载

#### my simple project rms

2010年11月15日 5.57MB 下载

#### my project tools

2016年09月14日 62.82MB 下载

#### my jquery easyui project

2012年11月02日 1.08MB 下载

#### My Eclipse Project

2012年04月13日 21.77MB 下载

#### my crawling analysis project

2014年10月19日 21.67MB 下载

#### my intern project

2012年09月02日 7.8MB 下载

#### my project for xs128.zip

2015年12月28日 1.21MB 下载