Monday, February 20, 2012

Curses!

My plans for a cheesy SDL_ttf console font hack are now officially on the backburner.  Too many distractions.  I'll get back to it real soon though, I swear!

The #zipit IRC channel is abuzz with all sort of openwrt chatter.  It's too hard to ignore so I finally got off my butt, took inventory of my messy stack of Micro SD cards, and found one that worked well enough with uboot to load openwrt.  Actually the uboot that came with the flashstock rescue system seems much more robust with the SD cards than I remember.  Maybe it's fixed now.  I'll have to triple check that inventory and see how many, if any, SD cards still fail to boot.

Anyhow, the recent openwrt system from projectgus had a busted wifi setup, so mozzwald posted his test tarball with working wifi and a few extra goodies like gmenu2x and gmu.  It's quite shiny and seems to work pretty well, so I'm gonna have to play with it.  I'm just not sure what to do next.  My git foo is kinda week, so when I got confused trying to clone the code from the projectgus github I switched over to anarsouls instructions and finished the job based on that.  I hope the resulting odd mix of git clone archives is ok.  It's building right now on a slow USB drive hanging off my old PIII laptop, so it should be done cooking by sometime next week.  Then I'll try to build an openwrt version of rockbox and see how that goes.

So what did I accomplish last week?  Err, not much. 

I was a bit bothered that the smallest a static ncurses program will get down to is about 120K.  But the shared lib is over 400K, so I need to find at least 4 ncurses programs that I've just gotta have to make installing the shared lib worth it on the jffs.  A 120k static executable for ttyclock seems excessive.  So I went looking for a mini ncurses alternative to make a smaller clock.  There are actually quite a few out there.  I settled on mcurses because it came with a nice demo program and didn't need too much work to build the ttyclock.  I added a fake "immediate" (as in unbuffered) mode version of the windowed curses functions and it.  I shuffled the ttyclock code a teensy bit to make it work.  Then I added a bunch of patches to add some features and fix the date format bug, plus make it default to ISO 8601 dates instead of whatever weird euro-format it was stuck on.  The resulting executable is around 16K, which puts the static mcurses overhead at about 1/10th of the size you get with ncurses.  I'd call that a win.


Here it is in borderless ISO-date mode, preparing to replace the old standby clock radio.

ttyclock-mcurses.zip

I also finished off the 5x8 font and repackaged dvtm along with the rxvt terminfo files it seems to want.

The rest of the goodies will be posted real soon...

No comments:

Post a Comment