I decided to use my renewed focus on the jffs to try and see if I could squeeze gmenu2x onto the stock zipit jffs along with gmu. (I've already fielded a few not so subtle hints from my co-worker that the linux command line is perhaps not the easiest way to use the zipit.) This wasn't gonna be easy though because gmenu2x is fairly bloated with C++, freetype, and lots of png files.
The first thing I did was to cut it back to a minimal installation with just the default skin, only one translation (french), and fewer icons and the smallest background image file I could find. See above. I also ran all the images through pngcrush for good measure. This resulted in a gmenu2x installation that was almost small enough for the jffs. Unfortunately it didn't quite work when run from the stock busybox shell. I had to build a tiny killall executable to enable my previous uclibc workaround from the iz2s build. Then I had to make sure to "exec gmenu2x" from my gmenu wrapper script or it would complain about various tty ailments whenever it finished running an app. Weirdness.
Next I attempted to link gmenu2x without libstdc++ according to these instructions. But gmenu2x uses STL strings, dynamic casts, and more from libstdc++ so the best I could do was skip exceptions and static link with libstdc++.a. The shared lib is about 800k stripped, and would would use about 300K compressed on the jffs, so I managed to squeeze a little bit out of it. I recently discovered the jffs seems to garbage collect on boot up, which means I may have a reliable way to compare the space usage. So I'll probably try to install the full lib someday to see exactly how much I saved. Actually, I suspect I'll hold off on that until I find another C++ program that I just gotta have...
I also tried static linking libfreetype, but that didn't save anything. A stripped libfreetype is 400K, or about 200K compressed on the jffs, so I bit the bullet and stuck it on there. This meant I could also toss in the dgclock program for only 20K if could trick it to use the same font as gmenu2x. So I moved the /mnt/ffs/gmenu2x/skins/Default/font.ttf file to /mnt/share/fonts/font.ttf and replaced it in it's original location with a soft link. Then I soft linked the mplus-2p-medium.ttf file used by dgclock to font.ttf and voila! The dgclock works. The gmenu2x font file is fairly compact but I can barely tell the difference in the dgclock program. It might have slightly narrower glyphs. Maybe it'll be good enough for a few more small SDL-ttf programs.
This fit onto the zipit, but just barely, so I swapped out the wpa-supplicant and wpa-passphrase for my cut down versions. The ones from the V1 firmware (and IZ2S) are fairly large, and the ancient wpa-supplicant was having troubles connecting reliably to WPA2 routers anyhow. The new smaller version actually seems to work better. This got me to about 700K free on the jffs. That's enough room for some more small goodies.
While working with dgclock, I noticed the zipit appeared to be stuck in a different timezone (somewhere in europe?) instead of EST5EDT. I'm not sure what caused it, but eventually I deleted the /mnt/ffs/TZ file and rebooted. The timezone setting script popped up. I entered EST5EDT, and it recovered. Then I realized I was off by an hour because the 2007 daylight savings rules weren't incorporated into the iz2s uclibc. Fortunately Dom pointed out the uclib TimeZone fix for the US 2007 daylight savings change in one of the comments here. Down at the bottom it mentions the magic EST5EDT,M3.2.0,M11.1.0 setting for the /mnt/ffs/TZ file. EST5EDT,M3.2.0,M11.1.0 is US Eastern Time with Daylight Savings Time starting on the 3rd month (March), 2nd week, day 0 (Sunday) and continuing until the 11th month (November), 1st week, day 0 (Sunday).
Here's a combo jffs image containing the base, gmu and gmenu2x packages to make it an easier install for newbs. Note: I said "easier", not "easy".
gmu-gmenu2x-jffs.tgz Here's the install instructions.
And apparently the Goodie Bag was offline for a while. Sorry. I think I'll try and mirror it...
Showing posts with label dgclock. Show all posts
Showing posts with label dgclock. Show all posts
Monday, March 12, 2012
Saturday, April 16, 2011
Another batch of stuff.
Have I mentioned my short attention span? The other day someone was talking up the netsurf broswer on the Zipit IRC channel and I thought, "Hey, that links browser is nice and all, but I'd really like something that renders the pages a bit cleaner." So off I went on a compiling binge, building all sorts of libs required for netsurf. It actually wasn't all that difficult to compile so I quickly loaded it up on the zipit and tried it out. Looks pretty, but needs a zoom out function because it requires lots and lots of scrolling to see the pages as rendered. And apparently you need a mouse to click on any of the links. Why would anyone create an embedded web browser that doesn't support mouseless browsing?
Now I don't really think a mouse should be required to use a GUI program on a tiny screen like the one on the zipit, but I'd run into this before when playing with some SDL programs. So I grabbed the z2mouse sources, added some key repeat code and built the fake mouse driver for IZ2S. Since they share some device nodes and kernel modules, I tossed it in with the ebindkeys stuff from last week.
Run setup-mouse.sh and then you can toggle the mouse emulation on and off with the Options key. If you also want ebindkeys you should run it before z2mouse, or you'll need to edit the ebindkeys config file to use event1 instead of event0. Because of this minor conflict, I set the Ctrl-Option key combo to terminate the z2mouse. I'm not sure I'm gonna keep that in though because it currently leaves a z2mouse zombie process. I also added an optional command line arg to z2mouse so you can set the key repeat rate for the mouse motion events. The default is 20 motion events per second, but if that's too slow for you you can bump it up a bit. Edit the z2mouse line in setup-mouse.sh and add a number for the event repeat rate, like "z2mouse 40" to double the default rate.
Now since freetype was among the libs I had to build for netsurf I decided to build the SDL_ttf lib and test that with the dgclock program in use on some other small gizmos. You can use it to set the clock when you're not on wifi, and thus without ntp.
I also built fbshot for screen captures and the sdl GUIlib okay program for testing the z2mouse. And meanwhile, I'm actually starting to consider building the framebuffer version of gtk and then maybe xdialog so I can play with pretty scripted GUIs on the Zipit.
testprogs-iz2s.zip
Oh yeah, before I forget... here's the source packages for dgclock and nightsky with the zipit keypad mods and the matching onscreen hint messages.
Subscribe to:
Posts (Atom)