Collie/Install

From OpenZaurus

This describes how to install OpenZaurus on the Collie.

Contents

Introduction

Two files are required to flash a collie, these are a root filesystem image (initrd.bin) and a kernel (zImage).

Download the files

Selecting a zImage file

The zImage file contains the Linux kernel used in OpenZaurus.

There are numerous choices of zImage file available for OpenZaurus. They differ in the split of the 64Mb RAM to be used for memory and for a ram-disk. They are named as follows:

  zImage-collie-Xmemory-Ystorage.bin

Where Xmemory is the amount of RAM devoted to system memory, and Ystorage is the amount of RAM devoted to storage space. Xmemory+Ystorage should equal 64MB for SL5500 owners and 32MB for SL5000D owners. Note that if you have an SL-5000D, you should choose the zImage-collie-32-0 image unless you know what you are doing, because the 24-8 image doesn’t leave enough memory to run GPE or Opie very well.

Download the zImage from http://openzaurus.org/download/; you will find them in the “sl5000,sl5500″ or “collie″ directory, and rename it to just “zImage” (note that there is no .bin on the end of the filename). If you can't find them, you may want to use backup link1 or backup link 2

Download the initrd

The initrd.bin contains the basic filesystem structure and default programs for OpenZaurus.

There are a number of available initrds:

  • opie-image contains an Opie based system. This is a QT/Embedded based graphical system (which is most like the original Sharp ROM) (see http://opie.handhelds.org/)
  • gpe-image contains the a GPE Palmtop Environment based system (see http://gpe.handhelds.org/)
  • bootstrap-image contains no graphical system
  • e-image(-core) contains the Enlightenment GUI

If you don’t know which you want then you probably want the opie-image

Download your choice of initrd image (which will be named *-image-*-collie.initrd.bin) and rename it to “initrd.bin”.

Preparations for flashing

Check the md5sums of these files and compare them with the list in the download directory to ensure that they have not been corrupted during the download.

You will need a CompactFlash card (not an SD card as can be used to flash other Zauri; CF cards are the largish square ones that fit in the top slot of the Zaurus) with at least 16MB of space available. In some cases, the Zaurus is unable to recognise CF cards above a certain size for flashing, even if it can read them when booted. For example 1 and 2GB might not always work for flashing the ROM.

Transfer both files to your CompactFlash card. If you don’t have a compactflash reader, you can copy the files to your Zaurus (via Qtopia Desktop, scp, ftp, or whatever method you use for file transfer) and move them onto the CompactFlash card.

Make sure your files are in the root directory of your flash card. For example, if you copied the files to your Zaurus they will be in /mnt/cf/Documents/Applications/octet-stream. They should be moved to /mnt/cf (use the file manager for this or use the console).

Note: Do NOT attempt to flash your Zaurus with a ext2 formatted CF card.

If you need to re-partition/format your CF card, use fdisk to create a single primary partition, /dev/sdX1 of type 6 (FAT 16). This should then be formatted as FAT16 (mkfs.vfat -F 16 /dev/sdX1).[Be careful when formatting that you don't over-write the wrong disk!] All CF cards come formatted as vfat when you buy them, so unless you have reformatted your CF card, there is nothing to worry about.

Make sure the Zaurus battery is charged up. Otherwise, it will refuse to flash.

Flash

Flashing is the process of replacing the basic information and programs on the Zaurus with new ones (in this case, the kernel and root filesystem). It will remove all files from your Zaurus except those on SD or CompactFlash. This means programs not installed on SD or CompactFlash will not run after the upgrade.

  1. Make sure all your data is backed up!
  2. Insert the card with the files into the Zaurus or confirm that they have both transferred completely.
  3. Make sure that the AC adapter is connected to the Zaurus and is plugged in.
  4. Move the switch below the battery compartment to “REPLACE BATTERY.” Open the battery compartment lid. Make sure you DO NOT take the battery out.
  5. Hold down the “C” and “D” keys on the Zaurus’ keyboard and press the “FULL RESET” button located on the lower-right side of the battery compartment. Release the reset button, then release the “C” and “D” keys.
    1. Both the power and mail lights on the Zaurus should light up and stay lit up once you let go. If they do not light up, try again - you didn’t press the combination correctly, or you may not have the power cable plugged into the Zaurus. If they light up and then turn off after about a second, the zImage and initrd.bin files were not found. Make sure your card is formatted with vfat and the files are in the root of the flash card (not in any subdirectories). It might also be that the battery is flat - the Zaurus must have sufficient power to come on normally. You may need to charge it for at least half an hour.
    2. If you aren't having luck getting both lights to stay on for more than a second during the flash attempt, the problem may be that the compact flash card is partitioned. It appears that the compact flash card must be formatted vfat on the entire device and not just a partition for this flash method to work. I had this problem and found that my compact flash card (which appears to be intended as camera media) was partioned with a single partition taking the whole device. In my case, this showed up as /dev/sda1 when mounted on my Linux desktop. To fix this, I deleted with partition with fdisk, then ran mkfs.vfat -I /dev/sda to create a vfat partition on the whole device. I then mounted the newly created file system at /dev/sda and coppied my initrd.bin and zImage files into place. After this, I was able to get the lights to stay on and the Zaurus was updated with my Open Zaurus image as expected.
      I find otherwise: on my Collie, I have no problem with a 1GB CF card, containing a a filesystem on /dev/sda1 --RJN
    3. If the lights flash on and off, then this indicates a failure; something went wrong. (What went wrong is difficult to diagnose; try running through this process again and checking all the steps, or using a different CF card).
  6. Do not touch anything when the Zaurus is flashing! Do not unplug the power or you risk bricking your Zaurus. The flash should take between 3 and 12 minutes for a standard CF card, longer if flashing from a microdrive.
  7. After the green LED goes out, push the “FULL RESET” button in the lower-right side of the battery compartment.
  8. Replace the battery compartment lid and slide the battery replacement switch to “NORMAL OPERATION.”

Alternatively to pressing C+D+Reset, you can press D+P (G+P in some models), enter the internal diagnostics menu, and start the flashing process from there.

Reboot

If you have flashed the opie-image, remove all storage cards for the first boot.

Turn on your Zaurus!

Booting up OpenZaurus for the first time may take a while (as packages are being configured). So please be patient. Once it boots, you should have a fully working Zaurus running your new image.

Have lots of fun!

Special Notes for OZ on the Collie Platform

These instructions should include a method for moving your root filesystem to an SD card of sufficient size to accomodate an OZ install. The current version of OZ is essentially broken out of the box on Collie because you cannot do even an ipkg upgrade on it without running out of room on root (or you may try your luck over SSH with Opie shut down - but beware that even though there might be plenty of space left, jffs2 might not let you use it). This doesn't mean you can't use OZ on a Collie, but there is an additional, nontrivial step to take before your system is usable.

This link may help:

HowTos/Root_Filesystem_on_external_media

Note that in theory you can move your root fs to a CF card as well (make sure you do ipkg update && ipkg install altboot first to get the latest version), but that is a bad idea on Collie with 2.4 kernel - cheifly because you won't be able to resume from a suspend. See the Collie/TipsAndTricks page if you just _cannot_ have your root filesystem on SD (which would mean that you have to keep your SD card in when your Zaurus is running).

Users running OZ 3.5.4.x on Collie are sharing their methods and quality of results on Collie/TipsAndTricks. Tips are given in a step by step way easy for OZ newbies to follow detailing how to install OZ on Collie. Steps include how to deal with known bugs and common problems. A must-read for any Collie owner thinking about running OZ.