Zaurus

Software

I have a Zaurus SL-5500. That's nice isn't it?

Links

Formatting an SD card as ext2

FAT ain't good enough

The FAT32 filing system that most SD/CF cards come formatted as if rather handy in that it can be read 'most anywhere. However, it does not support things like symbolic links, and so cannot be used reliably when trying to install ipks onto them. I keep a 128MB SD card in my Zaurus, formatted as ext2 so that I can use it to hold the big stuff like Apache, PHP and MySQL (see Pocket LAMP).

Formatting the SD Card

To install software on an SD card, it needs to be ext2 formatted. You need Fdisk to do this. If you haven't already, insert the SD/MMC card into Zaurus and type the following commands within Terminal program.

  umount /dev/mmcda1
  fdisk /dev/mmcda
  o [ENTER]
  n [ENTER] p [ENTER] 1 [ENTER] [ENTER] [ENTER]
  t [ENTER] 1 [ENTER] 83 [ENTER]
  w [ENTER]

In a few moments fdisk will finish and you will be back to console. Next type in following:

  mkfs.ext2 /dev/mmcda1

above command will convert the SD card to ext2 file format. Once the formatting finishes type in the command below to mount the SD card.

  mount /dev/mmcda1 /mnt/card

Pocket LAMP

Pocket LAMP

LAMP is a very popular web development platform, and my Zaurus is a very nice way to keep a portable web server in my pocket.

MySQL

The standard download for MySQL on the Zaurus is here. This has been very useful, but that version of MySQL (3.22.xx) is a little old and does not support the now very popular INNER JOIN syntax. So, I have hacked the latest stable Debian ARM packages in order to bring a 3.23.xx version of MySQL to the Zaurus.

After stealing a couple of files from the 3.22.xx distribution, I managed to to build an ipk distribution that deploys successfully on my Zaurus. Be warned that I have not stripped the original MySQL 3.23.49-8.7 distribution down very much, and you'll need a fair bit of space for the install. I put it onto my SD card and then ipkg-link'ed it in from there.

Note that this package MUST be installed to a proper linuxy filesystem - the FAT32 filesystem that is the default for SD/CF cards is no good and the ipkg install should/will fail. See this page for information on formatting a card appropriately.

Installation

  • Download the ipk here: mysql_3.23.49-8.7_arm.ipk.
  • Backup your databases - including the 'mysql' one that holds your user info.
  • Uninstall any previous mysql package.
  • Transfer the 3.23 ipk to the Z and install it. It must be installed on a proper linux filing system (see note above).
  • Ensure the database files in {{/var/lib/mysql}} are writable by user '{{daemon}}'.
  • Start up the server with a {{mysqlstart}}.
  • Run {{mysql_install_db}} to initialise the database.
  • Restart the server with a {{mysqlstop}} and then a {{mysqlstart}}.
  • Update you're database tables from your backup.
  • If you are running low on space...
    • Move your database files from {{/var/lib/mysql}} to some other storage like SD or CF, and symlink them back to the original location.
    • Delete extra localization/language files that you don't need.
    • Delete any binaries you don't need. I think only {{mysqlstart}},{{mysqlstop}},{{mysqld}},{{safe_mysqld}} and {{mysql}} are absolutely required, but YMMV. DO NOT remove any of the dynamic libraries - they are all required.

I've tested the package on my SL-5500 with the v3.1 Sharp ROM, and I know someone got it working on a C750. Please get in touch if you have any questions, or if you can confirm that the package works on other Zaurii/ROMs.

Known problems with this MySQL 3.23 ipk

  • None at present.

Share and Enjoy.


Notes on hacking debian packages

I originally tried to pick the packages apart under Cygwin using dpkg version 1.10.4, but the relavent command for turning a Debian package (.deb) into a tar archive (.tar):

 dpkg-deb --fsys-tarfile package_name.deb > package_name.tar

kept dying with wierd errors in 'subprocess paste', whatever that means. Eventually tried version 1.6.14 on Solaris and it worked a treat.

Once this was working, I got the mysql packages and their dependencies (ignoring libc6 as the Zaurus already has this) and turned them all into tar archives using the syntax above. The required files can then be pulled from the tarchives and blatted together to create a suitable distribution. The only tricks were finding a machine I could use where I could set the UID and GID to be 0 (root:root on the Z), and getting the file permissions right so that the package deployed cleanly.

Sablot 0.98 for the Zaurus

My port of sabcmd (the Sablotron XSLT processor) for the Zaurus. Tested on my SL-5500 under the Sharp ROMs.

AttachmentSize
Sablot-0.98.tar.bz2496.04 KB