Monday, November 23, 2009

Version 2.02 IZ2S Release (aka Shell with benefits)

I am pleased to present you with my very latest Improved Z2 Shell version 2.02. This release is a grand improvement over the last, and provides you with a new *color* irc client (irssi), a multi-protocol instant messenger (center-im 4.22.8) and a graphical web browser (links2 with DirectFB). And thanks to the wonders of "screen" you can run all three of these new programs and more in the comforts of your Z2 Shell.

Here is the download link:

I have created a video to demonstrate some of these neat new tools and features.

Improved Zipit Z2 Shell v2.02 - Now with graphical web browser! from Ray Haque on Vimeo.

This release represents several weeks of maddening code hacking. After getting Center-IM working I went straight to my goal of creating a graphical web browser for the shell. Initially I went after trying to get something going with "MiniGui". This was used to create a graphical web browser for the original Zipit device. However, the folks in #zipit on turned my onto the DirectFB project. It took about two weeks of off and on hacking and poking, but I was eventually able to wrangle all of the dependencies into submission and slap all the parts together into a single static binary. The biggest challenge there was to make the screen display correctly. As you may know, the Z2 uses a screen size of 240x320, which is turned sideways. This meant that DirectFB had to be rotated. But when rotated, it no longer fit the screen! In the end, a kind fellow in the UK (from the DirectFB mailing list) suggested that I alter the application (in this case, links2). From there it wasn't that difficult to alter. I just had to tell links to ignore whatever size DirectFB reported to it, and set it to 320x240. Another challenge was to get the keyboard to be usable in links2. Links2 wants to use the ALT key to control menus. But on the Z2, the ALT key is used for every single non-alpha key! I was exploring some complicated solutions when rkdavis (from #zipit) found that simply using a different keymap, this whole problem was avoidable.

Here are the release notes:
IZS - The "Improved Z2 Shell" (aka Shell with Benefits) v2.02

This collection was built by Ray Dios Haque out of sheer necessity. I wanted something that I could play with that would not effect the stock software that comes on the Z2. The easiest way to do that was to take the Z2 Shell that was built by rossimo from Zipit Wireless and expand upon it. I take no credit for the work of the Zipit community. If I don't claim to have built it - it's because I didn't. Thanks to all of you for your contributions over the years. I hope you enjoy my additions!

INSTALL (borrowed from the original README)
Format your SD card as a FAT or a FAT16 file system. Copy everything from this zip file onto the root of the card (preserving all paths/directories). Insert your SD card into the Zipit and boot it up. Note that you can only boot this image if you are running the Stock OS that came with your Zipit. If you have installed OpenEmbedded or Debian, then you have probably replaced the stock operating system which included a routine to look for the script. For legal purposes, I cannot provide you this stock operating system. Some of the smarter people in the Zipit community might be able to help you restore this OS (see CHAT below).

Come chat with us! There is a thriving (?) community of the worlds best Zipit hackers who hang out in #zipit on You can fire up 'irc' from this very image and come hang out.

RELEASE 2.02 (ALL NEW!) - November 2009
cls (clear screen), centerim (ncurses instant messenger with AIM, Yahoo, ICQ support), irssi (ncurses irc client), links (ncurses), links2 (graphical browser!), sed (for scripting), tar, bzip2 (bzip2, bz2recover), coreutils (10MB's of binaries)

RELEASE 2.01 - Initial Release
wget, ircii-20090520 (irc), wireless-tools (ifrename, iwconfig, iwevent, iwgetid, iwlist, iwpriv, iwspy), ftp (ftp, /etc/services), unzip (unzipsfx, unzip, funzip), nmap (nmap, *new* ncat), wpa_passphrase, less (lessecho, lesskey), grep

ncurses (libform.a, libform_g.a, libmenu.a, libmenu_g.a, libncurses++.a, libncurses.a libncurses_g.a, libpanel.a, libpanel_g.a)

REV 2.02
- Modified the PATH statement so that coreutils and /mnt/sd0/bin binaries will override the busybox stuff.
- Created a home directory for the root user which exists on the SD card. It holds your stuff.
- Added a routine that change your MAC address to something random the first time you boot up. This should prevent duplicate MAC problems if you own multiple Z2 devices.
- Added a /var directory that exists on your SD card. Some things (like dropbear) expect to find it. Had to fix a script error in the BETA (thanks rkdavis).
- Added an /etc/issue file which is displayed at logon time and to ssh connections.
REV 2.01
- Added a routine asking if you would like to configure your wireless card. This was not possible before as there was no scanning routine and the image lacked the wpa_passphrase utility. You can now scan for and configure your wireless settings entirely from the zipit (wording updated in 2.02).
- Added "cp /mnt/sd0/etc/services /etc/services" which gives the ftp command the port numbers it needs to function.
- Added "cp -R /mnt/sd0/etc/terminfo /etc", "export TERM=vt102", "export TERMINFO=/etc/terminfo" to help irc understand the screen layout.
- Added "ln -s /mnt/sd0/lib/* /lib" to make ncurses libraries usable, and any future libraries that you or I might add.
- Added "ln -s /mnt/sd0/share /share" for nmap and anything else that might require a "share" directory to be present to function.

- Replaced the stock keyboard driver in /modules with one that was created by GPSFan (Ken) from the Zipit Yahoo Group. This removed all of the problems with keys not working, or repeating while typing. The original drivers remain, but have been renamed to *.orig.

- A script to download and install "packages" (zip files) using wget, unzip, and a "binary repository" on A similar system could provide updates when I provide them.
- I have been working on getting GPSFan's sound modules working on the Z2 Shell. The modules load, but the alsa tools do not build properly with a static flag. I am hoping to get this resolved soon. GPSFan has been very helpful in troubleshooting this.
- I still want to get an image viewer working. DFBSee 'almost' works.

IFAQ (InFrequently Asked Questions)
Q. Why are you wasting your time on this? The Z2 Shell is dead!
A. It may be 10x more work to get simple things built for it - the Z2 is very lean, and still very useful.

Q. Why does nmap (or some other binary) run so slow?
A. Because everything has to be built "static" to run on the Z2. That means that where you might normally have hundreds of shared libraries on a linux machine, the Z2 Shell must embed the libraries into each running binary. It makes for some bloated inefficient stuff. But, it works. If you want a better system - start writing it! Otherwise, try to limit the actions of what you are doing. For instance, use an address range or port range with nmap. Don't start long running scans on entire networks. This is a Z2 we're talking about. The resources are pretty lean.

Q. How can I add my own binary/package?
A. There are several ways to go about this. The method I have used to compile everything is "scratchbox". Scratchbox is a program which let's you cross-compile applications. That means that you can build stuff for an ARM platform, even though you have a regular x86 machine. It can be tricky and complicated. Try reading up on what I have posted at

Q. Why did you *insert snarky comment here*?
A. If you find that I did something stupid and inefficient, do let me know. I don't claim to have any expertise in the area of building software. If you have some suggestions on how to improve things or would like to help with the next release of this improved Z2 Shell, email me at I would love to collaborate with some folks who might be more talented than myself.

Q. Will you build *insert package name here* for me?
A. Probably. Unless you are asking me to build something that has an endless list of dependencies. In which case I will probably tell you to install OpenEmbedded or full fledged Debian. They all ready have all of these packages. I am only expanding upon the old Z2 Shell because I find it lean and useful.

Right now, I am focusing on getting the sound modules working correctly on the Z2 Shell. Long ago, GPSFan developed some kernel modules and utilities for the Z2. He did so for the replacement shell(s) which are able to load dynamic libraries. I have been working to get those same tools to load in a static environment but I have run into some obstacles. Thanks to GPSFan, we determined that the broken alsa-utils I kept creating were actually due to bugs with the alsa-libs and alsa-utils packages themselves. Meanwhile, I have been successful in compiling an older audio tools called "aumix". While it can recognize devices and change sound settings ... I still have no sound! It's a work in progress! If any of you talented Z2 developers are lingering and lurking out there - get your asses in to #zipit and help me. :-)

1 comment: