Updated 2010-05-14 11:31:21 by MGS

MGS [2003/05/23] - I wanted to start a page collecting information about running Tcl/Tk on the Sharp Zaurus PDAs. In particular, I have grand designs on the newly-announced SL-C760.

escargo - Isn't there a slight problem since these were announced for the Japanese market[1]? (The primary problem being software and hardware are for the Japanese mobile phone network.)

True, they are announced for Japan only, at least initially, although people have successfully switched the GUI (Qtopia) over to English. I am hoping to remove Qtopia completely and put on X and Tcl/Tk and all my own apps.

[Update - April 2004] These great machines ARE available outside Japan:

SL-5000 Developers version were generally available

SL-5500 Is still available if you can find them and were sold generally

SL-700/750/760 and 860 Are available from Japan via specialised dealers who provide warranty, ie. ShirtPocket, Conics, Dynamism.

SL-6000 Are available in the US currently.

For SL-xx0 and 6000 There are many ROMs available all in English, even Russian, including a wholly X11 based one called pdaXrom. The Qtopia based ROMs can also run X without problems using a package called X/Qt.

Framebuffer Vs X11

The Zaurus uses the framebuffer and Qt. [Add more info].

Running X11 on Zaurus

(This is not my info, just stuff off the net).

You will need X11 for the Zaurus which you can get at [2].

1. Unzip zx64.zip somewhere on your Zaurus (CF, SD, etc...) 2. Install X11 for the Zaurus 3. Reboot your Z 4. Press your / on the keyboard to select the boot prompt. 5. Select A and log into your Zaurus 6. Type X to start X11

X11 on the Zaurus works great but conflicts with Qtopia over power management. Here are some solutions from Zaurus Zone's forum:

After installing X11 for the Zaurus, open the file :
  /usr/local/Xredir/etc/zapmd

and commented out
  /usr/local/bin/zapmd (just add an #at the beginning of the line).

or here is another one

1. I added a # at the beginning of each line in
  /usr/local/Xredir/etc/rc.d/init.d/ztsd

and
  /usr/local/Xredir/etc/rc.d/init.d/zapmd

2. At the beginning of /usr/local/bin/wm I added 3 lines
  /usr/local/bin/ztsd &
  /usr/local/bin/zapmd &
  sleep 2

(the sleep may not be needed, or possibly could be reduced)

3. At the end of /usr/local/bin/wm I added 2 lines
  killall zapmd
  killall ztsd

4. I was still having problems with ice's config. So I ran
  ln -s /usr/local/Xredir/usr/local/lib/x11/icewm .icewm

in /home/root (somehow icewm wasn't finding its setting at this original location)

With these settings, I can switch between qtopia and X. I drop out of Qtopia using the terminate qtopia butting in the Shutdown app.

I hit /? then 'a' during the countdown to drop to a prompt

I run: wm

after I logout of icewm, I type exit to drop back into Qtopia.

Compiling Tcl and Tk for Zaurus

[Add more info]. [Native compiling]. [Cross-compiling].

Links


Now from what I understand...If you don't want to have to drop out of QT to run a Tk application use KeyPebble. This is the software stack as I understand it Tcl/Tk - wish vncserver keypebble vncclient QT

To run this you'll need a "wish", Qtopia X11 package, a vncserver, and keypebble. I'll go do this now in OpenZaurus 3.2 and see if I cant get it working. If I do I'll post docs on how to do it.

RR I'm keenly interested in your progress. I have a Z (SL5500). I'd like to run my Tcl apps on it but I didn't think I could get Tcl to run on the Z. I'm ashamed to admit I've ported several into Java to run them.

Ok status update: 6/11/03(why doesnt everyone date their wiki entries...info does expire)

Here is some eye candy!

This is tcl/tk running the harmony.tcl app on a Zaurus. (excuse the quality...I dont have bandwidth to waste on pretty carrots).

So what have we got here?

  • harmony.tcl <- tcl/tk script
  • wish <- yeah baby! my first X app for Zaurus
  • vncserver <- this is the X11 vncserver it runs an X11 server in memory waiting for a user to connect with a vncviewer
  • keypebble <- this is the qtopia vncviewer (ie connects to X11 vncserver and draws it in a qtopia window)
  • qtopia <- see its still running, ie I can run other apps above the tcl/tk stuff
  • fbvncserver <- not needed but I want to control my Z from my pc

Hmm...compiling tcl/tk was a horrible pain, I tried:

  • cross compiling (2 diff compilers) fails easily because autoconf scripts dont really like cross compiling
  • distcc this is a weird scheme to run compiles on another machine still requires a local compiler but speeds things up
  • zgcc + ipaq libs installed on an NFS mounted drive...works but can we say slow....

There are so many hacks involved in getting this to work I dont know where to start.

vncserver, zaurusX11, copied xlibs from ipaq, new sed and ar so compiling works, many unremembered links making a "normal" directory tree...

What do we need to do:

  • standardize a distribution of tcl/tk for Zaurus
  • pick a window manager for vncserver that basically only deals with full screened windows. This would make it more Qtopia like. (yes I know...dumb down X)
  • modify keypebble to
  1. Not cover the qtopia taskbar ever
  2. Not use scroll bars(lets fix the vncservers X11 screen size to Z's size - qtopias taskbar)
  3. Not use a title bar - yea we know its keypebble why waste the space telling me that
  4. possibly link the X11 window manager to keypebble to qtopia allowing each running app in X to have a button on the qtopia taskbar

Any other ideas? (I want to get sqlite running on Z+tcl/tk to get a portable sql db thats easy to use)

Email me for wants and wishes: [email protected]

Ok another update 6/11/03

Bad news: memory...
   [email protected]:~# free
              total         used         free       shared      buffers
Mem
62248 61164 1084 0 336
Swap
0 0 0
Total
62248 61164 1084

and from top:
     PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
     511 root     S       7392   489  0.0 11.8 qpe
   20585 root     S       4640   511  0.0  7.4 keypebble
   20569 root     S       3500  4263  0.0  5.6 wish
   20584 root     S       1960 18746  2.4  3.1 fbvncserver
   20562 root     S       1928 20561  0.0  3.0 Xvnc

Ok so keypebble is horrible, fbvncserver should be dropped, and I've got a lot of other processes running also. Basically you'd need keypebble, Xvnc(this is vncserver), and wish. There are several window managers that occupy less than 100k so that shouldn't kill us.

Window Managers (added by escargo on 11 Jun 2003)

  • Matchbox[8] is designed for PDAs.
  • sWm[9] is designed partly for PDAs.
  • ratpoison[10] is a full-screen window manager.
  • My favorite window manager is Blackbox[11] (which I use on Windows XP Pro along with XFree86)

Debian-Zaurus (added by kyungel)

I've succeeded in getting Tcl/Tk running without much trouble on an SL-5500 (depending on your definition of much trouble). The trick was to use the Debian Zaurus installation on my CF memory card, and then just to apt-get tcl8.2 and tk8.2. Found the ARM packages, downloaded, installed, ran without a hitch. I've even got tkcon running without any trouble. Haven't messed around with it much, but I have gotten one program with some widgets running fine. One thing, though, it gives me an error every time -ActiveBackground is used.

Update 7/2/03- Tcl and Tk work fine, although I've been having problems with the Debian-ARM package of BLT; it installs fine, no dependancy problems, but it doesn't seem to install most of the BLT functions; I have spline, but no graph. Any suggestions? Never mind, I had some dependency problems. It works fine now that I've resolved that. Everything else seems to work like a charm.

RR (7/2/03) I would like to understand how to do this; please excuse my ignorance. I have an SL-5500 with Sharp OS v3.10. Do I need to use a different OS (you mention Debian Zaurus on your CF. I have a CF card but I use it only as addition FileSystem)? Then, what is "apt-get"?

Google for Debian on Zaurus and you'll find several projects. Basically, you take a CF card, format it as an ext2 drive, and then put one of the full portable Debian systems on the card; you can then run Debian chrooted to the /mnt/cf directory. It seems to work like a charm on my 5500, but be warned; you'll need a large CF card to try it. The HOWTO I'm posting is written for OpenZaurus, but it should work fine on a default Sharp ROM as well; you'll just need a terminal program that can open multiple tabs at once. Just skip the section about flashing the OpenZaurus OS onto your Zaurus. Oh, and 'apt-get' is the Debian package program; it will go online, download the latest version of a package, and install it. Think RPM for Debian.

A third draft of the howto, with a little feedback from the creator of Pocket Workstation and a couple of fixes of blatantly stupid/wrong errors. (7/7/03) http://mywebpages.comcast.net/clanwolfer/zaurus-debian-tcl-HOWTO.html

(7/9/03) Also, I did get a tclsh environment running on Opie 3.2, by simply cross-compiling. If you have your cross-compiling toolchain set up right, just make sure that when you configure it you use the host and prefix options correctly. Depending on what gcc you use with your toolchain, I think there's one line that you have to change in the make script somewhere (just google your error message for the fix).

Running on native X on Zaurus (added by kyungel)

Using a version of the OpenZaurus ROM that comes with XWindows running natively instead of Qtopia or Opie, I've gotten tcl and tk running with no trouble. I just grabbed the ROM (search the Zaurus DevNet forums for matchbox), flashed it, and was set to go; the Debian ARM packages for libc6, libgcc, libc6-dev, tcl8.4, tcl8.4-dev, tk8.4, blt-common, blt-dev, and blt installed fine when I forced dependencies. Now I have Tcl/Tk running natively on the Z without any VNC servers, switching between X and Qt, or any other messy hacks. And it runs really well, too!

MGS [2004/02/18] - I've recently heard of a new X11-based Linux distribution for ARM-powered PDA's called cacko [12]. It has been tested on Sharp Zaurus SL-C700/750/760 but is currently being ported to other architectures.

Apparently there's a version of Gentoo Linux for the the Zaurus as well. [13]

Felipe Voloch [2004/10/08] - In the original Sharp ROM you can install a program called XQt [14] which gives you an X11 environment and Tcl/Tk works fine in it, except for a little funny behaviour of a few widgets that default to huge sizes.

MDD - Where would I get the Tcl/Tk binary to try this?

Felipe Voloch [2004/10/08] In my opinion, the best choice is tclkit [15]. MDD - OK. Thanks. I didn't realize there was one available for linux on ARM. Cool. Do you know if anyone has any plans to do a build of dqkit for the ARM?

SRIV [2004/10/09] I just got a C860, so expect to see a new tclkit in the next few days.

AJB [2004/12/13] I managed to cross-compile Tclkit for arm-linux. Both 8.4.9 [16] and 8.5.a2 [17] are posted. These have been tested with pdaXrom [18] version 1.1.0-rc5 (kathrin) on my SL-C860. Im not sure how well they will work with other rom's, as this one is built with vector floating point math. I will try to keep up with the 8.5 series as new releases come out. Also, there is supposed to be another rc from pdaxrom, and a final version shortly after that. According to the forum, binaries compiled under rc5 should not be broken, so the build should work on those as well.

zxpim