What is a TuxScreen?

TuxScreen is the name of a device previously known as the Philips IS2630. The device is a phone/internet terminal device based on the SA-1100 processor, with an LCD screen a bit larger than 7", an infrared keyboard.

The device has lots of goodies, like a PCMCIA interface, 4MB flash (which I found to be very limiting), 16MB EDO RAM, 115200bps serial port. You can get a complete list from here. But the interesting part is that it is sold for $99 at www.tuxscreen.net. This is actually much less than the cost of all the parts included in it.

What makes it very intersting at this price, is that you get a ready development environment, with almost all the basic interfaces and features builtin, that will allow you to start installing linux after less than 30 minutes of opening the box. So as I'm currently working on my own strongarm-based hardware, I thought it would be cool to have something to start playing with until all the pieces I'm waiting for arrive.

I got one, and I'm planning on getting one or two more, given that I can manage to get the PCMCIA interface to work so that I can use it to interface to more persistant memory (I'm extremely annoyed with the 4MB limit). In this page, I'll try to summarize my adventures with the tuxscreen, and how I got things to work.

This is not the complete guide, and definitly is not unique in anyway, as there are lots of sites out there holding people's experiences and joys in working with the tuxscreen. The best way to reach them is to browse through the tuxscreen official site. But if you're reading this page right now, then it served its purpose :-)... enjoy

How do I do this or that?

I'm not saying you should ask everyone for how to do everything. But if it's out there, what's the point of figuring it out? Well, if you believe in that philosophy, tuxscreen.net sure doesn't make your life any easier. It has lots of useful info, but the site is not that organized. It was easier for me to use google to search through the site, than to navigate to the info. Fortunately, you got me :-)

Another place to get you started is Tom Walsh's site openhardware.net. There's an area on the site that takes you step by step through it. I wish I waited for Tom to go through it before I figured it out ;-). But don't get me wrong, the process for getting your first linux installation is very easy, just make sure you get it right, or you'll have to make or get a JTAG connector.

What I have to offer (Qt/Embedded)

I am now in the middle of working with this thing, still trying to figure things out. But since I'm very interested in Qt/Embedded these days, I thought my contribution should be installing Qt/Embedded on the tuxscreen. It is not that tough of a job, but that's a good start.

The first step is to download qte. You should get it from Trolltech's site. As of this writing, I'm using 3.0.1 which is the latest version so far, and all the fixes and steps below apply to that version. Of course, I'm assuming that you already compiled a linux version for your tuxscreen and that you have all the arm tools installed. We will specifically need linux-arm-g++.

Before we get into qt, we need to fix some strange problem with the linux source. In the linux (tuxscreen's) include folder there's a file named fb.h. This file contains the api definitions for the frame buffer driver. For some reason, someone had the following function pointer declaration in there:

u_int (*set)(void *private, u_int new);

The problem with this declaration is that it uses two C++ reserved keywords (private and new). To fix this, you need to modify those two parameters to any other two names you choose (e.g. public and delete ;-). The reason why any names you choose would be fine, is that the names are irrelevent to the signature of the file, and that this is a decalaration and not a definition, so you shouldn't be upsetting any linkers or compilers in the process.

Now we can jump into qt with it's own set of problems. The first thing you would want to do, is to apply the following patch, which you can also download as a file here in the qt root folder after you un-tar it:

--- ./configure.old     Thu Jan 10 09:46:27 2002
+++ ./configure Thu Jan 10 09:47:37 2002
@@ -2100,7 +2100,7 @@ do
     test -d $dir || mkdir -p $dir
     N=$outpath/$dir/Makefile
     QMAKE_EXTRA_ARGS="\"QMAKE_ABSOLUTE_SOURCE_PATH=$relpath/$dir\""
-    if [ "$SPEC" != "$QMAKESPEC" ] || [ -z "`ls -l mkspecs/default | grep $QMAKESPEC`" ]
+    if [ "$SPEC" != "$XQMAKESPEC" ] || [ -z "`ls -l mkspecs/default | grep $QMAKESPEC`" ]
     then
        echo "USING $SPEC FOR QMAKE"
        QMAKE_EXTRA_ARGS="-spec $SPEC $QMAKE_EXTRA_ARGS"

This patch will fix a bug with the configuration script that will prevent us from cross-compiling qt (everything will still work fine for x86 compilation though)

Configuring Qt/Embedded as is, will produce a library that is larger than 7MB in size. This still doesn't include the fonts that you will need to include with the library, which are of considerable size, unless you strip them down to bare-minimum, but it really depends on your need, for me I needed unicode support, which means that I need to include at least one of the fat font files.

The way to minimize the size is to limit the features you include in your qte compilation. The place to manage that is the file "$QTDIR/src/tools/qfeatures.h". This file contains a bunch of conditional definitions, whose purpose is to prevent the compilation of the different features availabe. The easiest way to insure minimal compilation is to include another file in the same folder named "qconfig-minimal.h" into qfeature.h.

If you include qconfig-minimal, not even the configuration script will run correctly until you comment out the following definitions in qconfig-minimal:

QT_NO_DIR
QT_NO_TEXTSTREAM
QT_NO_STRINGLIST
QT_NO_EXP_CAPTURE
QT_NO_REGEXP_WILDCARD
QT_NO_SPRINTF
QT_NO_REGEXP

for my needs, I also commented QT_NO_UNICODETABLES.

Then set the environment variables $QTDIR and $LD_LIBRARY_PATH, to the qt root folder and to the qt root folder/lib respectively. Now run the configure script from $QTDIR passing "-embedded arm" and pointing it to your tuxscreen linux include files, and then gmake (or make)

The result of the compilation (or the part of it we're interested in) would be under $QTDIR/lib. This folder will contain the qt library and a fonts directory. You need to copy those to <buildroot-tux root>/lib/qt-3.0.1/lib.

If you play around with the fonts, you should be able to get the jffs image size to around 2.8MB, which would fit comfortably on the flash along with the linux kernel image. But the problem is that this qt compilation doesn't have much functionality that can be of any use for a real application.

To enable any of the features (different widget types, etc.), you'll need to go into qconfig-minimal.h and qfeatures.h and make the required modifications. You can also use qconfig-medium.h or the other qconfig files for defaults configurations with more features.

Playing with those files will very easily get your images not to fit on the limited 4MB on your tuxscreen. Which is why I'm very unsatisfied with that limit. I'm now trying to work on trying to get more storage. My hopes are on PCMCIA, and will update this page as soon as I figure it out.