Skip to content

Shiny happy hardware

For years I'm using Winterms as simple home "servers". It was a fun project to work on and some people were even nice enough to send me some examples of more powerful (relatively, we're talking about ~300MHz here at most) hardware. Two of them are still working as nameservers/printservers and one of them even hosted the Winterm hacking website for a while.

But they're getting old, slow, and pretty painful to upgrade. Time to move on I'm afraid. So before my last trip to the US, I ordered two shiny pieces of hardware: A Pandaboard and an Nvidia Tegra developer board. Due to circumstances, I didn't really expect both (or even either) of them to arrive - Nvidia seemed to send the board only to people who have projects they find interesting/important (stuff like the Motorola Xoom probably), and the Pandaboards never seem to be in stock.

Yet, here I am with both of them, wondering which one to actually use. :-)

http://fotos.gaast.net/stuff/20110423s_armboards.jpeg
Left: Pandaboard, right: Tegra2 250 Harmony board

I guess I'll just write down my findings here so far. I'll probably end up using both, one as a server and the other one to run stuff like xbmc on my TV.

Both boards seem quite similar, spec-wise. Two 1GHz ARM cores, 1G of RAM, USB, sound, networking (including WiFi and Bluetooth), HDMI output, and an SD card slot. The Pandaboard has an internal antenna, no clue about the range.

Although both boards' USB ports apparently aren't really meant for powering 2.5" USB HDDs, it seems to work quite well anyway. Which is good, because SD cards as root filesystems seems like a bad idea. Did you know that (according to bonnie++) a desktop hard disk from 2007 outperforms SD cards (at least in the Pandaboard and Tegra) not just on sequential reads, but also on seeks? So yeah, I may be using USB HDDs instead, which sadly means more power usage. :-( Especially in the Pandaboard SD performance is too bad to be usable.

One big advantage of the Pandaboard seems to be the community. A pretty busy (and generally helpful) IRC channel, lots of info online on Wikis. The Pandaboard iss "just another OMAP architecture" so lots of stuff that worked for BeagleBoard should work on the Panda with some customizations. Canonical/Ubuntu also support the thing officially.

Here comes the biggest contrast with the Tegra. Nvidia seems to be too busy with Android, the result is that there's little support for doing other stuff with the board. The only thing you get for now is L4T (Linux 4 Tegra), which is an Ubuntu Jaunty (yes, 9.04, that's two years ago by now..) image you can run on it. There are efforts on getting Lucid to run, don't know where those are ATM. But one complication there is some binary-only drivers/helpers (like nvrm_daemon, which I guess manages the memory shared between OS and video/etc), which means troubles getting X to work after an upgrade. Ouch.

The Panda also certainly wins in the bootloader department, as it just loads uboot stuff from a FAT partition on the SD card (tricky part here is that if you do anything wrong with the partitioning and formatting of this SD card, the boot process will just fail silently). For flashing the Tegra you need a proprietary fastboot flasher binary. Possibly, once booted, I can just write my kernels to NAND myself from inside the OS, but I haven't yet tried this.

So yes, with this all in mind, it's a delight to run a normal (and not outdated) Debian/Ubuntu install on a Pandaboard. Video is also supposed to work flawlessly almost out of the box on Ubuntu. However, I seem to be unlucky/doing it wrong since the framerate is not impressive, and playback seems buggy. (While the little video playback I've done on the Tegra was pretty good, super smooth, and with only 10% of CPU usage!)

For my original goal, running a simple home server, I feel that both boards are suitable - I'd just run Debian inside a chroot on the Tegra so the helper daemons (and maybe some video stuff) can run outside it. But before I get this video stuff to work, I have some work to do. And hopefully, if I wait for long enough, some other patient souls out there will also fix some of these problems...

BitlBee, alive and kicking

As quin in #bitlbee said a little while ago, I stole someone's mojo and found an amazing amount of productivity when it comes to writing code, and it feels great. I'm quit relieved that I can still find plenty of time and motivation to work on BitlBee even though during the week I already spend a lot of time at the keyboard. This after not working much on it for probably at least a year.

I managed to finally do the IRC core rewrite + abstraction that I intended to do for so long already. It'll allow adding non-IRC frontends to BitlBee if someone ever wants to, and also the IRC core has the flexibility it needs to add many more features that I wanted for years already, and were impossible to implement without adding even more horrible hacks.

There's also a libpurple-based backend for a few months already, plus file transfer support (written by Uli Meis and Marijn Kruisselbrink actually, it just took me a long time to merge the >3000-line diff, fortunately Review Board did make it a lot less painful), all thrown into a bleeding edge branch called killerbee. It's code that needs a little bit more work before I really like it.

Also, BitlBee has Twitter support for about two months already (thanks to hard work done by Geert Mulders), and according to the application registration page on Twitter it has almost 500 users already. It's quite likely that many of those used it for five minutes and went back to a client with more features, but it's still nice to see.

Last of all, to help with the current lack/fragmentation of online documentation there's now a BitlBee Wiki. Its supposed to have easy-to-find docs about common FAQs, but the easy-to-find part isn't really working out yet since it hardly shows up in any search results. Hopefully this hyperlink from a high-profile weblog will improve that a tiny bit. ;o) Possibly the content is not that good yet either, so if anyone has something to add to it, by all means, please do!

With a 1.2.8 release coming up, BitlBee is totally alive - and is for almost eight years already. It's been a fun project to work on so far, and hopefully will be for a long time.

Sending files using netcat

There are plenty of articles about this already, but I couldn't find anyone who wrote a script to automate this simple task of transferring files using just netcat.

CODE:
wilmer@ruby:~/src/bitlbee/devel$ ncsend.sh /audio/03\ Tree\ of\ Life.mp3 
nc 87.198.255.202 6886 | pv > 03\ Tree\ of\ Life.mp3


Run it and it will give you a command to run/copy-paste on the remote side/pass to the person who wants the file. It uses pv as a nice progress indicator, and the script assumes pv is available on both sending and receiving ends. But that's good, everyone should have pv installed on his/her machine.

I'd just include the code in this little article, but Serendipity would screw up the layout completely, so instead you can download it here.

spamass-milter and IPv6

While migrating my mailserver from Ubuntu Dapper to Debian Lenny, I noticed spamass-milter didn't want to start:

Could not parse "2001:770:017b::" as a network

After scratching my head on that for a while (it worked on the old box!) I remembered two years ago I spent some time adding IPv6 support to spamass-milter myself. Support as-in allowing IPv6 subnets to be whitelisted/auto-accepted. Very useful if you want mails from your local IPv6 machines to be accepted automatically without waiting for 10s while spamassasin is checking if you're not a spammer...

I never published the thing and now I could hardly find back the damn thing at all. :-)

http://wilmer.gaast.net/downloads/spamass-milter-ipv6.diff

Just to make sure I won't lose it again ... and maybe it'll be useful for someone else.

Also just de-Ubuntufied my laptop. Debian's doing great so far: Suspend and Resume actually work better out of the box, but fonts look a bit ugly (and sometimes really less readable I'm afraid) compared to Ubuntu...

Running 32-bit 3D apps on 64-bit Debian NVIDIA systems

Because Intel on-board video isn't quite good enough at 3D and my somewhat old laptop with built-in NVIDIA chip wasn't doing all that well at X-Plane either, I bought an NVIDIA GT240 card. Mostly because it seemed to be a good performer without doubling the power consumption of my PC. Stuff wasn't working all that well though and I got pretty frustrated:

QUOTE:
X Error of failed request: BadLength (poly request too large or internal Xlib length error)
Major opcode of failed request: 135 (GLX)
Minor opcode of failed request: 2 (X_GLXRenderLarge)
Serial number of failed request: 1468
Current serial number in output stream: 1483


was all X-Plane could tell me. Google Earth also didn't work and seemed more like Google Black hole to me. Both are 32-bit apps. A 64-bit binary of Flightgear did work. Sigh.

After some poking I noticed the nvidia-glx package replaces /usr/lib{64,}/libGL* with its own versions, but didn't touch /usr/lib32. A-ha!

The fix: Get a 32-bit version of nvidia-glx, extract it somewhere (dpkg -X) and copy all the files in its usr/lib to /usr/lib32, overwriting the libGL symlink that is currently there.

Or, hmm, as I just found out: apt-get install nvidia-glx-ia32. I'm glad someone thought of it already.

Now X-Plane works perfectly (with maybe even ten times the frame rate I had with Intel on-board) and Google Earth can show me my house again.

Just blogging this since so far a Google search for any part of the error above didn't give useful results.

Now, I just have to find out if I can get a TV signal out of this thing somehow, since my TV was made long before HDMI was invented. :-/

HAR2009

Hey, it's more than two months ago already, but it's just in time for my thoughts on HAR2009! I put pictures on-line a little while ago already, but nothing else so far.

It's a pretty neat event. It feels like a festival, but then completely stuffed with geeks. And talks instead of concerts. And also, fantastic decoration. Or maybe I should call it light pollution? Also, we had our own GSM network! Of course, we also had police on site, because you don't want to know what this hacker scum does in their spare time. From the stories I heard, the police had a pretty unexciting but pleasant time there though.

All in all it was fun, and I met a whole bunch of people, including some happy BitlBee users and contributors. Most interesting was perhaps that I met a roommate of a former Mountain View teammate of mine at the train station before the conference already. The geek world is pretty small, I guess.

Bunch of pictures (and updated blog software)

Sigh. If a PHP coder says "The complete upgrade path is automatted and can be performed with a single mouse click.", don't believe him. I just spent almost an hour on a Serendipity upgrade. Maybe it works well if you have a dumbass FTP CGI-exec webhost, but I miss the good old days without "user friendly" installer scripts, where installing a webapp was a matter of unpacking a tarball and feeding a database dump to MySQL. Stuff just worked without having to give the webserver write permissions pretty much everywhere.

But now, after the hackish s9y upgrade I lost the old theme, random plugins broke and I had to reinstall + reconfigure them (after resolving some more permission issues), and the best part must be that the upgrade script does absolutely no error checking. After tons of error messages it says "upgrade successful". Fortunately it's also dumb and didn't mark the upgrade as successful, so I could retry the upgrade after fixing permissions. One day I'll just figure out how to move all this stuff to Blogger. :-/

Anyway, I promised pictures. Lots of stuff is now on http://wilmer.gaast.net/fotos/. Don't have very fast hosting for it yet, but I'll work that out later. Hilights are the pictures of my first flight lesson, and also pictures of my cool model airplane. Bought it in April (after mostly trashing my Super Cub and leaving it behind in Beilen), and got some cool in-flight pictures. I also bought a 37g camera especially designed for attaching to these planes, so soon I'll be spying on people in the park and around here in Dublin. :-P

Some pretty hiking pictures from this year's Mountain View trip are also there: Big Sur (under Monterey), Rancho San Antonio (just under Mountain View/Sunnyvale). In other news, I'm flying to New York on the 24th. Not sure if I'll make any pictures there since probably everything there has been photographed to death already.

Getting a list of your Firefox tabs

Just a quick Perl hack I put together last night. This "oneliner" reads the sessionstore.js file and prints the URLs of all tabs you're currently looking at. I also noticed that the sessionstore contains lots of other useful information, including all session cookies. I'm quite sure that will come in handy some day. :-D I took a quick look for code that does this, and found people trying to put some complicated grep/regex together, but that seemed way too fragile to me. One person did it in JavaScript (which makes a lot of sense since the session store is encoded as a JavaScript data structure), and I decided to go that way as well except I'm using Perl's JavaScript module so it can still run on the command-line. :-)

CODE:
#!/usr/bin/perl

use JavaScript;

my $rt = JavaScript::Runtime->new();
my $cx = $rt->create_context();

$cx->bind_function(fetch => sub { print( $_[0] . "\n" ); });

$sess = `cat ~/.mozilla/firefox/*.default/sessionstore.js`;

$sessparser = <<EOF;
for( var win_ in sess['windows'] )
{
win = sess['windows'][win_];
for( var tab_ in win['tabs'] )
{
tab = win['tabs'][tab_];
fetch(tab['entries'][tab['index'] - 1]['url']);
}
}
EOF

$cx->eval('var sess = ' . $sess . ';' . $sessparser);


And yes, my code is indented, but my shitty blog software likes to break it.