Debian on the Zaurus 5500!

From OESF

(Difference between revisions)
Jump to: navigation, search
(remove spam)
Current revision (20:21, 8 August 2008) (edit) (undo)
(broken link)
 

(4 intermediate revisions not shown.)

Line 122:

Line 122:

Zaurus Software Index: http://www.killefiz.de/zaurus
Zaurus Software Index: http://www.killefiz.de/zaurus
-
Debian on the Zaurus: http://www.w-m-p.com/pocketworkstation/
+
Debian on the Zaurus: -BROKEN- http://www.w-m-p.com/pocketworkstation/
 +
[[Category:Debian]]
 +
[[Category:5500]]

Current revision

This HOWTO has been contributed by Gerald J. Normandin Jr. It has been found at: http://mywebpages.comcast.net/clanwolfer/zaurus-debian-tcl-HOWTO.html

Thanks to Klaus Weidner for all his valuable advice, input, and corrections to blatantly stupid errors by myself.

Sharp Zaurus SL-5500: Debian and tcl/tk scripting languages

The Zaurus is an excellent handheld Linux PC, but unfortunately the default Qtopia desktop environment and the alternate OpenZaurus environment both lack the ability to run some specialized programs. The obvious solution here is to install the X Windowing System on the Zaurus; this HOWTO goes through a full installation of Debian on the SL-5500.

==Necessary materials:== Sharp SL-5500, large CompactFlash or SecureDigital memory card (256 preferred, possible on 128), CompactFlash network card, USB memory card reader

Necessary files:

http://www.w-m-p.com/software/pocketworkstation/zaurus-debian-big-v0.15.tgz

http://www.openzaurus.org/oz_website/content/do_download?mirror_id=1&release_id=7&file=zImage-5500-40memory-24storage.bin

http://www.openzaurus.org/oz_website/content/do_download?mirror_id=1&release_id=7&file=initrd.bin

ftp://ftp.debian.org/debian/pool/main/t/tcl8.2/tcl8.2_8.2.3-10_arm.deb

ftp://ftp.debian.org/debian/pool/main/t/tk8.2/tk8.2_8.2.3-4_arm.deb

ftp://ftp.debian.org/debian/pool/main/t/tkcon/tkcon_20030408-1_all.deb


Contents

Flashing the Zaurus: (optional)

Though this can technically be done on any Zaurus configuration, it's best to start from a fresh install of OpenZaurus. Take the CompactFlash card, and format it as vfat (if it isn't already), and put initrd.bin and zImage-5500-40memory-24storage.bin on the card's root directory. Rename zImage-5500-40memory-24storage.bin to zImage. Now, put the card in the Zaurus' CF slot. The Zaurus must be plugged in with the power cord; to flash the memory, open the battery compartment, and press the full reset button (small black square one) while holding the letters C and D on the keyboard. The Mail and Power LEDs should both go off briefly, then stay on constantly; when they both go out again (after about 3 minutes), the memory is flashed. Hit full reset again, and close the battery compartment.

Setting Up

Now, there are a few steps we should take to set up OZ before we can install Debian. First, the network card I used was a PRETEC compactLAN card; this card is not correctly configured in OpenZaurus 3.2. Open up /etc/pcmcia/config on the Z, and scroll to the PRETEC entry; where it says 10baseT, change it to 10BaseT. (capital letter from lower-case). Now networking should work properly.

Use the Opie Package Manager to load the latest list of stable packages, and download opie-keypebble, as well as any other packages you'd like running on Opie. Install them to ram. If you're running a default Sharp ROM, get an equivalent VNC viewer.

Mounting a CF card in Linux

If you're using a USB CF card reader, you'll have to mount it manually after you put in the card. Just root and type

 #mount -t vfat /dev/sda1 /mnt/compactFlash

(Klaus Weidner says: That should usually be /dev/sda1, most flash cards are partitioned (with a single partition) instead of using the whole device directly. Correspondingly, /dev/hda1 should be used on the Zaurus.)

or whatever filesystem/mount point your CF card should be.

Reformatting the CF/SD card

Debian must be installed on an ext2 filesystem; the easiest way to do this is to put the CF/SD card into a USB reader and run

 #mke2fs /dev/sda1

When it's done formatting, move tcl8.2_8.2.3-10_arm.deb and tk8.2_8.2.3-4_arm.deb to the /mnt/compactFlash directory as well.

Mounting the CF card on the Z

Since the CF card is now formatted as ext2, the Zaurus' card manager won't mount it automatically anymore. You can either change the entry in /etc/fstab to ext2 from auto, or you can just type the following command every time you insert the card:

 #mount -t ext2 /dev/hda1 /mnt/cf/

Modify these instructions accordingly for an SD card.

Also, go to Settings/Media Mount on the Zaurus and disable medium checking; otherwise, that CF card will take about 10 minutes to mount once Debian is installed. Turning off medium mount will cut that to about 10 seconds.

Creating Debian's filesystem

To properly install the Debian filesystem, move zaurus-debian-big-v0.15.tgz

to your CF card. You must untar this file using the Zaurus itself; a non-root user on a regular Linux system can't create the entries in the CF card's dev/ directory properly. Gunzip the file, and tar -xvpf zaurus-debian-big-v0.15.tar into /mnt/cf. Now, go get a good book, because this will take a while. :)

Note: You can also do this from a Linux box with a CF card reader, which would make you able to use a substantially smaller CF card. You have to be root to untar this properly; be careful with this on versions of tar that use absolute paths, though (ex. Solaris)! You don't want your actual system being overrun with Zaurus binaries. :)

Done already? Good, now run the following commands (modify accordingly for an SD card):

#cd /mnt/cf
#cd INSTALL.d
#./postinst.sh

Answer 'yes' to everything except 'Start Vncserver now?' and 'Start Fbvnc now?'.

Now, you have a working Debian install on Zaurus; however, it's still a little tricky to get into. To start Debian, open the Konsole in Opie and type:

 #Vncserver

You should get a copious amount of output, including errors, but ignore these as long as it doesn't dump you out to the prompt with a serious error. If all goes well, it will background itself and return you to the prompt with nothing more than a few font errors instead. Note that if you VNC in, some output will still be sent to that console, so don't panic if you go back to it and can't find that pesky little # among all your connections. Just hit Enter a few times.

At this point, you have two main options for working with Debian. You can either open up the VNC Viewer, and point it to 127.0.0.1, display 1, or you can go to Settings/Shutdown/Terminate Opie, log in as root, and type Fbvnc at the console. Either way, you should now be running Debian with X11 and IceWM.

Installing tcl/tk

It's all downhill from here. Remember those packages you put onto the CF card earlier? Open up an xterm from XWindows and type the following commands:

#dpkg --install tcl8.2_8.2.3-10_arm.deb
#dpkg --install tk8.2_8.2.3-4_arm.deb


With any luck, this should be all you need to get 'tclsh' and 'wish' working on your Zaurus. tkcon is also available from the Debian feed, and works without a hitch, and several packages, such as BLT or BWidgets, are available as well.

Limitations

Now, the hard part: if you've been following along with a CF memory card, as I've documented here, you won't be able to have a CF network card in at the same time as the memory. So, if you need more packages, you have to cheat the system. :)

Instead of fetching the packages with the Debian apt-get command, you're going to use the following :

#apt-get --print-uris install (package)

Now, jot down the address it gives you, download the file, stop your X server, switch CF cards, ftp the .deb file to /mnt/ram, switch CF cards again, remount the drive, move the file to /mnt/cf, restart your x-server, VNC into x, and finally, finally, finally use dpkg to install. Yes, it's a pain.


Known Problems:

Dependency hell. :) The Pocket Debian Workstation comes with some libraries (libc, libgcc, etc) that you may need to upgrade to install certain packages. Just go to the main Debian feed and download the packages; I haven't had any trouble with any specific packages.

Sometimes, it seems that the window manager doesn't start quite right, and you get a checked black-and-white background with no interface when you start Fbvnc. Just drop out of it, reboot, and try again. I also found that just connecting with Keypebble was often enough to kick it into gear properly.

Note: OpenZaurus reportedly is going to include some way to use the X Windowing System in their feed at some point in the near future. More word on that as it happens.

==Additional Links== for More Information:

OpenZaurus OS: http://www.openzaurus.org

Zaurus Software Index: http://www.killefiz.de/zaurus

Debian on the Zaurus: -BROKEN- http://www.w-m-p.com/pocketworkstation/

Personal tools