Tag Archive: zipit


Your Zipit looks like this when booting U-boot. No lights, blank screen, no sign of life!

A few words of warning first: The following instructions have been tested by me once and only once.  You stand a chance of bricking your Zipit.  I can’t be held responsible if you brick your Zipit either following these instructions or failing to follow the instructions.  If you brick it, you will either need to build or obtain a JTAG interface to fix it.  You probably should consider doing the serial mod first before you reflash with U-boot anyways just so you can see any error messages on the console if you get stuck.  MY instructions are NOT for reflashing from a stock kernel but there are instructions in the README.  If you haven’t already reflashed to the Open Zipit boot loaders then you will need to follow a different procedure to upgrade to U-boot.  Lastly, you will not be able to use SDHC cards after you upgrade so 2gb will be the limit although I understand there is already a new version of  U-boot which adds the SDHC drivers.  Make sure your Zipit is plugged in and fully charged.  This is cutting edge stuff for the Zipit.  You probably don’t need to go to the trouble and the risk of this procedure to enjoy using your Zipit as a pocket-sized Linux device.  Read this whole post and the README before you attempt flashing U-boot.

With that out of the way, let’s get started.  I’m using Mozzwald’s z2buntu to do the actual flashing of U-boot.  This distribution works well because it doesn’t have X11 on it by default to muck things up.  You’ll need to log in as root or use sudo.  Don’t get too attached to this install because you will be throwing it out the window soon enough.

First you’ll need to wget z2-uboot-06262010.tar.gz on your Zipit.  The md5 hash is c917bfd057e5bfd7e0a50e44e4192d25.  Untar the file, changed to the uboot-rel directory and run:

sudo ./z2debian.sh

You’ll see a few weird messages that freaked me out.  They say stuff like /dev/mtdblock0 no space left on device.  Don’t worry about these.  The script writes 0xFF to the flash memory before it done flashes until it runs out of room.   After all this is done, pull out the battery, and remove the AC to clear the ram entirely.  Then plug it all back in.

Here is more weirdness, if you boot up your system right now, there is NO way to tell anything is happening.  It will look dead dead dead.  No lights, no nothing.  The only sign of life you can get is if you push the reset button.  That will cause the keyboard light to briefly flash.  If you have done the serial mod, this would be a good time to fire up a terminal and see if everything went well.  If you hit the reset pin while plugged into the Zipit, you should see this in your terminal:

From here, you can see that U-boot is not finding the kernel partition that it needs to on the flash card.  Also, Mozzwald’s script was supposed to load a static linked kernel into flash that would be bootable by U-boot but something is a little screwy with the flasher script at the moment.  No worries since we can fix that later.  I don’t know much about U-boot but I do know it’s far more powerful than the blob loader I was using.  The difference is that U-boot allows you to boot any properly build kernel that you stick in the primary fat32 partition.  One command I know that you can do is “printenv”.  This will show you current loaded environment variables:

After you’ve tried that out, I’m sure you are ready to make your Zipit actually boot up again.  If you’ve gotten as far as the U-boot shell, at least you aren’t bricked.  If you haven’t done the serial mod, you are probably pissing yourself at this point thinking you probably bricked your Zipit.  Relax, take a deep breath and hit the reset button.  If the keyboard light flashes quickly, you are probably not bricked.  No guarantees though.

You will now need to download Mozzwald’s U-boot ready tarball.  While you are waiting for that, you need to partition a SD card as follows:

  • partition 1: vfat(fat32) 32-64MB (this partition holds the uImage and uboot.script files)
  • partition 2: ext3 for the remainder of the space (this is where your root fs goes)

I used gparted under Ubuntu to complete the partitioning operation since it’s free and easy to use.  Make sure your SD card is plugged in and recognized but unmount it if it’s not already.

After the new partition scheme on the  SD card is created, mount the card and change directories to the mountpoint (/media/z2buntu on my system), untar the filesystem into place with:

sudo tar -pxvf /path/to/z2buntu-uboot-rootfs.tar.bz2

There is another tar file inside of the main z2-uboot tarfile that you downloaded first(z2-uboot-06262010.tar.gz).  The file is called z2-2.6.35-rc3.tar.gz.  Untar that file and then:

cd lib/modules/2.6.35-rc3+/kernel/

You need to copy the uImage file from that directory to the vfat partition on your SD card.  You’ll also need the uboot.script file that lives in the root directory of the z2-uboot-06262010.tar.gz tarfile.  You should now be ready to put your SD card back in the Zipit and boot it up.  If you did everything correctly, it should look like this after a few seconds of being completely blank with no lights on:

More caveats.  To quote Mozzwald, “things won’t work the same anymore”.  You will want to disable your power management scripts for now.  Closing the lid could cause you to get stuck in a blank screen loop.  In most root file systems it just involves commenting out some lines in your rc.local and perhaps making a few other changes.  I would suggest jumping in the /etc/rc.local file as soon as you get booted so that you can tweak the Zipit-specific settings.  The files that I’m linking to above are NOT the newest and latest versions and there are things in them that I know are broken but none of it is unfixable.  I’m providing this set of instructions so people can see that U-boot is still in a very experimental stage.  I wouldn’t not suggest U-boot for 99.9% of the Zipit hackers out there but if you are dying to build your own custom kernel for the Zipit, U-boot is really your only option.

Why would I go to all this trouble to seemingly downgrade my Zipit you might ask?  This brings me one step closer to Zipit nirvana with the Zipit USB mod.  A custom kernel is required to have the USB host drivers in it so this is a necessary evil.  Many thanks to Marex for U-boot, gpsfan for pioneering the USB mod and being one of the early testers/tweakers of U-boot, rkdavis for bricking one of his Zipits trying to upgrade to U-boot, and especially to Mozzwald for putting up with at least 5 pages of questions that I asked him regarding this mod and for providing all of the files I’ve linked to above.  None of this is my work and the credit belongs to them and a few others for pioneering this hack.

If you are interested in buying your own Zipit to hack and you like the information on my site, please buy your Zipit using this link and support my site.  You won’t find them anywhere cheaper than that anyways.

Usually when I modify something, I try not to ruin the aesthetics. It has to perform and look better(or the same) than before I start the project, otherwise I don’t want to do it. I think this mod has achieved that. With some help from a friend, I managed to design and build a surface mount serial level converter board that fits inside the Zipit Z2 behind the screen. It pops out of the Zipit in the form of a 3.5mm headphone jack that is stuffed up in one of the only spots it would possibly fit. From there, I built a short cable that turns the 3.5mm plug into a DB-9 for plugging into any standard serial hardware.

The mod is powered entirely from the Zipit it and will have an unnoticeable effect on battery life. The chip I used is the Maxim 3221 CAE 16 pin SOIC variant which also has some built in power saving functionality. This was the smallest chip that I could find that would do the job. The size of the capacitors on the board are not entirely critical but their function is. They help the IC boost the voltage up to the proper level for communicating with RS-232 devices. Without the caps, chances are that the converter will work for some devices and not for others because it will fail to fall within the RS-232 spec. I used .1uF surface mount caps in a 603 package. They are pretty tiny but certainly not unmanageable. There are plenty of tutorials out there on soldering surface mount components if you happen to be nervous about this.  Here is the schematic.

Before we can put the board in, we need to crack the case so I put together this Zipit disassembly guide.  After it was apart, I could see the space that I had behind the screen.  It’s a surprising amount really.  They could have made this thing a little thinner if they wanted to.

Here is a good view of the area behind the LCD

Test fitting the 3.5mm jack

As I was I saying, the 3.5mm jack is stuffed in the only spot I could find for it.  It’s where the LCD cable comes down from the upper half of the Zipit.  I happened to salvage this headphone jack from a Sansa Shaker which is a great MP3 player for a baby.  I had an extra one that was broken so I took the two headphone jacks out of it and gave one to my friend.  rkdavis found a 3.5mm jack on Digikey that looks pretty similar to what I used.  The space is very tight so the size of the jack is critical.

The wires routed and board mounted

As you can see, that board fits perfectly in that empty square.  I used a few dabs of hot glue to hold everything together and route the wires where I wanted them to go.  I took care to mark the wires with Sharpie pen notches so I knew which wire went where.  The wires I used are Kynar 30 AWG wire wrap wire.

Using helping hands to solder the 3.5mm jack

After the wires were all routed, I stuck the LCD housing back together.  I pulled all 7 wires through the same spot where the LCD wiring comes into the lower half of the unit.  I used some Helping Hands to hold the headphone jack and solder tiny wires to it.

3.5mm jack hot glued in place

I used copious amounts of hot glue to make sure that headphone jack didn’t move.  I also drilled the hole extra tight and crammed the jack into it so I don’t expect any movement at all.  After this step, the hard part is done and there are only 4 wires left to hassle with.

Mainboard locations for hooking up the serial converter

I stuck the keyboard back together and put the motherboard back into the zipit it.  Then it was fairly easy to solder the last four leads to these locations and put the bottom half of the case back together.  Now that it’s done, it’s time to plug it into a serial port.

The completed mod including the dongle

I’m using Hyper Terminal in Windows XP under VM Ware Fusion.  The port settings are 115,200, 8 bits, 1 stop bit, no parity and NO flow control(very important).  Here is what pops up when I first boot the Zipit.

This is what pops up when you first boot the Zipit

If anyone wants to replicate what I’ve done, here is the PCB layout for Kicad.  Feel free to comment if you need more assistance.

Now for that USB host mod

If you are interested in buying your own Zipit to hack and you like the information on my site, please buy your Zipit using this link and support my site. You won’t find them anywhere cheaper than that anyways.

Zipit Z2 disassembly guide

The Zipit Z2 is the perfect little hacking platform.  Searching around on the web, I couldn’t find a decent group of pictures showing how to disassemble the Zipit so I decided to post my own little guide.  Obviously use this guide at your own risk…

First we slide a plastic card to separate the dark gray plastic piece behind the screen from Zipit  Using a plastic card will avoid scratching the case.  In this case, I used a Borders key chain membership card I found on the sidewalk.  This will expose three screws behind the screen and the ribbon connector for the screen that I would suggest not messing with.  Remove those three screws.  The top two are slightly shorter than the bottom one.

Now you will need to use a slotted screwdriver to pop the plastic snap loose that is shown in the picture.  Don’t force it too hard but it IS fairly tight so you’ll have to use a bit more force than you’d normally expect.  Now that you have that nice gap, wedge your plastic card in place and slide it down the lcd housing.  There should be four plastic snaps that you will be able to work lose.  Notice the little magnet towards the top of the picture?  That’s what makes the Zipit stay closed nicely.

After I get this far with it, I like to flip it over and crack the bottom case.  The battery needs to come out if you haven’t already done so.  There are three screws under it.  Go ahead and pop those out.  After you’ve done that, it’s time to start prying with your plastic card.  I like to start at the back near the hinges since I seem to be able to wedge my card in there the best and get the case to flex the furthest.  I’ve tried it from the SD slot as well but it’s hard to get enough leverage that we since you don’t have the screen to hold onto from that side.  There are four of those snap tabs that are holding the bottom case together.

After you have the bottom separated, go back to the top.  There is a small piece of plastic that is in the hinge section.  You can now pop that off from underneath if you need to or whatever other angle.  After it’s off, you’ll need to pry upward as shown in the picture.  After it’s popped loose, you need to slide the whole back/upper half of the LCD housing towards the side you are prying from.  There is a small lip on the back half that is keeping it in place.  Similar to the lip near where the screwdriver is prying in the picture.  That’s it!  There is one extra piece that rkdavis insists is necessary but I’ve been using mine fine without it for a month now so you can make the final call.

Mozzwald graciously loaned me his picture of the mystery plastic piece installed in place:

If you are interested in buying your own Zipit to hack and you like the information on my site, please buy your Zipit using this link and support my site. You won’t find them anywhere cheaper than that anyways.

updated 3/24/2011

The Zipit Z2 is a great little hacking platform.  There are lots of people putting out their own distributions and directions for customizing this platform.  I’m going to attempt to make a list of all of the distributions and sources that I know of at the moment.  If anyone knows of any other distros out there for the Z2, please feel free to comment.  Here is the list in no particular order:

z2lite & z2sid – Wicknix was bored and put out z2lite.  For more power, try the Debian-based z2sid in both a command line only and X11 version.  These are the latest and greatest as of my most recent update.  They require uboot which is dead simple nowadays.  Mozzwald has links to the uboot version of z2sid on his site.

Wejp’s Z2 linux – Not sure I’m calling this by it’s proper name but this one is also one of the newer ones.  I haven’t tried it out myself but I know several folks have.  Click here to check out Wejp’s Linux.

UbuntuMozzwald has recently rolled out a version of Ubuntu for the Zipit Z2.  The most exciting featured of this distro for me is that it has gcc.  It’s the only Debian-based distro with gcc working properly at the moment.  Here is the link to Mozzwald’s Ubuntu distro.  I have also provided my own installation instructions.  I also started a Ubuntu for Z2 RC1 torrent to take a bit of pressure of Mozzwald’s server.

Root Nexus – Optk1k2600 is running this one-man community project.  It is a very nice image that is a touch more polished than some of the others.  For instance, the battery meter is somewhat stable on Root Nexus vs Side-Track in my experience.  There is lots of customization that Optk1k2600 has done to tailor this distro nicely to the Zipit platform.  Follow this link for more information on Root Nexus.

Side-Track – This distro was rolled out by none other than the Iron Geek, Adrian Crenshaw.  This one is based on Root Nexus but is customized for pen-testing so it has a bunch of cool network analysis/cracking tools on it.  Not all of them are tested and functioning.  It’s not a perfect distro but it’s pretty good and probably my favorite at the moment.  Click here for more information on Side-Track for the Zipit.  Now if only we could get driftnet working…  update 3/24/2011 – Irongeek has moved on to other projects and has not been keeping this updated.  I have made side-track work with uboot though if anyone is interested in giving it a shot.

IZS2 – IZS2 is developed and maintained by Ray Dios Haque.  This distribution does not require reflashing the boot loader or any other modification to the Zipit Z2.  I have not tested this userland but it seems to be a very popular choice in the Zipit community.  Follow this link for the IZS2 homepage.

EZ2S(IZS2 enhanced) – Russell Davis has been hard at work improving his latest Z2 shell.  Russell’s distribution has the distinct advantage of not requiring the boot loader to be reflashed.  Reflashing the boot loader makes a lot of people nervous since it’s possible to brick your system.  Unfortunately, I have not had time to try EZ2S or IZS2 enhanced since I didn’t find out about them until after I had already reflashed my kernel.  I know I can always go back but I’ve been too busy with Side-Track and Ubuntu to mess with it.  IZS2e/EZ2S is a fork of IZS2 which was developed by Ray Dios Haque.  You can read more about EZ2S on Russell Davis’ blog Executing Gummiworms.  Russell also has developed some cool scripts and binaries that have improved things for Zipit Debian users.

Aliosa27 – Hunter Davis made a video showing the entire process of installing the Aliosa27 image onto your Zipit.  I have not tried this one since it seems to be one of the older distros available.  Installing the Aliosa27 image involves reflashing the bootloader so that step is similar to any of the other Debian-based userlands out there.  Here is the link to Hunter’s videoQuantumLime also has a very nice and detailed page that features installation instructions for Aliosa27’s image.

OpenembeddedOpenembedded(for the Zipit at least) appears to me to be dead. Looking at Zipit Openembedded information page it sounds like the Zipit patches are out of sync with the mainline Openembedded code and probably mostly useless now. I’m including it here for historical purposes only. I have finally figured out how to build an Openembedded image for the Zipit.  Openembedded is really powerful and allows you to pretty much roll your own distribution with whatever features you would like.  Check out my guide Building Openembedded for the Zipit Z2 for more information.  Please comment below if my assumption is inaccurate and I will update this post.

Emdebian Grip – This distribution is another “roll your own” variety like Openembedded.  Douglas Henke has some excellent, detailed instructions on his blog about how to roll your own Emdebian Grip distro. As good as the instructions are, I haven’t tried it out yet myself so I can’t comment on how good or bad it is.  Here is the main Emdebian Grip homepage.

Buildroot – Yet another roll your own root fs for the Z2.  Buildroot is another alternative to Emdebian and Openembedded.

Mozzwald ran out of bandwidth for a bit so I’m starting this torrent anyone who would like to can grab his RC1 Ubuntu Distro for the Zipit.  See my installation instructions here.

I’m taking my first stab at creating a torrent here.  Hopefully it works.  Please seed it yourself if you like it:

Ubuntu for Zipit RC1 torrent

I took a closer look at the Easy Wifi Configurator script implemented on Mozzwald’s Ubuntu for the Zipit.  There are a couple trivial differences between Debian, Iz2s and Ubuntu for the Zipit and the setup-wifi.sh script tries to account for them all.  The long and short of it for now is that you need to change the line with the gawk statement to use awk instead.  That worked for me at least for the short term. There is also a broken sed statement which needs some attention but that will get worked out later I’m sure.

Second day with Ubuntu on the Zipit Z2

I decided to pick up my Zipit and try out Mozzwald’s Ubuntu distribution again.  I ended up manually starting up the wifi for now since rkdavis’ script isn’t working for me at the moment.  The following commands did it for me:

  • iwconfig eth0 essid your_id_here
  • iwconfig eth0 key your_hex_key_here
  • ifconfig eth0 down
  • ifconfig eth0 up
  • dhclient eth0

We’ll work on that EWoC script later…  Digging deeper into this distro, there is no GUI implemented yet.  First, let’s get a proper web browser on here:

apt-get install lynx

Now let’s grab the tweaked version of dosbox off Hunter Davis’ blog and try to compile it…

Five hours later I’m signing off here.  I’ll let you know next week when it finishes if it actually works.

I just came across a very exciting blog post on Mozzwald:

Ubuntu on the Zipit Z2

In all honesty, I don’t care much about Ubuntu.  It seems alright but I actually prefer Debian just slightly.  The really exciting part however is that mozzwald got gcc working!  Halle-freakin-lujah I’m glad someone finally tackled this problem.  There are a lot of things I like about Side-Track but there are also some broken things that were carried over from Rootnexus which I could do without.  Let’s dig in.

  1. firing up the Ubuntu VM on MacBook Pro
  2. download Mozzwald’s rootfs from right here http://www.mozzwald.com/zipit/zipit-ubuntu-rc1.tgz
  3. untar the image file into the home directory
  4. su to root.  Check this link to learn how to enable a root shell in Ubuntu
  5. dd if=zubuntu-jaunty-basic-rc1_05172010.img of=/dev/sdb (/dev/sdb on my system)
  6. with the flash card unmounted run gparted and expanded the partition on the flash card to the full capacity of the card
  7. download the Cozybit drivers from http://cozybit.com/projects/gspi8686/
  8. untar and rename the files to gspi8686.bin and gspi8686_hlp.bin, mount the flash card and copy them to /lib/firmware/libertas on the flash card
  9. unmount/eject the flash card and pop it in the Zipit Z2 (cross fingers)

Success!  It seemed to boot up nice and quick since it doesn’t boot into a window manager.  The l/p is user/ubuntu.  Right away I had to pull the Ubuntu root shell trick.

I’ve run into a small snag with the setup-wifi.sh not working properly but I think that will be sorted out soon enough.  I’ll report back after I’ve played with this distro a bit more.

Keep in mind that for this distro to work on your zipit, you’ll need to install the openzipit bootloader onto your device.  Instructions can be found here on Irongeek’s site.

Zipit serial board PCB picture

I had James etch the PCB for me since he’s set up a bit better for it thanks to a previously broken laminator I found somewhere.  To produce the board he used a laser printer to print on magazine paper, then he puts the printed surface facing a clean PCB and runs it back and forth through the laminator a couple of times.  Then he etches it.  He has a custom acrylic tank he made that has a fish tank bubbler and heater in it.  As you can see, the result is outstanding!  I’m waiting for my new Hakko 936 before I attempt to solder it up however.

I’ve been fighting with Kicad to design a tiny little serial converter for my Zipit.  The Zipit needs a serial converter because the outputs inside the Zipit don’t conform to the RS-232 voltage standards and they are unbuffered.  In other words, most RS-232 devices probably wouldn’t recognize them as they sit AND you could inject a voltage spike directly into the CPU if you decided to hot plug a device.  These serial transceivers have some level of resilience built into them that will protect against such spikes.  Some of the information I’m using in this project is coming from this page:

http://zipit2system.sourceforge.net/?page_id=82

I’m going to use a different chip than he does however.  I priced out the chip he spec’d and it was around $8.  Not sure why, there is nothing particularly special about it.  I chose a different chip for my project though.  I’m going with the Maxim MAX3221CAE in a ssop16 package which is ridiculously small and costs less than $2.  There are sixteen pins on the chip and it is roughly 6.3mm long.  This will be perfect because I am going to install my serial board inside the Zipit entirely.  Then I will use a 2.5mm jack to a DB9 cable or something similar to actually hook up to other devices.  The board I’m making will mount inside the lid behind the LCD screen.  Believe it or not, there is plenty of room back there.  My goal will be to make it so that no grinding or cutting is necessary but somewhere along the way I’ll need to drill a hole for the actual port anyways so no big deal either way.  I’d like to keep it looking as stock as possible.

Here is the schematic I designed(with help from James):

A flaw James pointed out with the other serial design is that the charge-pump capacitors were omitted.  This means that the output still may not have properly complied with the RS-232 spec with regard to voltage levels since those are part of the circuit that builds up the voltage.  I’m sure the other design works in most cases but it’s possible there are stubborn, older devices that could choke on it a bit.

Correction 6/25/2010: After looking at the datasheet for the Maxim 3223e, it appears to have internal charge-pump caps.  The chip is still much too large for my purposes but slightly easier to implement because it has fewer external components.

Anyhow, time to etch a board and see if it works.  Wish me luck.

Powered by WordPress. Theme: Motion by 85ideas.