the perfect mini-itx multimedia motherboard

I’ve been having trouble sleeping the past couple of nights, and last night was no different. I woke up at about 3 a.m. and couldn’t fall back asleep, so I decided to do some research for my ultimate mythfrontend box I’d like to buy some day. My biggest sticking point up until now was that it seems like DVI out on the motherboards was a real rarity. On top of that, the graphics chipsets are always VIA, which while the Openchrome stuff works great, using their hardware still wouldn’t be my first choice. Well, the enlightening thing in this morning’s research was that VIA isn’t the only one making boards (they were pretty much the only ones I was ever looking at). In fact, AMD and Intel both have their own. I found out most of this at the Logic Supply website … one I’d seen before, but never really investigated until now. They have a ton of options, products and setups … and I found just what I’m looking for. :)

Lo and behold, here’s the one I decided on after looking around: the AOpen i945GMt-FSA. Here’s where it makes the grade for me.

First of all, and most importantly, it uses an Intel chipset, including for the onboard video card which is an Intel 945GM. The Xorg wiki confirms that this works with the i810 graphics driver that is already available, and it’s the one that is being actively developed upstream by Intel themselves. This is the ideal chipset to get — no more binary blob madness. On top of that, the main video output for the motherboard is DVI. Since I’m going to be connecting this to an HDTV, having a DVI to HDMI connection is the smoothest and simplest way to go, and delivers the best picture compared to Component or S-Video inputs (I’ve been meaning to take screenshot comparisions some day). Before I knew this was even an option, I was struggling to find a motherboard and case combination that had a PCI riser card that would let me put in an nvidia graphics board, just in case the VIA one wouldn’t work for whatever reason. The only drawback when it comes to video on this board is that it uses shared memory, and the limit is only 128 megs. Kind of a shame it can’t go higher (and perhaps it can, I can’t find a manual anywhere, even on AOpen’s website), since the board itself supports 4 GB of RAM. That shouldn’t be an issue, though. It would just be nice to have it be a bit beefier.

The other big thing that I was cautious about was having S/PDIF support. Right now I’m not using it on any of my mythboxes, but I prefer to take my time and do some future-proofing. For now I’ve just got a stereo out to RCA cable that works great. I’m extremely picky about video, but sound not so much. Down the road it would be a very nice option to have in case I do start watching movies, and since I’m already ripping everything using the original AC3 streams, then it doesn’t seem too unlikely that I’ll need it. This board comes with two S/PDIF modules, which took me a bit of searching to find out how they plug in and work. It turns out there’s one for audio in and one for audio out. This easy installation guide PDF (warning, the file is HUGE) has some pictures of it, and explains where they plug in — each one goes in one of the regular audio jacks on the back. Seems odd to me, and I’m skeptical that it would even work, but I guess it could. Either way, I’m still going to make sure to get a case that I can add a PCI slot in there so if I need to get a soundcard with S/PDIF out, I can (Interestingly enough, those are hard to find .. at least in a decent price range).

All the other stuff is really cool, but I’m not too concered. From there it’s basically everything you’d expect on a decent desktop, so it’s nice to have. 4 USB 2.0 ports, SATA II connectors, onboard NIC, etc. It also has S-Video out on the mainboard as well so I can hook it up to my older TV as well if I’d like. There are a lot of processors you can put in there as well, though for a mythfrontend you’re not going to need much.

As far as the final setup, I’m not sure still what I’m going to do. One interesting problem I’ve noticed with cases for Mini-ITX systems is that a lot of them are butt-ugly. Most of the ones that Logic Supply sells for the Intel boards are pretty bland. I suppose most people just tuck them away somewhere. On the flip side, I guess it’s nice that you don’t have to spend all that money on nice design, right?

Here’s the case that I’ve tenatively settled on, the Morex 3777. It’s huge and ugly, but it’ll have more than enough room to put in extra stuff if I need it. One really cool thing is that Logic Supply will put the entire system together themselves, and I can pick all the components I want to get. I’m pretty excited already. The price seems reasonable too, considering I’d spend the same amount on a decent desktop system. With my preferences, the price is ranging from about $600 with the basics to $900 with everything I’d ever possibly want. As soon as I save up some cash, I’ll be getting mine. I’m pretty excited overall. Mostly to have found something I like … that’s always the hardest part.

good skating session

The weather today has been absolutely amazing, considering it’s November, and since I was at home all day (problems going on with work), I managed to hit up the skate park for a good three hour session. It was a lot of fun, and I really needed both the exercise and the break.

Fairmont skate park

I’m still not any good at skating in the least, in my opinion, since I can’t do any tricks … in fact the only progress I really have to show is that I can almost manual. I’m getting there. One thing I noticed today though is that I always go with the idea of just having some fun, even though I want to practice, too. I only end up spending very little time actually practicing, probably about 10 to 20 minutes, and even then only a few times a week. It’s not really helping things in the long run. The fact is, though, practicing is hard. But that’s about the only thing that’s really gonna help.

One major thing there is still to overcome is just the fear of it all. It’s always pretty subconcious I think, since the worst I’ve hurt myself is I pulled my legs and nearly broke my foot. There’s just something that makes me a bit afraid of launching myself into the air at high speeds and hoping I don’t kill myself that makes it hard to practice to start with.

I was talking to another skater there at the park this morning and I said it’s just crazy how you see these little kids come in here and just ride these bowls and drop right in without any problems, as if they don’t have any fear. His response was interesting, “It’s not that they don’t have any fear … they do, it just hasn’t been beaten into them their whole life like it is for us adults.” How true that is.

Still, despite my slow progress, I’m having the absolute time of my life. It’s great fun. I just wish I was a little better. I’ve though about trying to find someone to give me some lessons, but I have no idea how to find anyone. Mostly I just need some feedback. Ah well, good times. :)

matroska + vobsub + subtitles … finally!

Oh, man, this is something I’ve been struggling to wrap my brain around for a good while, and I finally got it figured out. I’ve always wanted to be able to add subtitles to my matroska videos … no real reason other than it’d be nice. I don’t normally turn them on, but I do occasionally. The problem I kept running into was the same with a lot of software documentation out there — it was just sparse or assumed you knew some certain terms or skipped over explanations. Adding to the complexity is the fact that there are a few subtitle formats that different containers can handle.

In my setup, I’m once again skipping a few steps to just plain keep this simple, mostly at the cost of space, though even that is hardly anything. As an example, on a 1.5 GB MPEG2, the resulting VobSub file is 1 MB. I can live with that.

Anyway, here’s what I have so far … and I promise to update the Gentoo wiki as soon as I get time to cover this more in detail. The first step is to rip the subtitles from the DVD. To do that you have to calculate the subtitle index, which I won’t go into right now. On the DVD I used, “It’s the Great Pumpkin, Charlie Brown” it was the first (and only) subtitle track for the movie, so it was pretty easy for me.

In fact, here’s the command I used to rip both the movie and the subtitles at once:

$ mencoder dvd://1 -ovc copy -oac copy -vobsubout subtitles -vobsuboutindex 0 -sid 0 -o pumpkin.avi

This created three files: pumpkin.avi (the unencoded MPEG2), subtitles.idx and subtitles.sub.

After that, and this is where I never realized how easy it is, to dump it all into Matroska, you just add the .idx file along with the others you are going to mux.

$ mkvmerge -o pumpkin.mkv pumpkin.avi subtitles.idx

When watching the movie with MPlayer, you can toggle through the possible subtitles with the ‘j’ key.

I can’t believe it was as simple as that.


region-free dvd players

I’ve picked up my quest again to find a DVD player that is region-free. This is about the fourth or fifth time I’ve looked around, this being my most serious attempt. I’ve been doing my research quite a bit on this one instead of just randomly buying whatever looks like it might work the second I see it.

The first question is whether you want to get a player that is region-free “out of the box” or hack one to reset the region settings. I’d rather go with the first one, for fear of getting stuck with a player that for one reason or another isn’t hackable.

I actually found a lot of search results on Amazon, which surprised me. Almost all of them are either Philips or some cheap-o brands I’ve never heard of. A Philips DVD player is most certainly out of the question. I bought one once and it had the most horrible remote I’ve ever seen. Today, that’s no real excuse since you can use a universal remote, but one feature it also lacked was that you couldn’t eject a disc from the remote. Lame.

Aside from my experiences, everywhere I read about their players, people regret the purchase, and have lots of complaints about them. So, definately going to steer clear.

The only thing I’ve really found so far that looks like it’d work is this one, the Samsung DVD-P171. The only problem is that I can’t find any reviews for it, anywhere at all. Either no one bought this thing or it was quickly replaced by another model. Neither scenario exactly inspires confidence. Even then, I couldn’t find the specifications for it on any website. I finally downloaded the product manual from Samsung’s website, and it has component and rca video out, along with coaxial audio out. No HDMI or S-Video which stinks for maximum options, but it’s not a big deal. Samsung seems to be generally a good brand overall, so I think I might get it and check it out.

The one feature I really want in my DVD player is what my Sony already has — remembering the last playback location. It’s great. The Sony players will remember the last position for six discs. So you can take them out and put them in later and pick back up exactly where you left off. I couldn’t really tell by reading the manual for the Samsung if it had that or not. Not a huge deal though, the reason I’m looking in the first place is to have it play any regions.

The reason I want a region-free DVD player in the first place should be pretty obvious — I want to be able to play DVDs from other regions. It’s the most annoying feature of DVD’s DRM that I hate. Ironically enough, HD-DVD and Blu-ray discs, known for their DRM, actually don’t employ this tactic … all discs are region-free. Sheesh.

Even dumber is that the studios will release some movies only in certain countries, or release them as widescreen only other places, but not in the USA or for Region 1. That means if I want to get Looking for Richard on DVD, I’d have to buy it from the UK. Or if I want George of the Jungle with widescreen I have to get it from Germany. I already bought Disney’s Shipwrecked from Australia, and changed the region code on my DVD ROM in my computer so I could rip it. I’m limited by the number of times I can change it though, so I’d rather have a player that I can just throw anything at.

For the record, here’s a list of Disney’s pan & scan only DVD releases, and which regions have the widescreen ones available.

"it came from dvdnav!"

Okay, so that might not be the best thriller movie title ever … but so what. Buh. A while back, MPlayer developers forked libdvdnav, and recently had their first release. It’s already in portage, but package.masked. Emerge it and try it out. It might work. It might not. At least MPlayer compiles against it and uses it. I also bumped us to an rc2 snapshot, whee! There isn’t a dvdnav use flag, but that’s okay for now — just install it and MPlayer’s config will see it and link against it (similar to libnut). For the record, that’s not the ideal way to do things, but ah well. Someday all will be fixxored.

Also, it looks like LAME is currently the only possible solution for MP3 encoding right now … as the lavcopts + mp3 acodec option mysteriously disappeared. Dunno if that was an oversight or what. Who knows. Seems like there was something else interesting I was gonna mention, but I can’t remember what it was now.

In other unrelated news, I have eleven unopened bags of candy (plus a full bowl still) from last night. I plan on being on a sugar high for the next few weeks. :)

bad habits

I’ve been getting into a bad habit with my posts lately that I really don’t like .. I’ll post half-detailed posts about how to do something, and then months later when I look at my posts as reference, I completely forget all the little stuff that matters, and the explanation doesn’t really help much at all.  I’d be much better off starting a new page on the Gentoo Wiki instead and just doing a braindump so that anyone else can come along and edit and update it, and use that as a launching point if they wanted.

I’ll try to get away from that. :)

embedded gentoo linux: the basics

Since working with building an embedded Linux image with Gentoo, I have been learning stuff at such an incredible rate of speed that it’s hard for me to keep up the pace.  I’m going to try to document some of the stuff I’ve learned.

The first thing before starting is to know how Gentoo (portage in particular) works, in making this a possible reality.  The ebuilds, as you know, determine the dependencies for each package that is installed onto your system.  Those dependencies fall into two categories: the ones that you need to build the package (compiler, header files, etc.) and the ones that you need to run the package on your system (libraries, binaries, etc.).  In the ebuild they are set as the DEPEND and RDEPEND variables, respectively.  Build-time and run-time deps.

On top of that, portage can also build a binary package of each program that install using emerge.   You can have this happen by default or do it manually for a package.  Automatically would be to add “quickpkg” to your FEATURES set in make.conf.  Then, everytime you emerge something, it will tar up the installed package and save it into /usr/portage/packages.  Alternatively, you can emerge a program and only build a binary instead of installing it to your root filesystem, by using emerge -B.  If you already have the package installed, you can use ‘quickpkg’ to build a binary package.

Anyway, the point is, by building a system using the packages, you can save lots of space (and time) by installing only the applications you need.  If you’re going to develop a system to use the binary packages, you want to install them to another location.  The simplest way to do that is to use the ROOT variable, and then emerge something.  That will only suck in the binary packages, giving you the bare bones that you need.  ‘ROOT=”/tmp/tiny” emerge -B foo’ would pull in package ‘foo’ along with all its runtime dependencies.

If you’re going to develop a complex image though, you’re going to need more variables than just what the ROOT directory provides.  Fortunately, portage accounts for that as well, and you can use an entirely different make.conf file for your target destination using the  PORTAGE_CONFIGROOT variable.  Using that with portage will look for /etc/make.conf from that starting point … using /tmp/tiny as an example, it would read from /tmp/tiny/etc/make.conf.  There are a few things you should put in that make.conf file, though.  The most important one being the new ROOT variable for your target directory, ROOT=/tmp/tiny.  Otherwise, everything would end up being installed to your current setup.  You’ll also need to copy make.globals to the new /etc directory as well, plus setup the portage profiles … a symlink should work nicely.  You’ll also need to set PORTDIR, DISTDIR and PKGDIR to point to your development’s root filesystem.

I don’t want to get into more details here … I’d rather do that on a wiki.   If anything, I just want to show how it can be done.

Something else that comes in handy with portage is that you can tell it not to install certain files when the package is emerged into your target directory.  Since you’re not going to be doing any compiling on the system, we can strip out all header and development files that packages normally need when building against another package.  Portage has an INSTALL_MASK variable that will let you ignore those files when installed.  Here’s a trimmed down version of what mine looks like in the make.conf for my target install: INSTALL_MASK=’*.a *.h *.ac *.pc *.la *.mo *.m4 Makefile*’  There’s a lot more you could add, but that will catch most of it.

Another easy fix you can add to ignore unnecessary files on your deployed image is by adding ‘noman’, ‘noinfo’, and ‘nodoc’ to the FEATURES set.

There’s a lot more to it than that, such as deciding which init system to use, using and configuring busybox, picking a libc, etc., but thanks to Portage, building an image for embedded use is actually incredibly easy.  So far I’m enjoying it. :)

If you need any help, feel free to pop your head into #gentoo-embedded on Freenode.

creating and booting off a usb-zip formatted drive

So, I’ve got to work with a motherboard with an older BIOS that doesn’t support booting off the newer, simpler USB-HDD option. However, there is one option available still in the boot menu: USB-ZIP. The problem is, you can’t just select it and boot off your USB stick with a Linux Live distro on there, you have to format the flash drive on there in a certain way first. This was a royal pain in trying to figure out, so I figure it’s worth passing on how I finally got it working.

Actually, it’s quite simple to fix — it just takes me forever to find this stuff. :) Pendrive Linux’s website has a great writeup on the how and why this is possible, including instructions. There’s just one small thing to note that if you’re using a Gentoo system to flash the drive — syslinux (currently) doesn’t install the ‘mkdiskimage’ binary to your system. Fortunately, there’s an easy workaround — it’s already included in the original tarball. Just go to a temporary directory, unpack the latest syslinux tarball you have, and use that.

Specifically, here’s what I did. I stuck my USB stick in the drive, and checked to see which drive it’s listed as using ‘fdisk -l’. I can see I’ve already got something on there in my case, and it shows up as /dev/sda1.

Next, unpack syslinux and format the sucker.

  1. cd /tmp
  2. tar xjvf /usr/portage/distfiles/syslinux-3.52.tar.bz2
  3. ./syslinux-3.52/mkdiskimage -4 /dev/sda 0 64 32
  4. /usr/bin/syslinux /dev/sda4

Note that the actual formatting of the disk takes a freaking long time. So, be patient, and don’t kill it. When it’s done, run fdisk -l again and you’ll see it creates only one partition (/dev/sda4) already formatted and ready to go. Also, I didn’t add a partition number to the mkdiskimage command, that’s because I’m formatting the entire filesystem, not just one partition. In other words, /dev/sda is right, and /dev/sda1 isn’t.

After that, just mount the sucker (make sure you’ve got the right FAT/VFAT support in your kernel), and copy over the bootable image you want. I recommend Damn Small Linux, personally. And there you go. I’ve been able to boot up every old BIOS that has USB-ZIP so far. Let’s hear it for great open source system tools. :)