Skip to main content

If you don't have an IBM ID and password, register here.

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

Linux on board: Inside the MediaMVP

A clean example of compact embedded Linux

Peter Seebach (dw@seebs.net), Writer, Freelance
Author photo
Peter Seebach collects tiny devices that run on Linux. He is sick of hearing the joke about making a beowulf cluster of them.

Summary:  As an MP3 and MPEG player, the Hauppauge MediaMVP lets you play digital media through your television set. As a tightly purposed embedded device, it is an excellent example of a compact Linux® implementation on minimal hardware.

View more content in this series

Date:  28 Sep 2006
Level:  Intermediate

Comments:  

Although I've seen smaller embedded Linux systems than the Hauppage MediaMVP, it is the smallest non-handheld, and it's one of the least expensive Linux systems out there. The MediaMVP is similar in some ways to the TiVo: it's intended to be a pure appliance, performing only specified functions. Unlike the TiVo, it doesn't make a significant effort to prevent users from loading their own software, and sure enough, users have done just that. (For more about my look inside the TiVo, read my earlier Linux on board column, "Blowing the lid off of TiVo."

This article looks at the "standard" install provided by Hauppage and also looks at the MediaMVP Media Center (MVPMC) project, which is developing a custom user environment for the system.

[Warning: Modifying the MediaMVP as described here or in any other way might render it unusable and will most likely void the manufacturer's warranty. Proceed at your own risk. -Ed.]

In the box

The MVP is an exceptionally compact gizmo. It has even less on-board hardware than the Kuro Box in some ways (see the Resources section for articles about the Kuro Box), no Ethernet, and not enough flash to hold a kernel. (Actually, you might be able to fit a kernel in it; they just didn't do it.) The processor is an STBx25xx-series set top controller, which is built around a PowerPC® 405 core. The machine has 32MB of RAM and an Ethernet controller. Some versions also provide wireless capability; mine just has a bunch of soldered-over connectors on the motherboard that could probably have held a CardBus slot. I found a reference on a forum (see Resources) to someone who supposedly wired up a serial port, so that might be possible as well. There's also the IR port, which is available to the Linux kernel as /dev/rawir.

The STB processor isn't just a generic PPC405; it has hardware MPEG decoding support built in, which is a good match for a product like this and lets the system move impressive amounts of video and audio without needing a whole lot of processor speed. In short, after all that marketing material you've heard about PowerPC systems being unusually cost-effective and easy to modify to suit given business markets, here's a concrete example. The processor's rated speed is 252 MHz.

The hardware design makes it pretty clear that this is a purpose-built appliance, which is probably why this system costs less than the Kuro Box, let alone a regular computer.


Out of the box

Out of the box, the MediaMVP doesn't do anything except look for servers. One way that this system was streamlined was by omitting the large flash storage that would typically be used for a kernel and root file system; instead, the box boots over the network. To avoid clashing with existing netboot servers, the MediaMVP uses non-standard port numbers. The software distributed with the package is a Windows-only server that combines netboot and streaming media services. When the box boots, it gets configuration information and a file named dongle.bin from the server. This file holds a number of things, including a boot loader, a ramdisk image, and a kernel. These can be extracted fairly easily with a little Perl script.

The default setup just sits around talking to the Windows-based server program. The on-disk configuration is, as you might expect, a little interesting. No one will be at all surprised to discover that the system includes a BusyBox install (version 0.60.5). (See Resources for a link to more information on BusyBox.) The whole ramdisk contains just over 2MB of files: 686KB for BusyBox, 1191KB for the MediaMVP's userland software, 436KB of kernel modules, and a few small configuration files. This installation is much more stripped down than, say, the fairly elaborate setup of the TiVo.

The setup files are so small it's feasible to reproduce them entirely. The /etc/inittab file is a marvel of compactness:


Listing 1. Contents of /etc/inittab
::sysinit:/etc/rcS
::respawn:-/bin/sh
::respawn:/bin/auto-dongle.sh
#::respawn:/etc/serial_proxy.sh

The serial_proxy program is a trivial script to run netcat on port 4000. It's commented out, and the nc binary has been omitted from the distribution version anyway. The rcS script handles startup tasks, and the auto-dongle script just runs the mpeg decoder. The decoder is simply restarted automatically if it stops; this seems a reasonable choice in context; on a desktop system, you might want to shut a failed service down or emit warnings, but on an embedded box, there's no real point.

The rcS script looks like this, complete with commented-out bits:


Listing 2. The /etc/rcS script
#! /bin/sh
#/bin/umount -a
/bin/mount -a -o rw

# Auto configuration mode
# AUTO=
AUTO=auto-

# ismods for dongle
/etc/insmods.sh

# user state fpage
/usr/bin/fpage >/dev/null 2>&1 &

# set up network
. /etc/${AUTO}netsh.sh

As with the inittab file, the files needed to tweak a configuration option aren't there; there's no plain netsh.sh, only the auto-netsh.sh script is installed. The auto-netsh.sh script tunes some kernel networking parameters, configures the loopback interface, and starts up a DHCP client.

Although my test system has no wireless card, there is at least some support for wireless networking on it already; the "mediamvp" binary (the target for the fpage and mpgdec symbolic links) has lots of strings in it for NWID settings and other 802.11 terminology. This may have to do with the announcement of a wireless-enabled version of the MediaMVP. The support is at least partially in place in the unit I looked at. On a side note, the mediamvp binary wasn't always separate from BusyBox; in very early releases, they were all one binary. This has been a concern for some people, because the mpgdec code has never been released, and BusyBox is GPL'd code.

The bulk of the functionality of this system is hidden, and it seems very likely that a fairly large portion of it actually lives on the Windows side. There's not that much you can do to modify this box without replacing some of the software. Unlike the current TiVo systems, the MediaMVP doesn't make any particular effort to keep you from updating and/or replacing the contents of its file system. So why not do just that?


Enter the MVPMC project

The MediaMVP Media Center (MVPMC) project is a complete replacement for the software provided with the MediaMVP. It can obtain video over NFS or from MythTV or ReplayTV servers. Audio can also be obtained over NFS or from a SlimServer server. The software is still in early stages; many features just don't work, or don't work very well. (Part of the problem is the need for the MVMPC developers to reverse engineer the hardware documentation for the controller chip; if the chip's documentation were available to open source developers, the MVMPC developers would have an easier time.) But on the other hand, it has the universal benefit of open source systems: if you want it fixed, you have access to the source.

The boot loader for the MediaMVP still needs to have a dongle.bin file in the canonical format. Furthermore, the kernel modules for the various hardware pieces have to be loaded, and because source for them isn't currently available, they have to be copied in from the old system. However, the procedure has been figured out, and the MVPMC build scripts can generate images with new root file systems and new kernels.

The MVPMC root file system is larger than the stock file system, and not always in a way that makes sense:


Listing 3. Why is this on a ramdisk?
$ ls -ld lost+found
drwx------  2 root  wheel  176128 Feb 10 20:28 lost+found

The BusyBox binary is actually version 1.0, but it comes out smaller than the originally installed version (0.60.5); only about 600KB, despite having more commands linked to it. I'm not sure what caused the extra size in the old one. The system in general has a lot more files on it than originally ship with the MediaMVP; reading between the lines, some of the data files the shipped system uses must either be embedded in executables or passed in from the server. The MVPMC system provides a much more complete collection of shell utilities -- not that they do much, in the absence of a way to log in! However, the MVPMC system shows signs of being intended for debugging; you'd have to add a way to connect, but the hooks are there to poke around once you can log in.

The MVPMC project acquires additional configuration from the server at runtime; corresponding to the dongle.bin file (containing the kernel and file system) that the box downloads, it grabs a dongle.config file, which is simply run by /etc/rcS. Thus, if you want to run telnetd, you can; just add it to your dongle.config.

The ongoing development of this project suggests that, while it's not quite as stable as the originally shipped system yet, it probably will be, and it will certainly have a broader range of features. It's hard to argue with the price, either; the one way to improve on inexpensive hardware is with free (as in beer) software. The obvious limitation is simply that, because the device itself has essentially no expansion options, there's not much you can do with it other than make it play media. Still, the temptation to build a Multiple Arcade Machine Emulator (MAME) platform is there; there are IR-based remotes with decent response time, and the hardware would be an excellent match. It would require some rethinking of the build process, but it could be done.


Tiny environments

The MVP is one of the smallest Linux systems you're likely to encounter; in many ways, it has lower hardware specs than handhelds (such as the Zaurus; see my Linux on board column, "Zaurus pioneers embedded Linux, and the lack of local storage imposes rigorous demands on the root file system. Other systems can more easily afford to be careless with a couple of megabytes here or there; the MVP really has to work very hard on keeping everything small. Similarly, the very small RAM footprint makes it important to be very careful about memory leaks.

That said, this environment is a comparative cakewalk for Linux. Linux developers have long made a practice of intentionally targeting machines that were dismissed as "too slow" or "too small." It's not unheard of for machines a full decade old to still be in use as servers running modern Linux. As a result, a lot of the hardest work is already done; for instance, Linux is nicely decoupled from any of the variety of bulky user interfaces available for it, and the Linux kernel is nicely modular. Userland is even more adaptable, which matters a lot when you're trying to build a system a little smaller than the gigabyte or so most distributions consume these days.

Of the embedded Linux systems I've worked with, the MediaMVP is probably the one that does the best job of being transparent to regular users who don't know or care what an operating system is and who just want the box to work. On some systems, the OS is a little intrusive; on the MediaMVP, like the TiVo, it's virtually invisible. However, the MediaMVP has embraced the flexibility Linux offers; this is probably because it's sold as a piece of hardware, not as a dongle to let you use a pay service.

To the average end user, the theoretical option of modifying the system is pretty much a complete non-issue: chances are, the majority of TiVo owners have never even considered the question of whether or not there's "some kind of operating system" on their player, and they would not find the benefits of a modified system worth the time and effort it would take to do the modifications. However, for people who do have, for whatever reason, a desire or need to modify things, it's nice to have the option. The openness of the MediaMVP pays big dividends here.

Furthermore, even the users who have no interest in doing modifications may benefit when modifications are freely available; forum threads discussing the MediaMVP include posts from users who clearly don't know what Linux is but are happy to have more options on their video-playing box. From my look inside, the decision to build the system on Linux seems to have paid off substantially; the side-effect of providing what appears to be a nice generic thin client for about a hundred dollars is no doubt pure coincidence.


Resources

Learn

Get products and technologies

  • With IBM trial software, available for download directly from developerWorks, build your next development project on Linux.

Discuss

About the author

Author photo

Peter Seebach collects tiny devices that run on Linux. He is sick of hearing the joke about making a beowulf cluster of them.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in

If you don't have an IBM ID and password, register here.


Forgot your IBM ID?


Forgot your password?
Change your password


By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)


By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Linux, Multicore acceleration
ArticleID=163849
ArticleTitle=Linux on board: Inside the MediaMVP
publish-date=09282006
author1-email=dw@seebs.net
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).