My uClinux on Sony Clie project

来源:互联网 发布:网络用语xsl什么意思 编辑:程序博客网 时间:2024/05/21 09:33

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

  • 09/11/2004 Updates:

    • 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

Tested hardware

  1. Clie PEG-T615C
  2. Clie PEG-SJ30

Running the pre-built uClinix image

If you just want to check it out:

  1. Download the prc file

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

  3. Backup your Palm device

  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

Building your own image

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.

  4. Download the full source uClinux distribution from this page.

  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)

  7. Download pilrc, Palm resource compiler here

  8. Download Palm OS SDK 5.3 for PRC tools. You would have to register and navigate starting from this page.

  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.gzcd uClinux-distpatch -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:

    ABCDEFGLinux 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 sharedlib patches from http://www.snapgear.com/)) #1 Wed Aug 4 18:13:23 MDT 200468VZ328 DragonBallVZ support (c) 2001 Lineo, Inc. uClinux/MC68VZ328Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff DionneOn node 0 totalpages: 4096zone(0): 0 pages.zone(1): 4096 pages.zone(2): 0 pages.Kernel command line:Calibrating delay loop... 2.64 BogoMIPSMemory available: 14468k/15807k RAM, 0k/0k ROM (573k kernel code, 239k data)kmem_create: Forcing size word alignment - vm_area_structkmem_create: Forcing size word alignment - mm_structkmem_create: Forcing size word alignment - filpDentry 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_cachekmem_create: Forcing size word alignment - cdev_cachekmem_create: Forcing size word alignment - kiobufBuffer cache hash table entries: 1024 (order: 0, 4096 bytes)Page-cache hash table entries: 4096 (order: 2, 16384 bytes)POSIX conformance testing by UNIFIXLinux NET4.0 for Linux 2.4Based upon Swansea University Computer Society NET3.039kmem_create: Forcing size word alignment - sockInitializing RT netlink socketStarting kswapdkmem_create: Forcing size word alignment - file_lock_cacheMC68328 serial driver version 1.00ttyS0 at 0xfffff900 (irq = 2) is a builtin MC68328 UARTkmem_create: Forcing size word alignment - blkdev_requestsBlkmem copyright 1998,1999 D. Jeff DionneBlkmem copyright 1998 Kenneth AlbanowskiBlkmem 1 disk images:0: CBEAC-1AEAAB [VIRTUAL CBEAC-1AEAAB] (RO)RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizePPP generic driver version 2.4.2PPP MPPE compression module registeredNET4: Linux TCP/IP 1.0 for NET4.0IP Protocols: ICMP, UDP, TCPkmem_create: Forcing size word alignment - ip_dst_cacheIP: routing cache hash table of 512 buckets, 4KbytesTCP: 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.