HunterDavis.com 4.0!

23Sep/09165

New Video – From Stock Z2 to Fully Flashed with Audio, Fluxbox, Mouse, Aliosa27′s Latest Userland

Here is a video Mark and I made of the complete flashing and installation process, and a tour of the new userland features.


For those following along at home, the required setup artifacts are below. You will need

  • Your zipit z2
  • A linux computer with an internet connection (to download the packages below) and gparted installed
  • A microSD card

Do you have everything ready? Let's get to it!

  1. Head over to http://sourceforge.net/projects/openzipit and downloaded the autoflasher
  2. Download Aliosa27's new kernel image and userland here
  3. Grab the latest mouse emu from here
  4. Using Gparted, Format your microSD to a fat16 partition (I did 300 megs but you really need much less than 100
  5. Extract the autoflasher to the fat16 partition
  6. (as root)Extract the kernel + userland image somewhere on your pc
  7. From the extracted files, copy out the ./boot/zImage-2.6.29 to the root of your microSD as kernel.bin
  8. Boot the Z2 and allow it to flash and reboot to the new Linux logo
  9. This will also make a copy of your original kernel and wifi firmware, copy them off the microSD somewhere safe
  10. Using Gparted, Format the microSD into 2 new partitions, ext2 (the majority of the card) and swap (the remaining 256 megs)
  11. Rename and copy the wifi firmware back to the Z2 as described here
Comments (165) Trackbacks (64)
  1. I am using Ubuntu Live CD right now, as I’m sure others have also used. I would highly doubt I’m the only person that is doing this on an Ubuntu Live CD. I cant figure out why it isnt working. I guess I will have to try a Gparted CD maybe.

  2. Maybe I am using Gparted wrong? Do I create a msdos partition table or something else? msdos is the default.

  3. Got Gparted to work on the latest Ubuntu LiveCD by reinstalling e2fsprogs and util-linux. I also reinstalled gparted. It worked the first try after reinstalling these.

    Now I am trying to figure out how to extract the kernel + userland image as root. Could someone explain how I would do this? I tried right clicking and using extract here and it gave me an error while extracting most of the files.

  4. actually I used a gparted live cd to do the partitioning and a ubuntu cd to copy the files over.
    make sure you run the file browser as root or when you try and copy the files it will fail.

  5. Ok anyone intrested I have posted a quick and Dirty Faq over at sourceforge. hopefully people will find this useful.

    http://sourceforge.net/projects/openzipit/forums/forum/917462/topic/34170611

  6. Hey StraySoul,

    Open a terminal, then enter ‘sudo nautilus’. That’ll open up a file browser as root.

  7. I was able to extract the files by using ‘sudo nautilus’ but I haven’t been able to copy over the Wifi firmware because it says I do not have permission. I typed in sudo nautilus and then I copied the Wifi firmware and mouse file to the file manager window. I then tried transferring it from there to the memory card but it doesn’t let me. I assume its because I am new to Linux and am not doing it right.

  8. Sounds like it. Do this, from a terminal do “sudo nautilus & ” then do another “sudo nautilus” this should get you 2 windows that you know are both run as root. Good luck!

  9. Thank you, thank worked great! Now I just need to learn what I can do with this. I am a complete Linux n00b as you can tell. I don’t even know how to go about setting my WEP password and then testing the Wifi. Is there an easy way to do this? Sorry for so many questions.

  10. Ya there’s a howto posted up on the SF wiki just recently that should help you, that and the previous answers in the comments thread. Good Luck.

  11. Can you please link me? I can’t find it. Thank you.

  12. Douglas Henke posted (below) on the next video comment thread

    mcavity: I have an 8GB SDHC card (actually a microSD in a micro-to-mini adapter) in mine. Works great.

    Jim SP: I’m using a WPA2 network, thus:

    1) In /etc/wpa_supplicant.conf, I have something like:

    network={
    ssid=”MySSID”
    scan_ssid=1
    key_mgmt=WPA-PSK
    psk=”My very secret passphrase goes here.”
    }

    (IMPORTANT: I have commented out the eapol_version and ap_scan lines from the original wpa_supplicant.conf.)

    2) Run the supplicant:
    wpa_supplicant -Dwext -ieth0 -c/etc/wpa_supplicant.conf
    You should see some messages saying it associated. Suspend it with ^Z then background it with “bg”. (The control key is the one up and left of ALT, with the elipsis in white and the [X] in red.)

    3) Run the DHCP client:
    udhcpc

    That should get you a DHCP lease; for me, the default route and DNS settings worked out of the box.

  13. I edited the file with my WEP password and SSID. For part 2, should I boot, type root, then startx, and then run xterm? That’s what I tried to do, but I cannot enter numbers and symbols, it comes up with foreign language chracters. In the screen where you type in root I can type in numbers. I dont understand why it isnt working?

  14. See the next thread where people discuss this issue. Basically you can update to the newest mouseemu and it’ll resolve this issue, or force-load the keymap as discussed.

  15. I am using the z2mouseemu file that says it was modified on the 30th. Is this the newest one? Is the newest one called something else?

  16. The 30th of September?

  17. I am using z2mouseemu from http://aliosa27.net/projects/zipit2/ it says it was modified on September 29th actually. Is this the wrong one? Do I use one of the other ones and change the name to z2mouseemu? What next thread is it discussed in? The Hulu one?

  18. $50 bricklett + questions

    My $50 zipit from target arrived today; I followed instructions (plug in, press green button) and nada; I figured power supply was bad and voltmeter sez 17.5v (casing sez 5v). I can return for refund at any target so no out of pocket.

    Target and amazon both say backordered 2 to 4 weeks.

    Anyone else get a DOA unit?

    Anyone else checked PS voltage?

    Any place I can order another w/o 4 week wait?

    Than

  19. I got the z2mouse-remap file and renamed it to z2mouseemu and replaced the old z2mouseemu file. It doesn’t work as far as I can tell. I tried holding in the smiley face button and using the directional pad and nothing happens. I then tried putting back the original z2mouseemu file and it still won’t work. It used to work with the old file and now it doesn’t. I don’t understand why it would stop working? Could the memory card have gotten corrupted already?

  20. Hey Than,

    I haven’t gotten a bad unit yet, but as with all electronics that’s bound to happen sometime. It definitely does not use 17.5v (consider there’s a mod to run it off a usb plug). If there’s a local target you may try finding one on clearance, otherwise you may be waiting 4 weeks.. That or ebay. Good Luck!

  21. I still can’t get the new mouse files to work. I have been trying to get them to work for 4 hours. I tried both editing the startx to show the new name of the file, as well as renaming the file to z2mouseemu and then placing it in the bin directory. I also formatted and repartitioned the memory card 3 times. Neither is working for me. Maybe I do not know how to use the new mouse file? I had an older version that used the smiley button and you had to hold that in to use it. Has something been changed again and maybe it is working but I’m just not using it right? Please help me. Thank you.

  22. I ended up switching over to Debian and the mouse and keyboard works fine. Thank you for all your help Hunter!

    Is setting up the Wifi in Debian the same? I set mine up with iwconfig, but it only works temporarily then it stops working and I have to reboot and retype in the SSID and password.

    Is there a config file I can edit so that it works in Fluxbox?

  23. bobsandefur,
    My powersupply is rated at 5v, multimeter says 4.85v so it looks like a bad power supply toasted your zipit.

    StraySoul,
    when copying over executable files to the card, make sure the files have the needed permission to run. Otherwise it’ll give a permissions error that you can’t see since it’s a console message given after X is loaded. This is easily fixed by running
    chmod 777 “program”
    Just make sure you put the proper path so that it can find the file.

    I’m using z2mouse-option on all my cards because I like the toggle and the option key seems to be unreadable in the OE image, I try to keep my interface on the Debian and OE images as similar as possible.

  24. Anyone willing to help me out trying to do this from OS X?

    I got it flashed ok, but I can’t seem to get the ext2 image to boot. I honestly don’t know what I’m missing, as I did it all sudo’d. Is it more complicated than copying the tarball over and untaring it as root?

    I also tried form my vista machine using the Debian.gz img, but that failed because I’m using an 8g card and the phsydiskwrite kept saying there was a 2G limit. It seemed to offer to override the 2g limit, but then it would die immediately if I did.

  25. Oh I forgot to mention, it might be a clue, I got this message for everything in /dev:

    tar: ./dev/mem: Cannot mknod: Invalid argument
    tar: ./dev/mmcblk0p5: Cannot mknod: Invalid argument
    tar: ./dev/tty5: Cannot mknod: Invalid argument
    tar: ./dev/hda15: Cannot mknod: Invalid argument

    Am I just going to have to download a linux image?

  26. Hey Matt,

    Don’t have any osx machines handy, but I’ll help if I can. Those tar extraction errors happened to me once I believe I was extracting not as root. If you are on osx, you may have the dd utility installed, or can install it with darwinports. With that you can just dd the debian image to the sd card.

    Good Luck!

  27. Thanks Hunter,

    I’m pretty sure I did it as root. The sudo’d commands were still in my buffer when I read your post.

    I hadn’t thought of using dd for the .img, but when I try I get “operation not supported” (I think that’s the right phrasing). Maybe drivers?

    I’m away from it now, but I’m gonna try a few more things.

  28. Okay I figured out why I got the “operation not supported” message. When I inserted my sd adapter it would mount the partitions that were there, then when I unmounted them it would also disconnect the sd adapter from the USB bus.

    I had to umount -f the slices that were already on it (from previous attempts), which left the /dev/disk1 item.

    After that I did the dd:

    root# dd if=debianZ2.img of=/dev/disk1 bs=64k

    I changed the block size to make it go faster. It was crawling without it. Now I boot into Debian. Thanks a ton Hunter.

    Now to get Nethack on this thing.

  29. Well-I returned the dead unit to target for a refund (minus shipping) and ordered another one direct from wireless. This one booted okay. I followed the instructions formatting the install disk is fat 16. The flash apparently went okay. So I pulled the microSD, copied off all files to a CYA directory, formatted SD card as 3.6 GB of ext at about 300 M of swap, put the card back and powered it up. I get the openzipit logo and and upper left cusor flashing for about 5 sec and then solid cusor. I could no turn it off so I pulled the battery. Not if boots to cursor only if plugged in, If I unplug it in turns off and won’t boot until I plug it in .

    Any ideas – should I try a reflash?

    Thanx

    Bob

  30. Hey Bob,

    If you can see the openzipit logo, your flash went ok. Which image did you extract to the ext partition?

  31. nada-I just formated it. I thought I didn.t need the wifi from step 11. did I need to copy stuff after format in step 10?

    also video sez fat32 and I did fat16 on flash step

  32. Hey Bob,

    Yep. Copy over (as root) the userland image to the SD card and extract it For flashing, I think you can use either.

  33. Hi,

    Thanks for the post!

    Have the zipit up and running in X.

    Question on how to get the following to work:

    1.) Entering alt values… looks like when I hit “Alt+’some key’” it does not enter the correct (alt) value in the xterm. What’s the ‘trick’ here.

    2.) Where is the ‘Tab’ key located?

    3.) Is configuring the wireless connection accomplished using the command iwconfig eth0 essid ‘my_ssid’ ? (can not try it, b/c I’m having a tough time figuring out the numeric entries.

    Thanks again,
    Mike

  34. Hey Mike,

    You’ll need a new keymap for all the alt modifier keys to work properly in X. Just download the keymap linked in the comments, and use xmodmap to load it up in your startx script. The square zipit logo is the tab key. Yes, iwconfig is how we’ve been setting it up, though I believe there was a script in the threads for ease of use. Glad you got it working :)

  35. Hi,

    Thanks for the reply. I don’t think xmodmap is installed, though.

    The startx script has loadkeys and xmodmap commented out by default.

    Hmmmm…. what to do? :-)

    Mike

  36. Hey Mike,

    xmodmap should be installed…. if not, and since you’ve already got the OE distribution working, perhaps you should try the debian root image? It comes for sure with xmodmap installed, and you no longer need to cross-compile software. Plus, lots of people have had issues with it and we’ve worked through them, so there’s lots of good information on the comments threads of my next couple posts. Lots of good info on the sourceforge discussion page too. Good Luck!

  37. Hello, I believe I flashed my Zipit correctly, but when I remove the SD card and reboot, the zipit freezes at the OpenZipit loading screen. Anything I can do?

  38. Hey Mark,

    Yes, it is waiting to load the linux filesystem. At this point, you need to flash the userland image to the SD card as described then use that to boot up the Z2. GL

  39. hi hunter,

    I need some direction here. I have gone through the posted steps to flash the zipit but when it comes time to reboot and (hopefully) flash the new kernel, nothing happens and instead it boots to it’s default state. Here’s a few specific facts:

    > When I received the zipit it had already been updated via the zipit site. I do not know if this also implies it no longer has the “original” kernel or not. It is now stating it has “software ver 1.13″. Is this update from zipit responsible for disallowing the autoflasher to do its thing? If this is the issue what to do next?

    > I am using a 4GB SDHC card. I was successful in partitioning it with a 300 MB FAT16 partition. The zipit says it sees the full card fine from its default state. The remainder of the card is unformatted (need it be?).

    > If the ONLY way to flash at this point is via the hardware serial port I guess I will, but I sure would like to take the software path if possible.

    all suggestions are welcome.

    thanks, corner5

  40. Hey Corner5,

    Updating the Zipit to the newest version won’t prevent you from flashing linux. Sounds like an issue with the the SD card you’re using. Either:

    1. read-only permissions on files (bad)
    2. missing the install script on sd root (bad)
    3. sd charge activation time is long (common)

    1 and 2 are easy to check and fix. If it’s 3 (which is common), I’d go into the stock Z2 menu and select a “reset to default”, this will cause the Z2 to soft reboot. Doing this a couple of times should hopefully get the SD card active and readable by the time the Z2 loader looks for the flash script. Good Luck!

  41. Hi again Hunter,

    Thanks for the above clues. I did have the install script there, but it was nested withing a directory (not at root). Simple fix.

    I now have gotten to putting the 1GB debian .img on the card, and successfully booting and getting X going. BUT, I have no mouse.
    Details:
    > The mouse/X feature was working with the original flash kernel step.
    > After putting on the 1GB debian image (I could not find the 2GB version), I placed “z2mouse-latest” in the bin dir. Variations of this was to try re-naming it to “z2mouseemu” (which I also tried initially). I’m not clear if renaming is required. I have done this as root.
    > I have tried not to needlessly bug you, so I have been reading the various entries, but so far I have not seen a solution offered. What to do next??
    > I also noted it takes quite a while to open X, is this normal?

    Anyhow, I know I am close. Once the mouse is up, I will move on to wifi. Is there somewhere (your site or other) to be plugged into the latest files and howto? Is this 1GB.img still the way to start off? It’s not too late for me to start over if needed.

    thanks! corner5

  42. Hi corner5,

    There are a few sites that pop up with Z2 info from time to time, but nothing lasting. I always recommend re-posting to the SF wiki/forum so we’ll have it forever.

    On the mouse, there could be a couple of culprits. I’d check that the /bin/z2mouseemu has read/execute permissions set. I’d also check that your /usr/bin/startx script is starting the right mouse emulator. Also, I’d double-check to see if any mouse emulator processes are running in X (ps -ef from terminal). You may need to hit smiley face to toggle between mouse emu and number keys.

    Hope that’s helpful, good luck

  43. ok Hunter, progress!

    I did get the mouse working. In the end I wiped the partition, added Aliosa27′s “Debian-Z2.tgz” file. I don’t know if this is the most recent, but it did allow the mouse to work. Yes I did need to use the happy-face to toggle. I did find it interesting that the mouse movement is OFF by default (is this correct?).

    question: When I replaced the bundled “z2mouseemu” with “z2mouse-latest” (renaming it and checking permissions) it would not work. So I went back to the bundled version. Did I miss something? Should I even care?

    OK, now on to wifi…

    For at home:
    I am currently running WPA2 Personal with a key. I next need to know where and how to enter the SSID and key into the zipit. I know this has been discussed here before, so if the answer is more complex than a short reply can you please point me to the howto? Can this be done from within X? I’m guessing I need to edit a script.
    For traveling:
    When I do visit an open entry point (e.g. coffee shop), what’s the best way to hop on?

    When wifi is up, I’m off to update packages (I think I may need help here too).

    I *really* appreciate your hand holding with all this. Along with making a very cool micro-machine this is a great way for a beginner to learn linux. I’m having a blast.

    thanks! corner5.

  44. Hey corner5,

    Yah the mouse movement is off by default. Not sure why your downloaded version wasn’t working, could be a permissions issue but if you’ve got a working version I wouldn’t sweat it.

    For wifi, there are a few ways to do it. For encryption (which i don’t use), there should be some good guides and examples in the comments above and on the other Z2 articles on this site, as well as the other knockoff sites that pop up.

    For just connecting to an unencrypted wifi hotspot on the Z2, I just use the standard linux cli tools. iwlist to list networks, iwconfig -essid essidname to connect, and dhclient to get an ip address and set your gateway.

    When wifi is up, you can update package lists with apt-get update.

    You can update packages to new versions with apt-get upgrade

    You can install new programs with apt-get install programname

    Glad to hear that you’re liking linux, it only gets better from here. Good luck.

  45. Hi Hunter,

    Great work all round, your zipit work definitely attracted me to the device. (If only you could get some commission)

    Am thinking about putting Debian on my z2.
    However have read some reports that this does not work if the z2 is not stock (ie: has been used in it’s native mode so to speak, so the firmware has been updated, I believe).
    Is this so?
    And if so, is there anyway to either flash it in the updated state, or return it to its stock condition and then flash Debian?

    Kindest regards

    James

  46. Hi James,

    I have not tried this myself, but I have heard reports that you can flash the zipit no matter what firmware version you are running. Hopefully it’ll work for you too, good luck!

  47. Hi, I followed your (excellent!) directions to flash my zipit z2, But it looks like something went awry somewhere.
    I flashed it successfully(?) and unpacked the filesystem onto the sd card. Now my zipit will boot to the Open Zipit logo but doesn’t seem to do anything else. The flashing lights you mentioned in your video are not flashing on the zipit and it’s been over an hour and still nothing but the logo. By the way I’m using a microsd card inside a microsd adapter. I read elsewhere that that should still work but now I’m not sure

    Any help you can give is greatly appreciated even if someone can just point me in the right direction.

  48. Hey John,

    This has been asked earlier on in this and another comments thread. When you unpacked the filesystem to the SD card, did you use DD or psydiskwrite? If you were on linux, did you do it as root? Was the SD card mounted at the time? These are things to look into. Hope it helps, good luck!

  49. I’m using a Ubuntu livecd. I didn’t use dd at all I just extracted the userland image onto the card as root. I’m not sure if it was mounted or not. Which should it be?

    Thank you for replying so quickly

  50. hey John,

    If this is the debian userland, yeah that’s your problem. It needs to be unmounted, then you use DD to write the disk image to the SD card.


Leave a comment