Monday, November 26, 2012

Junk in the Trunk

It's getting near time to roll out another release of the iz2jffs.  Over the past 6 months or so I've put together a handful of small incremental improvements, that taken together, add up to a significantly better system.  Well, I like it better anyhow.

However before I get to that, I think I need to clean out the attic, so to speak.  I've got a bit of a backlog of minor goodies that never quite seemed worthy of a full blog post.  Some are hardly even worth a mention, but I need to push them out to clear my conscience.  It may take a few days to find them all and clean them up, so I'll start this out as something of a todo list and flesh it out as I go.

Most of this stuff runs on IZ2S (or iz2jffs if you can fit it).


There's the 10K imgv image viewer, and the larger zgv image viewer (already blogged).

I have a new IZ2S build of the rexima mixer that scales down better for use with a screen multiplexer.  (I might try to squeeze dvtm onto the jffs).

rexima-resize-iz2s.tgz

I built the 70K Frequency (fz) IRC client for IZ2S so I could have a scrollback buffer.

fz-irc-iz2s.zip

But then I figured out how to fix the keymap file to use the scrollback buffer already built into the fbcon console.  This puts the scrollback on the shifted volume keys:

    shift keycode 74 = Scroll_Backward
    shift keycode 78 = Scroll_Forward

I wanted a smaller dialog program for the jffs so I built a 70k lxdialog.

lxdialog-iz2s.zip

But I needed more options so I configured a lite 100K dialog executable instead.

dialog-iz2s-slim.zip

Then I built a smaller libncurses.so using the configure options from openwrt.  I recompiled dialog (again) to 40k, and dvtm to 22K, with both using ncurses as a shared lib.  This should fit about the same space on the jffs as the old dialog executable.   Now I need to find some more tiny ncurses programs to really make the shared ncurses lib worth it.

dvtm-dialog-curses-jffs.tgz

I've got some settings for the links browser for sampling internet radio with mpg123 that I blogged about a while back.   So I built a lite 50K mpg123 for use on the iz2jffs.  It uses the same libmpg123 shared lib as gmu to save space.

mpg123-iz2jffs-shared

There's a new version of bc, but I already blogged that one.  However I built sdlcalc before I figured out how to fix bc.

sdlcalc-iz2s.zip

I'm working on the nanoglk interactive fiction viewer.  Here's a screenshot.


I  still need to work out the font settings, which should fix the status line and make it readable.  I compiled a 10K SDL ttf font viewer program (sfontview) from puppy linux to help me with this.  I suppose it could fit on the jffs if you wanted to put it there.

sfontview-iz2s.zip

Here's another screenshot of nanoglk using the liberation fonts that I already had on my openwrt zipit.  Except for the status line, I like the DejaVu font much better, so this still needs a little work.  I probably have to bite the bullet and install the whole list of DejaVu fonts from the openwrt zipit package repository.


Here are some test builds of nanoglk.  Turns out my IZ2S zipit had a pile of DejaVu fonts in the /mnt/sd0/share/fonts/dejavu directory (probably installed there when I was testing netsurf, and/or fltk) so I went with that for the IZ2S build.

nanoglk-zipit-wrt-liberation-fonts.tgz
nanoglk-iz2s.zip

I feel really guilty about withholding the bunjallo browser executable, but its still more of a proof of concept than even a work in progress.  

I need to stash the openwrt Makefile for pspmaps somewhere, and maybe post the openwrt pspmaps package if I haven't done that already.  Hmm, looks like mozzwald already made a pspmaps package on github so I added the missing sdl_gtk lib to the DEPENDS line in that Makefile to get it compiling again in the nightly builds.  Unfortunately the nightly builds appear to have stopped sometime mid-November.  I'll have to try and get them started again.

And I gotta put the IZ2S sources for the naim chat client somewhere safe as well.

naim-src-iz2s.tgz

Last but not least, there's an IZ2S port of slug's gmenu2x that I posted a screenshot of a while back and then forgot to finish.  I'm still hoping it'll save me a little bit of disk space on the jffs once I get an  executable package finalized.


Heh, I couldn't even get a single goodie posted before I got distracted by the movgrab youtube downloader.  It integrates reasonably well with the openwrt links browser and mozzwald's youtube search portal.  For now, the details are in the zipit IRC logs.  I have not yet tested the IZ2S version.

movgrab-wrt-176x144.tgz
movgrab-iz2s.zip

Oh, and I almost forgot to mention the linenoise library.  I'd like to investigate the various incarnations of this tiny readline replacement lib.  I suspect it'll make for a nice, but still tiny, improvement to the interactive mode of picoc and a much smaller interactive build of bc, with linenoise instead of the rather large readline lib.

And another thing I almost forgot.  I compiled a full build of the flite text to speech program just in case anyone wants to use the nicer voices, even though they're too slow for the real-time conversion required for bard.  The first tarball is the full executable, with all the voices together.  It's pretty big.  The other tarball contains everything else from the build, including all the individual executables for the voices.

flitetest.tgz
flitebin.tgz

Saturday, November 10, 2012

Pimp my JFFS


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.