Debian on the Sharp Zaurus/SL-5xxx
The Zaurus is a Linux-based PDA from Sharp. More information
about the Zaurus can be found in many places.
The Debian Zaurus project aims to create a full-featured,
plug-and-play Debian environment for the Zaurus, with all the
trimmings, including package management with dpkg and apt.
A small demo is available.
Roadmap
Debian's ARM port is
already quite usable, and provides a huge wealth of binary
packages that can be used on the Zaurus. Most of the components
necessary for building and using PDA applications are already
ported and working.
The Debian Zaurus project will take the form of some additional
Debian ARM packages, and some Zaurus-specific tools. So far, I
can see that at least the following software components will be
required:
- A Zaurus-tailored Kernel
- Packages for kernel patches providing hardware support for
the Zaurus
- A ROM image
- Tools to build a kernel and a minimal root filesystem
suitable for flashing into the Zaurus.
- User programs
- Packages for software to provide PDA functionality, and
modifications to existing software to better suit a PDA
environment.
Some other things which might be useful include:
- dpkg enhancements to reduce resource
requirements for the packaging system
- Synchronization software which runs under Debian on the
desktop
The base system shall fit within the internal storage provided
on the SL-5500 (16MB flash ROM + 64MB persistent RAM storage +
main memory), or hopefully the SL-5000D (16MB flash ROM + 32MB
storage/RAM), however, I hope to work out a mechanism for
gracefully expanding the system onto CF and/or SD cards, to
allow for more installed software, while allowing those cards to
be inserted and removed without losing basic system
functionality.
Due to the specialized requirements of a PDA environment
(including limited storage and power resources) the base system
will probably omit certain components that are otherwise part of
a base Debian installation, such as fdutils, sysklogd, most
documentation, etc. At the same time, if possible, the base
system may include a set of applications to provide basic PDA
functionality and a graphical environment. These modifications
to the base system will be automated as part of the image
creation process, so that the remainder of the system stays in
sync with the rest of Debian/ARM.
Status
- 2003/12/21 15:23 PDT
- Everything here was restored from a
backup. Summary: I haven't done anything lately. Other things
are happening on debian-handheld@lists.debian.org.
- 2002/12/07 12:06 EDT
- I've been spreading myself too
thin, and have not had time to work on this project. My
Zaurus has been in its cradle continuously for the past couple
of months. There has been a lot of interest in this project,
and I am interested in finding volunteers to continue the
work until I can come back to it. Contact me.
- 2002/08/10 23:35 EDT
- I've updated the image to current
'testing'. Among other goodies, this means that ifup now
correctly interfaces with udhcpc. I also trimmed things down
a bit further so that there is now over 1M free. All of the
same packages are installed, but some bits which are not
generally useful on the Zaurus have been stripped out.
- 2002/08/10 22:42 EDT
- After teaching mkfs.jffs2 about
hardlinks, and trimming down more installed packages, I now
have a jffs2 image which includes X, matchbox and xvt. Since
the Sharp kernel does not include jffs2 support, this means
that you must use an OpenZaurus
kernel with this image. See the ROM
image page for more information.
- 2002/08/04 00:19 EDT
- I had to remove X to do it, but
I've created a jffs2 initrd which works with the OpenZaurus
kernel. This means no more read-only root filesystem hackery,
but it also means less software. I can regain some of the
space once mkfs.jffs2 can properly handle hard links (or I
translate them to symlinks), at which point I think the
tradeoff will be worth the writability. I should have
something to upload in this area soon.
- 2002/08/03 19:43 EDT
- I'm struggling with the size of the
initrd. While it is fine for cramfs, I want to be able to use
jffs2 (for writability), but jffs2 is significantly less
space-efficient.
- 2002/07/27 13:21 EDT
- Another initrd update. I've reverted to
XFree86 4.1.0, since it seems more stable, and includes a
simple hack to rotate the screen if the Y dimension is
greater than the X dimension. Start the X server with
"-screen 240x320" and everything should be rotated
correctly. It also includes rxvt, the first actual GUI
application to be included, and a 'zstartx' script.
- 2002/07/26 21:18 EDT
- Another initrd update. It acts more or
less like the previous one, but uses pivot_root instead of a
bunch of messy bind mounts. Hopefully, this read-only root
business is only temporary anyway, but this makes it less
painful in the meantime. In case of problems, this image
drops you to a shell immediately so that you can examine the
system even if it is partially broken. Exit this shell for
normal startup. Note that the X server display is still
rotated 90 degrees, since xrandr seems to segfault.
- 2002/07/24 01:12 EDT
- A new initrd is available. This version
now includes an X server (Xfbdev) and window manager
(matchbox)! Space is getting tight, and there are still no
actual applications. Of course, there is room on the
writable flash, but it would be best if everything necessary
for basic work were included in the base image. The X
libraries are huge, though. I have some trimming and
squeezing to do.
- 2002/07/23 23:57 EDT
- After many cross-compiles and many
debugging sessions, I've fixed a couple of bugs which caused
the bus errors and incorrect touchscreen behaviour. I should
be able to prepare an X-enabled initrd RSN.
- 2002/07/21 23:14 EDT
- I've put together a preliminary
source package for building Xfbdev from partial XFree86
sources. Installed-Size: 745 should fit nicely in the
initrd. Next, I'll need to do some tinkering to determine the
minimum amount of other X stuff that will be necessary in
order to do useful things, and try to make that fit. I've
written a replacement for a small daemon that I found which
converts Zaurus touchscreen events into iPAQ touchscreen
events (which XFree86 understands). I think it was probably
free, but the author seems to have vanished, and the source
code is nowhere to be found.
- 2002/07/21 12:31 EDT
- The next big hurdle is XFree86.
After much tinkering, I've managed to cross-compile a working
Xfbdev from XFree86 4.2.0, weighing in at about 800kb. It
starts, works, runs xeyes and other important things. I'm
trying to use the Xrandr extension to rotate the screen 90
degrees, but it gives bus errors when changing the rotation.
It also gives a bus error on shutdown, and doesn't bring the
display back to text mode, though. Some of this may be fixed
in XFree86 CVS.
- 2002/07/19 10:47 EDT
- I found out what was causing the
initrd to be overwritten by an older copy, and have fixed it.
The md5sum for the current initrd is
179fd823882ab63520fe96ebca2ba73c.
- 2002/07/18 16:23 EDT
- There have been some serious
problems with these pages, apparently. The initrd had not
been updated when I said that it was, and the email address
that Emacs placed at the bottom of each page is wrong. I have
corrected both of these errors. If you have not been able to
reach me via email, or if you could not get the initrd to work
properly, please try again.
- 2002/07/17 23:32 EDT
- I've updated the initrd again, see
the ROM image page. Nothing
major, just added some device nodes that should have been
there by default, and some zaurus-base updates that I can't
remember.
- 2002/07/14 22:11 EDT
- The Embedded Debian project
came to my rescue by providing a plug-and-play ARM
cross-development environment which worked out of the box, on
the first try. Now work can continue on building a free,
standard kernel.
- 2002/07/14 19:12 EDT
- Started looking into rebuilding the
kernel, as a starting point for having an entirely free
kernel, and also for updating to a more recent one. Am having
a hell of a time getting just the right cross-compiling gcc,
because the kernel needs to be built with -msoft-float.
- 2002/07/14 12:02 EDT
- I've written a replacement for
Sharp's /sbin/oncheck program, which allows me to test for the
hardware reset condition. This means that the latest image will only mkfs the
writable area if you press the hard reset button. I've also
reduced its size by another 500k or so (compressed), making
more room for the additional infrastructure and applications
that we will want in the base image.
- 2002/07/14 00:25 EDT
- I'm putting up a new test initrd. This one will
basically boot, and you can login as root/root. The biggest
'gotcha' currently is that since the /rw filesystem needs to
be mounted very early, it is not fsck'd by normal means, and
so is currently not fsck'd at all. This is not a big deal,
since currently it is mkfs'd every boot. This should be
fixed soon.
- 2002/07/13 23:09 EDT
- Making good progress with the ROM
initrd. I am putting together packages to configure
everything automatically, handling the read-only root
filesystem weirdness. The current image, which I have only
halfheartedly tried to strip down, occupies less than 2.5M of
the writable area. Most of this is the dpkg database, which
we can't do much about (yet). Package installation seems to
work, even replacing those which are installed on the initrd.
The symlink magic is working out well. Running apt-get update
on this image eats up a whopping additional 10M or so, but
installing packages via APT does work. My current challenge
is to get the CF card working under Debian, so that I can
flash new stuff without having to revert to the stock Sharp
image.
- 2002/07/13 15:44 EDT
- I've been tinkering with X, trying
to get a useful GUI together. The stock X server segfaults,
and I'm having difficulty getting the usual debugging tools to
work properly. This may be due to the fact that I'm stuck
with Sharp's 2.4.6 kernel for now. Any X or ARM experts would
be more than welcome to give me a hand with this part.
- 2002/07/08 23:23 EDT
- I've put up a test initrd. This is VERY rough
stuff, only for the adventurous who don't need to do any
real work on their Zaurus for a while.
- 2002/07/06 21:52 EDT
- I took a shot at building Opie from
CVS sources. Yuck. It wants to install itself under /usr
during the build process, and is otherwise ill-behaved. Time
to take a second look at GPE.
- 2002/07/06 18:42 EDT
- Starting to worry about kernel issues. It
looks like I won't be able to use this SD card without Sharp's
closed-source driver, which will make it much less convenient
to experiment with new kernels. MMC is rumoured to work, so I
may need to pick up an MMC card. This project is getting
expensive.
- 2002/07/06
- I just was able to perform my first
installation of a Debian package natively on the Zaurus, not
within a chroot. Most everything is set up by hand at this
point, and I am still using the stock Sharp kernel, but this
is a step in the right direction.
- 2002/07/05
- Time has been short recently, but I have
started working on the ROM image again. I have successfully
booted a read-only Debian image from Zaurus flash using the
stock Sharp kernel. There will be some trial and error before
I have something usable in this department. Good news: the
stripped-down Debian image I booted is actually smaller than
the stock image from Sharp: 31M vs. 33M uncompressed, 12M
vs. 14M compressed. This is without qt-embedded or any
applications, however. With the Sharp image, and perhaps with
future Debian images, variable stuff will be stored as
tarballs, and unpacked into the writable storage area after a
hard reset, rather than stored directly in the cramfs initrd.
This may save some space, and allow us to add some useful
stuff and be not much larger than Sharp's.
- 2002/06/21
- I have had some trouble getting the Zaurus to
flash a new ROM image without using their update utility
(which would not allow me to back out). It seems that the
SL-5500 consumer edition may be different from the SL-5000D
developer edition in this respect. The OpenZaurus folks have
presumably figured this out, since they support both models.
I need to figure out how they do their testing on the 5500.
- 2002/06/20
- I have purchased a second CF card, which
should enable me to safely test flash new ROM images into the
Zaurus.
- 2002/06/16
- Response has been tremendous. I am currently
trying to determine how I can safely test flashing a new kernel
and initrd into the Zaurus ROM. So
far, it looks like this will require the purchase of a second CF
card, so that I have something to back out to if (when) it
doesn't come up correctly.
- 2002/06/15
- Just got started. We need developers,
testers and input on how to proceed. I have built and used potato and woody chroots on a Zaurus,
and am investigating the organization of the kernel and flash
ROM used in the stock Zaurus software.
Resources
- Sharp's
developer program
- Technical documentation, how-to manuals, Sharp source
code
- Zaurus
ROM image layout
- Details the format of the Zaurus ROMIMAGE file. It looks
like we probably will not want to use this method, but instead
upgrade the kernel and initrd separately. This method is both
easier and safer than overwriting the entire ROM image. This
allowed me to extract Sharp's kernel from the SL-5500 image,
though.
- ROM
Upgrade instructions
- Describes the procedure for installing a new image in the
Zaurus' flash ROM
- ZaurusZone
- Zaurus user and developer community website
Related projects
- Debian ARM
- OpenZaurus
- Opie, the Open
Palmtop Integrated Environment, a GUI and application
framework for the Zaurus, derived from Qtopia
- Qtopia, the GUI
and application framework
which ships with the Zaurus
- GPE, the GNU
Palmtop Environment, a GTK-based environment.
Thanks
- Flint Electronics
- for donating a 128MB SD card
Matt Zimmerman
Last modified: Sun Dec 21 15:24:51 PST 2003