A few days ago someone on the zipit IRC channel expressed some dissatisfaction with the default IRC and web browser apps on slug's gmenu2x jffs. "The web browser that was loaded on the sd image version BLOWS same with the IRC chat client". Some pretty harsh critisism that, but fairly accurate. The retawq browser and the pmirc script are the absolute smallest apps available that still provide enough functionality to get by in a pinch. But now slug has pruned the jffs and put out an RC12 release with well over a megabyte of free space. That's plenty of room to hold some fancier options.
On my iz2jffs system I use tinyirc. It compiles to under 20K and provides better command line separation and editing than the pmirc script. I added some optional timestamps to the code, but that's about it. I wish it had a scrollback buffer option, but that'd be a fairly large patch job, so it's probably never gonna happen. Armed with the native compiler on my openwrt zipit, I built a tinyirc executable and the somewhat larger Rhapsody IRC client with it's ncurses GUI. I also compiled in the frequency (fz) client which looks like tinyirc, except with more colors and a working scrollback buffer. See below.
On my zipit I simply renamed tinyirc to irc and used that to replace the existing /usr/local/sbin/irc executable. That way I didn't even have to mess with any gmenu2x icons or settings. I can be pretty lazy sometimes.
Not so long ago I updated the patches for the openwrt zipit build of the links browser to include most of my fixes from IZ2S. But I left the rather large built in font alone, vowing to get back to that someday. That day is today. I fetched the various pruned font_include.c files from the IZ2S sources did some test builds with the ASCII only font set to see how small I could go. First I added --without-tiff and --without-bz2 to the build options. The results were encouraging but the executable still required some large openssl shared libs which aren't on slug's jffs. So I tweaked the makefile to link in the static ssl libs and upxed the executable down to around 1.2 megabytes. (I did some testing and large executables do seem to use less space on the jffs when upxed first). You should be able to squeeze this onto the jffs if you really, really want it. Just remove the retawq executable first. You can probably also move libfreetype and libSDL_ttf from /usr/lib on the jffs to somewhere on the SD card to save even more space. I don't think there's anything on the jffs that actually uses truetype fonts. It should look something like this.
Now I don't actually plan on doing all that much online shopping with the zipit so I decided to do another links build with the --without-ssl setting. This one weighs in at just under 800K, which leaves room for other options. Nice! That's the one that's going into the jffs on my zipit (after removing retawq of course). I'll try to do two more links builds soon with the slightly larger latin1 font_include.c file and see how that goes.
As I put the pimped up RC12 jffs to work I quickly found some more changes I wanted to make. First I grabbed slugs updated gmenu2x executable so I could multitask on the extra virtual terminal without worrying about having the screen spammed with graphics from the other tty. Then I loaded the simpler rexima mixer program so I can tweak the headphone or speaker settings while gmu is running on the other tty. Rexima also squishes up really tiny if you want to use a screen multiplexer. See all the empty screen real estate?
It gets even smaller if you split the screen vertically, as you can see in this screenshot from IZ2S. In fact, if your terminal multiplexer can go that small, you should be able to access all of the controls on a single line 13 character window.
By the way, I did see on the other tty that GMU does indeed use 70% of the cpu, probably due to the SDL audio buffering. Gotta fix that like rockbox someday. I also finally got around to adjusting the timezone setting on the jffs and copied over my gmu internet radio playlist and my browser home page with the shoutcast and other internet radio search sites.
Things were looking pretty good, but I really wanted to see if I could do anything about the default gmenu2x background image. I figured with a little work I could free up most of the 70K used by that and still have something visually appealing. The current build of gmenu2x has been pruned to use only png files, which makes this trickier than it otherwise would be. However it turns out png supports color mapped images in addition to full RGB. So I went internet searching for some shiny images with a mostly blue pallet that appealed to me. I reduced these to 320x240 and saved them as png files using mtpaint on my puppy linux netbook. Then I converted them from full color to indexed, experimenting with 256, 16, and even 8 colors along with various resampling algorithms until I got a decent image with a file size I could live with. Pngcrush provides the finishing touch.
The jffs still has over 340 megabytes free, but I'm pretty happy with it as it provides a realy decent fallback system for whenever my SD card eventually fails. And it probably will fail someday because I've been beating on it pretty hard lately with the native compiler. There was some additional whining on IRC about the nightly openwrt builds breaking things, like bard, quake, and supertux. Bard is busted because the openwrt version of flite overrules the zipit build in the packages. We fixed this before, but it happened again. My old packages are probably still around, and I did some new flite builds recently to test the delux voices to see if they could do realtime tts for bard at higher cpu freq settings. They cannot, but you can still use them to pre-convert a text book to audio and play it in GMU later.
Supertux can be made to work if you update your libstdcpp package to the latest version in the nightly build ipk repository, The new one is actually a few K bytes smaller anyhow. I'm not sure what was wrong with quake. I didn't actually try the ipk, but my test build seems work well enough so far as I can tell.
Goodies:
tinyirc-wrt.tgz
rhapsody-irc-wrt.tgz
fz-irc.tgz
links-ascii-nossl
links-ascii-ssl
links-config
gmenu2x with fix
rexima-wrt.tgz
sdlquake_0.1.1_pxa.ipk
sdlquake-shareware-data_1.0.6-1_pxa.ipk
I also created some latin1 links builds that might fit on the openwrt jffs.
links.latin.nossl.upx
links.latin.ssl.upx
And apparently despite documenting the links font reduction process a long time ago, I've never actually posted any of the modified links font-include.c files. So I think it's time to remedy that. However, rather than zip them up here, I've placed the font files on the openwrt zipit github instead.
No comments:
Post a Comment