This is it!

Yeah, this is what I had in mind when I started tinkering with the Zipit: a portable, battery operated, device, which could run some serious Linux stuff. And, not cost me a lot to get more of them put together.

By removing the restrictions of the ROM file system puny size, and moving it onto the SD card, this makes the Zipit a serious little Linux machine. Add to that mixture, the OpenEmbedded tool for building an embedded distro, this frees the Zipit from the limitations it had.

OpenZipit is a fully featured wireless client, sorry, no GUI, but there is a wealth of text console apps that will run on the Zipit.

TopSome of the packages

Here is a list of the major packages in OpenZipit:

  • pine - email client which does either POP3 or IMAP protocols.
  • links - an ssl enabled html browser, yes, you can login to secure sites with it.
  • irssi - an IRC client, similar to xchat, but without the GUI.
  • openssh - you already know what ssh is...
  • openvpn - a secure IP tunneling package, I use it to connect to my home computer with the Zipit.
  • sysvinit - runlevels, you can 'halt' and the Zipit will power off, or, 'reboot'.
  • cron - scheduler for events per date / time / day of week / etc..
  • minicom - a serial terminal emulator.
  • perl - when all else fails, there is always a script...
  • bash - a real console shell instead of the ash shell of busybox.
  • console-tools - showkeys, loadkeys and dumpkeys to assist in (re)mapping the keyboard.
  • madplay, sox, aumix - to play MP3 files (11025 Hz does not skip).


  • TopBefore you get started...

    This is the second of the linux distributions that are openzipit.org has available for the Zipit. This distribution uses the Flash memory of the Zipit to hold the bootloader, splashscreen and kernel. All other files are kept on the SD (MMC) card. The kernel is loaded into RAM by the bootloader, then is launched, the kernel then boots from the SD card.

    To use this distribution, you will have to had to install a serial port on the Zipit and an SD card. Effectively, you need something like the Addon Board . You can still use this distro if you have built your own 5wire mod and added your own SD card

    In addition the serial port and SD card, you will need a Linux host to put the installation software on and to make the filesystem of the SD card. Nothing fancy, any old Linux machine should do.

    Oh, and, you need one of those multi-memory card (camera flash readers) installed, and working, on that Linux machine. I use a cheap "Apacer Mega Steno" model MGA20 that I picked up from the net as a $14 closeout. You probably can use any cheap card reader, most of this type of stuff is now working on Linux.


    TopGet the files and unpack them

    There is one tarball that has all the files that you need.

    Make a directory to work from (e.g. mkdir ~/OpenZipit), then download the tarball, move it into that directory, and unpack it with tar jxf OpenZipitDistro-2.4.tar.bz2

    You should see something like the following files:
     
    -rw-r--r-- 1 tom tom     1440 Apr 11 08:07 bootstrap.bin 
    -rw-r--r-- 1 tom tom 14355122 Apr 11 10:29 bootzipit-image-zipit.rootfs.tar.gz 
    -rwxr-xr-x 1 tom tom      303 Apr 11 06:20 buildSplash.sh 
    -rwxr-xr-x 1 tom tom    19492 Apr 11 06:20 FiveWireLoader 
    -rw-r--r-- 1 tom tom  1267849 Apr 11 05:35 Image 
    -rw-r--r-- 1 tom tom      666 Jul 29 12:58 md5sums 
    -rwxr-xr-x 1 tom tom     8849 Apr 11 06:20 Raster2Xpm 
    -rw-r--r-- 1 tom tom      167 Jul 29 12:45 README 
    -rw-r--r-- 1 tom tom      852 Apr 11 08:07 README.loader 
    -rw-r--r-- 1 tom tom     5631 Jul 29 12:57 README.mmc 
    -rw-r--r-- 1 tom tom      509 Apr 11 06:20 README.splash 
    -rw-r--r-- 1 tom tom    38400 Apr 11 08:07 splash.bin 
    -rw-r--r-- 1 tom tom     2048 Apr 11 08:07 utils.bin 
    -rw-r--r-- 1 tom tom  2097152 Jul 29 12:38 wholeThing.rom 
    -rwxr-xr-x 1 tom tom    10200 Apr 11 06:20 Xpm2Raster 
    

    TopPut OpenZipit filesystem onto SD card

    NOTE: A detailed step-by-step of how to prepare the MMC card is here (click me)



    Using fdisk, delete the current FAT16 partition from the SD card, then create a linux partition (type 83). Once the linux partition has been created, put an ext3 filesystem on the card with mke2fs -j /dev/sdX1. Now, mount the new filesytem so that files can be copied onto it (mount -t ext3 /dev/sdX1 /mnt/removable).

    WARNING! It has been reported to me that the Zipit MMC driver has problems booting from a partition of more than 1024 cylinders. Maybe make two partitions, the first only 128Meg and the other partition being the remainder of the card?

    Now, as root, cd into the directory where you mounted the SD card (cd /mnt/removable). Unpack the tarball onto the SD card with tar zxf /home/tom/OpenZipit/bootstrap-image-zipit.rootfs.tar.gz.

    Your directory of the SD card should now look like this:

    ls /mnt/removable
     
    bin/   dev/  home/  media/  proc/  sys/  usr/ 
    boot/  etc/  lib/   mnt/    sbin/  tmp/  var/ 
    
    Unmount the drive now and it is ready to use (cd / ; umount /mnt/removable)!


    TopInstall the new kernel

    There is a new strategy to how the kernel boots. This kernel will mount the SD card, then do its boot from the files on the SD card. The Flash memory only holds the bootstrap loader and a Linux kernel. There is no ROM file system in the Flash. This not only gives us more room for "stuff", but allows for more flexibility for customizing things.

    Run the FiveWireLoader from the directory you unpacked the tarball and give it the device name of the serial port connected to the Zipit. For example, I have the Zipit attache to /dev/ttyS1, so I would run the command of: ./FiveWireLoader /dev/ttyS1

    You will be asked to short DBG to GND and then power up the Zipit. Once powered up, with a steady GREEN LED, press the ENTER on the keyboard. The program will then transfer a small utility into the Zipit and present you with the menu as shown:
     
        ZipIt OPERATIONS MENU -- Choose the operation(s) 
        ------------------------------------------------ 
      0 - upload everything & burn 'bootstrap.bin, splash.bin, Image' 
      1 - upload system loader: 'bootstrap.bin' (64KB max) 
      2 - upload kernel image: 'Image' (1920KB max) 
      3 - upload bootsplash image: 'splash.bin' (38400 bytes max) 
      4 - burn uploaded files into the ZipIt Flash memory. 
      G - grab rom image from Zipit into: 'zipit-image.rom' 
      R - upload, but not burn, rom image: 'wholeThing.rom' (2MB max) 
      q - quit 
    
    Choose '0' to upload it all and program the Flash. That's it! After the programming is finished, enjoy your new Zipit!

    To verify that the kernel is correctly installed, watch the LCD when you power on the Zipit. The full screen logo should appear momentarily, then the entire screen will blink and a flashing cursor will appear on the lower left corner of the LCD. The first screen is painted by the bootloader, the second screen (with the flashing cursor) is that which the kernel paints.

    If you get the flashing cursor and the Zipit doesn't starting printing out lines of text at the bottom of the screen, you messed up in building the MMC card contents. Also, you can connect the Zipit serial port to the computer using the programming cable, then run minicom. You will have to set minicom to '57600,n,8,1' so you can see the messages that the kernel prints out when booting. That should tell you a lot about what is wrong.

    TopEnabling the sshd daemon


    By default, the sshd daemon is disabled. The reason for this is that the process of generating a set of ssh host keys can take serveral minutes. I felt that people initially booting the OpenZipitDistro for the first time would be eager to see "what it can do" and not be pleased with waiting that long to play with their new Zipit.

    To enable the ssh daemon, login as root on the Zipit, then enter the following:
    rm /etc/ssh/sshd_not_to_be_run
    /etc/init.d/sshd start
    That will generated the host keys and start the ssh daemon. It may take several minutes to generate the ssh host keys. When finished, ssh will be running and will start whenever you boot up. To check and see if ssh is running, issue the following command:
    ps ax
    You should see sshd in the process stack (it is at PID 329 in this list):
     
    root@zipit:~# ps ax 
      PID TTY      STAT   TIME COMMAND 
        1 ?        S      0:04 ini 
        2 ?        S      0:00 [keventd] 
        3 ?        SN     0:00 [ksoftirqd_CPU0] 
        4 ?        S      0:00 [kswapd] 
        5 ?        S      0:00 [bdflush] 
        6 ?        S      0:01 [kupdated] 
        7 ?        S      0:03 [kjournald] 
       97 ?        S      0:00 [mtdblockd] 
      235 ?        Ss     0:00 udhcpc -n -p /var/run/udhcpc.eth0.pid -i eth0 
      292 ?        Ss     0:00 /usr/sbin/cron 
      313 ?        Ss     0:00 /sbin/syslogd -n -C 64 -m 20 
      315 ?        Ss     0:00 /sbin/klogd -n 
      329 ?        Ss     0:00 /usr/sbin/sshd 
      342 vc/1     Ss+    0:00 /usr/sbin/fbgetty -t /dev/vc/1 -f /dev/fb0 
      343 vc/2     Ss+    0:00 /usr/sbin/fbgetty -t /dev/vc/2 -f /dev/fb0 
      344 vc/3     Ss+    0:00 /usr/sbin/fbgetty -t /dev/vc/3 -f /dev/fb0 
      345 ttyAM1   Ss     0:01 -sh 
      350 ttyAM1   R+     0:00 ps ax