Saturday, March 16, 2013

iz2jffs v5

Note, there's a bunch of releases here.  The most recent is down at the bottom.

It took a while, but I finally came to my senses and realized I was never gonna get around to everything on my todo list.  So I decided to patch together whatever good stuff I could find from the last 9 months and roll a new iz2jffs release.  It still looks a whole lot like like the v4 release, but there are actually quite a few changes under the hood.  Thanks to the new upx many of the executables are smaller, and quite a few have also been updated or improved in some small way.  I used up a little bit of the extra space so I could include dvtm and my sel file selector based "album" script for handy command line mp3 playing.  There's currently about 640K free on the jffs, which is plenty big enough to experiment with some more new goodies.
Here's a quick picture.  Hey look, is that 30GB free on the SD card?  Nice!  The 32GB class 10 Sandisk card I recently acquired seems to work just fine so far...

Here's my first try:

Heh.  That one didn't last very long.  I updated a few more programs for about 800K free:

And then I fixed the gmenu2x battery monitor, changed the input.conf file to include key bindings from slug's jffs, and made it a wee bit smaller so I now have 820K free:

And if anyone else actually tries it out, feedback can only make it better.  Based on Dronz's feedback I made yet another build with my forgotten LED fix, even more upxed executables, and a smaller (DejaVuSans) font file that I also found to be more readable.  The jffs now has over 900K free!

I replaced the useless gmenu2x touchscreen code with a semi functional wifi indicator and switched to the smaller Bepa-Roman.ttf font file for 920K free.
Uh oh.  I think I may have left out the font from that last one.  Yikes!  Hopefully I got it into this next one.  I also added an updated imgv viewer and patched the gmenu2x file explorer to let me select a directory with the spacebar and pass that to imgv.  Then I can quickly cycle through all the pictures in that directory with imgv using the n and p keys, or s for a slideshow.  And while I was working on the explorer code, I also removed the restriction that would only let you run programs with certain gp2x executable file extensions.  So now you can launch anything.  Be careful with that.

For the next build I made some overdue cosmetic changes.  I replaced the ugly SD card and Speaker icons on the bottom bar, and tweaked the wifi script so the wifi bars will show up right after you connect.  I also added slightly modified versions of Dronz's new alarm script and micro SD refresh app.  I'd still like to fix the Ctrl-c handler in the alarm app and figure out how to make it use the space-bar to quit in addition to the q key.
After testing the alarm script this overnight I decided to tinker with the display.  Now it's centered, with the current time up top where it's easy to find since that's what I want to check in the middle of the night.  I also figured out how to use the space and esc keys to quit.  Afterward I experimented with flipclock for the display.  It works, but I need to tweak it to display and possibly control the alarm setting.  Altogether it's not yet enough to warrent another release, but here's the current incarnation of the alarm script if you want to try it.
All the nice internet radio options got me wanting an easy way to change the volume without leaving gmenu2, so I finally decided to fix it up right for the zipit.  I replaced the broken volume and cpu speed settings with separate working headphone and speaker controls using the zipit volume buttons (ctrl-volume for the speaker).  I also replaced the start and select button images so the help messages almost match the zipit key bindings.  Check out the cute little zipit key in the Radio selector.  I added an AudioCheck selection that you can use to turn off the radio, or test the alarm beep volume.

I was on a bit of a roll there for a while, but all good things must come to an end.  I made a few more changes and then got distracted by the flipclock app and an SDL file manager program, so this next one may be it for a while.

I noticed the gmenu2x volume controls were starting up at -1, and all of the audio scripts contained "alsa started" tests.  So I decided to waste another second during startup and launch setup-alsa-sh from the Zcovery script.  I also added some commented out gmu and rockbox launchers in Zcovery to show how to tweak the jffs for a dedicated internet radio device that starts playing right away, or a car audio player that's easier to get going while you're behind the wheel.  I have one of each myself.

While I was in the Zcovery script I decided to pre-rotate all 4 of the consoles during startup.  This got me thinking about the mpg1234tty4 script and the way it works in gmenu2x.  The radio app launches mpg123 into a background process (on tty4) so I thought it might be better to use the gmenu2x dontleave option.  I tried it, and it came out looking much cleaner, but I noticed I could no longer change the channel.  It turned out the gmenu2x dontleave code had a bug that would add params (the new channel) to the end of the existing command line instead of starting over from scratch.  Thus mpg123 would always start up working on the first channel selected and not the new channel.  I fixed the bug and now the radio app is better than ever.

However rockbox and gmu were now more difficult to use because they use internal software volume controls and expect the main volume (or Headphone volume) to be set high.   So I edited their startup scripts to temporarily set the Headphone volume to 95% so they can maintain their own internal volume settings from session to session.  The scripts restore the gmenu2x headphone settings when the apps exit.
In addition, I made a few more cosmetic changes.  Dronz supplied the Black Gloss theme, and I read the mtpaint documentation on layers and transparency so I could clean up the button images I made earlier.  I also decided to reuse the old about icon for the new help app since it was a bit cleaner and they were quite similar otherwise.


Did I just say 5.8 would be the last one for a while?  Oops.   Apparently I was mistaken.  I was reviewing all the new help text when I suddenly remembered that gmenu2x has it's own set of help functions that might also have some utility.  So the first thing I did was pipe the mpg123 messages from the radio app through a tee and into a log file.  I hooked the log file up to the help info function on the radio app, so now I can check the recently played song list without ever leaving gmenu2x.   Since the help icon that appears on the bottom bar has an i (for info?) I added the i key to the input.conf file.  And while I was in there I also added the missing inc and dec keys so I can twiddle the color numbers in the skin settings dialog.
The next thing I tried to do was to hook up the rockbox help file to the rockbox app, but that file is html and all the tags made it nearly unreadable in the readme dialog.  So I patched gmenu2x to pass .html help files through a sed filter and strip out most of the html tags before opening up the readme dialog.  Hmm, maybe someday I'll replace the odd gmenu2x manual file support with some limited html support instead...

Anyhow, once that was working I attempted to use the full help.html file.  But that file uses latin15 character coding and gmenu2x only likes utf8, so I whipped up a simple on the fly converter and also fixed it to expand tab characters into  multiple spaces.  It's not perfect.  The html sed filter mangles the euro character (it looks ok in a .txt file).  The help text for the < and > keys also gets mangled by the html sed filter.  Plus the expanded tabs will never look quite right with a proportional space font (maybe I'll implement a pseudo fixed width font mode for the readme files).  But overall I'd say it's readable, and possibly even somewhat helpful.
I also replaced the clunky gmenu2x onscreen keyboard code with slug's patch supporting the real zipit keys, and then enhanced that with the pspmaps code for the Latin15 keymap.

I'll post the new stuff soon.  Gotta play with it a bit more and then wrap it all up.

Then maybe I'll start digging into links again.  I couldn't find the back button in text mode.  So I'd like to match up the text mode and graphics mode keys better, maybe pull in slug's zoom patch, and see if I can possibly replace the built in png font with ttf.


I made a few small changes to make sampling internet radio work better with the links browser.  Then I merged Dingux Commander into gmenu2x and decided it was enough of an enhancement to roll one more release.  You can read that story in a more recent post above.  Meanwhile, here's the goods.


Unfortunately the old manual install instructions are now obsolete, unless you can obtain the IZ2S 2.05 zip from the internet wayback machine.  However you can install this on a stock zipit the easy way with flashstock.

If you're looking to install this from a uboot zipit, or one with the openzipit kernel, check out the readme file in the flashback package for instructions.  You can find flashback in Dronz's stuff near the bottom of the goodie bag.


After some time away, I couldn't resist and made another release:



  1. Thankyou for all these goodies!
    My actual config with them is almost like your e5:
    -I did update the power utilities to your last july version, with middleled.
    -I gained a few KB more, with upx --lzma on more binaries, and founding a much lighter font for gmenu2x:

  2. I found an even lighter, readable, and more free :) font:
    You must edit gmenu2x/skins/Default/skin.conf
    fontSize=10 to have it nice.

  3. FontSize=10 looks way better. I didn't know that was so easy to change. The Bepa font looks pretty good at size 10. I'd need to rename "Applications" to "Apps" but I think that's a good idea anyways. However I really wish it wasn't a monospace font because it makes the help message on DGClock too bit to fit on screen. Is there a proportional spaced version of that font?

  4. Ok, I tried the proportional font. The file is a bit bigger but still saves about 10K over the DejaVuSans, mainly due to the missing hints or antialiasing. It looks ok in gmenu2x and DGClock, so I'll probably use it. But I see in the file the author now recommends DejaVu.

  5. Oh, I forgot imgv! We must add :
    params=-s+ [selFullPath] [selPath]* to imgv.gmenu
    to have slideshow, previous and next working.
    I forgot too to test tlinks keymap, I was far
    from understand that glinks and tlinks do not
    share the same keymap coding! The glinks keymap
    is now perfect, and it does not confuse with
    playing with links on a desktop pc.
    I have added a little sd card refresher script
    to display the additional progs, if any in sd,
    in gmenu:

  6. OOps...about imgv, forget it !

  7. Here is a better simple alarm clock for iz2jffs:

  8. I found, upxed, but not deeply tested
    ssterm from rkdavis archive:
    I tried to write a help, not complete,
    I will update it in the goodibag:

  9. That ssterm looks like it could be handy to use for work. I'm currently using jpnevulator from to monitor and log some MODBUS ASCII serial devices, so more tools are always welcome.

    I'll probably make another iz2jffs today. Because of all the radio options I decided to add both speaker and headphone volume controls to gmenu2x instead of the non-functioning cpu speed control.

  10. Everything works like a charm :D
    Here is a try of addz-progs with
    their gmenu thingies:

  11. I'm pretty happy with the jffs now, so i think I'll put the ADDz on my new 32GB micro SD card, along with some music (and maybe some video) and take it out for a spin.

  12. Thank you for all the great work on this. I wonder, can you post or recommend a good source for instructions on how to get started on a fresh Zipit? I am totally new at this and sorting through all of the sites, I am not sure how to get started. I want to be sure I can use all of the toys in your Goodie Bag!

  13. I installed the u-boot on my fresh Zipit and it works fine; it's this one; from Mozz. It boots into Linux and works well, however; internet is absolutely, in no way working. I tried 3 routers, 2 of them open, it does not want to connect. Any idea how to debug that? I'm getting a bit desperate as I spent already a lot of time trying out different distro's which brings me to my second issue; I have this with everything I try. I tried over 6 different 2gb micro and mini cards; all have the same issue. I have 10 Zipits (a friend of mine found them in their warehouse and sent them to me) and tried different ones; all have the same issue. It's a bit frustrating... Any ideas? :)

    1. And is there anyway to run iz2s (yours) without reflashing? Using u-boot?

    2. I think the wifi scripts for the flashstock distro are in /usr/local/bin. I'd try to manually do the individual steps on the command line to look for clues where the wifi is going wrong. And get on the #zipit IRC channel while you're doing that so you can put more eyes on the problem.

      The SD card problem is why I stick with IZ2S. There's currently no way to run IZ2S from uboot, but not long ago mozzwald made a 2.6.29 vintage kernel for uboot and that seemed to make the SD card problem better. That could be the basis for a uboot IZ2S, but I haven't followed up on it because I was hoping it would lead to a real SD fix.

      Ask mozzwald for it on IRC and see if it gets you past the mmcblk errors.

  14. Hi,
    I got a ZipIt Z2 with OpenZipIt and debian 5.0.
    How could I boot IZ2S? I created the MiniSD but with the OpenZipIt loader IZ2S doesnt seem to work. What do I need to boot IZ2S?
    (u-boot shouldnt be the solution?) Could my ZipIt reflashed to standard ZipIt Boot?

  15. It may be difficult to go back to IZ2S from OpenZipit. I know it can be done from uboot, so your best bet may be to figure out how to get to uboot first. Since I've only used IZ2S and uboot I can't really help you. However, if you can get on the #zipit IRC channel you might find the help you need.

  16. Thanks to iz2jffs, most of the proprietary material from
    the stock system has been removed. Here is a set of
    backup files based on iz2jffs-e5-10.

  17. Cool! Can that be used with with the latest flashstock to go back to iz2jffs from uboot?

    Is the flashback procedure documented anywhere besides the IRC logs? I don't see it here.

  18. Also, I believe only the kernel is replaced to go from stock to openzipit, blob and the original jffs are left alone. So to go directly back to stock from openzipit you should only need to replace the openzipit kernel with the mt2dblock from that file. I'm pretty sure that procedure is somewhere on the IRC logs. I'll try to dig it up.

  19. Hmm. This looks like it can get you to uboot from openzipit, and then restore back to iz2jffs from uboot with the restore files from

  20. I'm not sure of that, but it seems to me that the flasher rewrites all the flash with different partitions. In Mozzwald's Z2uflasher, is the script to flashback from uboot, and is the one to uboot from openzipit.
    So maybe a new script, hybrid of these two scripts can allow to flashback from openzipit ?

  21. Somehow the link to disappeared from my previous comment. It details the long way back to stock from openzipit by going to uboot first.

    The shortcut would be to just restore the kernel, but sometimes you first have to fix the dev/mtdblock files to be block device files instead of character devices

    # Fix kernel mtd to be a block device.
    rm /dev/mtdblock1
    mknod /dev/mdtblock1 b 31 1

    wc -c /dev/mtdblock1
    # Should say 2293760 or you're outta luck.

    # Grab the mtdblock1.bak from
    # and restore the stock kernel.
    # This should work. maybe.
    dd if=mdtblock1.bak of=/dev/mtdblock1

  22. If someone wants to try to flashback his Z2, I warn to NOT to do it from Z2lite nor wejp small system, this could lead to brick the Z2 !

  23. I took a look at the old autoflasher, and yes, logically your script should work. If I want to get rid of the proprietary files, be sure that my boot files are not corrupted, and have a fresh iz2jffs at reboot, can I do the same with mtdblock2 ? And must I do it before mtdblock1 ?

  24. I don't think the order matters. If you only do mtdblock1, I believe you should be able to boot IZ2S and load the jffs from it. If you dd both mtdblock1 and mtdblock2 (in whatever order) you should then have an iz2jffs system.

  25. Total success ! mtdblock1 and 2 were copied easily, and my openzipit flashed Z2 fastly booted on a fresh iz2jffs-e5 :D
    I must now actuate flashback-v1 with a resume of all this, and post it in the goodibag. Thanks, it seems that it was a popular demand.

    1. Apparently, to do a restore properly you should boot from an SD card because can sometimes fail if you try to run it when booted from the jffs on a uboot zipit. It can't properly overwrite the jffs part of the flash while you're running off it. If you do this by accident you can still boot into iz2s with only the blob bootloader and the stock kernel restored. From iz2s you should be able to install the iz2jffs jffs from the flashback zip file.

      # Fix the jffs mtd to be a block device.
      rm /dev/mtdblock2
      mknod /dev/mdtblock2 b 31 2

      # Grab the mtdblock2.bak from
      # and restore the jffs.
      dd if=mdtblock2.bak of=/dev/mtdblock2

    2. Today, I have finaly updated the readme file
      of in the goodibag.

    3. Ahh good. More info is always better. Here's another tip for zipits stuck in the infinite update loop.

      Some stock zipits may not run scripts off a miniSD card without calling home first via WiFi for a software update. The update servers are now gone, so it'll never finish. But you may be able to break out of the update loop. Try this:

      When the zipit asks to Setup WiFi try hitting the "home" button. That should get you to the main menu so you can do the reset. ie. about 5 presses of "next" and then "home" gets you to the menu, then Tools/Set Defaults and Restart to get it to boot off the SD.

      I haven't run into this yet myself, but I still have a few zipits still in the boxes so who knows...

  26. Hi deeice, I searched through you blog post and didn't find anything about your build enviroment for iz2jffs stuff. Do you have some cross compiler setup, buildroot config/snapshot or VM image you could share so one could build more stuff compatible with your iz2jffs set of dynamic libaries (uclibc, SDL, alsa,...). Thanks.

    I am thinking about building C64 and ZX spectrum emulator (vice for C64 as it runs fine on Dingoo A320, not sure about zx spectrum one yet, fuse probably)

  27. Google for "zipit z2 development v2" It was a 3MB debian VM image with scratchbox on it when I originally got it via bittorrent. That torrent may be dead now, but I think the Hungarian ftp site might still have a live copy. Mine is up over 10MB now. Is there any free site that'll host a 10MB VM image?

    Alternatively you can try to use the native IZ2S gcc I made. I think you can get it from the goodie bag, but the "Slow Learner" blog post where I wrote about it appears to have disappeared down the internet memory hole? Did censor me, or just lose it? I wonder...

  28. Oops. Did I say Megabytes? I meant Gigabytes. The soggy spots in my brain still remember when Mega was the big stuff.

  29. And speaking of soggy brains. I double checked the blog and it looks like *this* is the post where I actually got the native compiler working.

    Maybe I deleted the "Slow Learner" post myself because it was full of fail.

      The torrent is very slow, but still present !

    2. Nice. Once you have that, you can use the libs/include tarball from the try-try-again blog post (mentioned above) if you don't want to download and build all those packages yourself.

    3. Got the native compiler and libs/include tarball and will try on zipit or qemu. I guess I have the old Z2 development kit VM somewhere but will try to avoid it if I can :-) Thanks a lot.

  30. I hope it works out. I took a quick stab at vice and it seems doable. It segfaulted until I disabled the screen doubler and overrode the requested screen size for 320x240. Needs more work. I'd try to borrow the screen size stuff in the ifdef DINGOO blocks. GP2X is no good because it can (hardware?) rescale inside SDL.

    It'll probably need zipit specific keyboard code to handle the red alt keybindings, but maybe generic keyboard support will work good enough if you load the nonstick keymap in a wrapper script.

  31. would this userland work as a mobile media player with internet radio? Are the controls set to work like a mobile device? ex: play button plays, stop button stops, volume keys on side do their original actions. Thanks in advance.

    1. Yes and no. That's the original reason I got into this, and I have one permanently stationed in the car for rockbox and another by the bed for internet radio. However I ended up reserving the stop and play buttons for mouse emulation. I prefer the large space bar for play and pause. It's easier to access without having to look at the device. You could change this by modifying the keymap and/or the ebindkeys setup.

    2. Does it conserve power well? Is rockbox fully functional? To get to the ebindkeys setup, do i just enter that phrase in a terminal? is there an emulator I can use to test out the userland? Thanks in advance.

    3. Oh yeah, I looked in the old instructions for installing, and it mentioned extracting "gmu-gmenu2x-jffs.tgz" to the root of the SD card. Is that file the same as "iz2jffs-e5-10.tgz"?

    4. Correct, iz2jffs-e5-10.tgz is the current version of gmu-gmenu2x-jffs.tgz.

      I'd say rockbox is about 90% functional. The sound is good and a few of the plugin games work well enough. As you probably guessed, the power saving features of rockbox are not implemented, and the battery meter implementation is not as good as good as I'd like. I think you get about 2 hours of music on the battery. I don't really know for sure because I leave it plugged in most of the time. There are *some* power saving features built into the userland that help a little. For example, it'll turn off the screen when the lid is closed.

      You could try out the userland in qemu but the audio doesn't work so it's not much fun. My latest blog post mentions this, but I'm a bit delinquent providing the updated scripts that make it easy.

      Ebindkeys is mentioned a few times on the blog. I don't think I included it in the jffs image so you'll have to install it manually from the ebindkeys zip file in the goodie bag. More info here...

  32. First off, Iz2 has been the best z2 linux distro I have had the privilege to run so far. It has been the only distro I have been able to connect to a wireless network with. I havent even been able to connect to a wireless network while my z2 was stock. Although I am able to connect to an open network, I havent been able to connect to any wpa2 networks. Has anyone else had this issue? If so, how did you solve this problem? Has anyone been able to connect to any hidden networks? If so, how did you manage to get connected? Any input will be greatly appreciated. Even if it's just pointing to any resources that will enable one to figure out a solution to these issues themselves.

  33. You should be able to connect to a hidden network. If you know the SSID you can just type it in. There are also some wifi menu options to let you load an example config file and edit it by hand for odd situations. I'm not sure what would prevent wpa2 from working. It works for me, but you may want to look at the wifi config file and try to add or remove quotes around IDs and/or passwords.