PDA

View Full Version : Understand a bit more about what's inside the PBO



tpublic
01-03-2010, 07:35 PM
[prerequisites for reading this post: basic understanding of computers running Windows, and a flame retardant suit]

This is frustrating. I don't want to bag on you Mitch, but hopefully others will see this thread and understand a bit more about what's inside the PBO (and all the other Realtek-based appliances).

Yes, we have a Linux kernel, but there's no video driver. There's no sound driver. There's not even a real driver that describes the infrared port. There is a single, monolithic application called DvdPlayer (http://rtd1073.wikidot.com/dvdplayer) that does all of that. When you kill that program, the PBO doesn't really do much. And Patriot was only cool enough to include Patriot wi-fi drivers, but others are certainly (http://www.nslu2-linux.org/wiki/Optware/) available (http://www.openwrt.org/).

The DvdPlayer application was written by Realtek (http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PNid=9&PFid=26&Level=3&Conn=2&ProdID=238). It is considered proprietary, and the sources for it are not (readily) available. Some (http://www.elliondigital.com/eng/product02.html) vendors (http://www.brite-view.com/cinematube.php) have accidentally released the source for that application, but it's not up to date. Heck, some vendors aren't even bothering with updates (initiated by Realtek in some major cases).

To compare, imagine you have a Windows machine with no video driver and no sound driver. Sure, it's "Windows" somehow, because it came from Microsoft, but all it has is a network stack and block devices to talk to storage. It'll do file sharing, you can log into it remotely (okay, so that's not native to Windows) but it's not going to run any GUI applications without a lot of help. But hey, it's still Windows (http://msdn.microsoft.com/en-us/library/ms791545.aspx), right?

Just because it has a CPU doesn't make it a computer. (It's an "embedded (http://minimodding.com/tiki-index.php?page=EmbedSysTerms) appliance".) Just because it runs Linux doesn't mean you can launch Firefox (without a lot of work). And if you bought it for those reasons, you miscalculated. Also, if you're going to take the position that Open Sores Software (http://en.wikipedia.org/wiki/Open_source_software) developers (read: hobbyists in their spare time) are at your beck and call, you've also miscalculated.

Also, the CPU in these appliances is not Intel (or AMD) but instead MIPS (http://en.wikipedia.org/wiki/MIPS_architecture). Quicky, all you need to know here is that you're not going to be able to download a random precompiled RedHat or Debian binary and drop it in place. It must be compiled for the MIPS architecture, with the same version of shared libraries (http://en.wikipedia.org/wiki/C_standard_library) that exist on the PBO (think system DLLs) and likely compiled against the same version of the kernel if you want to use system calls. Compare trying to run a Vista 64-bit application on a Win 95 installation. Or, sometimes, an XP application on Vista :rolleyes:

The easy things you are going to be able to install are things that are command line only. Another torrent client, a network time daemon, FTP, SSH, Perl, Python... but NOT: XBMC or VLC or Media Player Classic. (okay, Perl and Python are huge and not likely. We have to think about things like tinyhttpd (http://tinyhttpd.sourceforge.net/) instead of Apache's monster (http://httpd.apache.org/).)

What we CAN do is throw all the media we can at this thing, determine the EXACT compression settings that aren't playing back properly (download MediaInfo (http://mediainfo.sourceforge.net/en) and see what it does with your files) then report those to Patriot. We can find usability quirks and bugs, and report those. We can come up with SIMPLE tweaks and suggest those. Remember, if you've "upgraded" your "firmware" then you are using BETA SOFTWARE (http://en.wikipedia.org/wiki/Software_release_life_cycle#Beta).

(Background: the "firmware (http://minimodding.com/tiki-index.php?page=firmwaretour)" is a whole internal "disk" image that replaces the existing filesystems entirely, but it probably only has a few minor changes, and likely only the DvdPlayer application.)

We also need to understand that Patriot doesn't make these (http://www.premiertek.net/products/enclosure25/MP-2020.htm) things (http://www.hornettek.com/products/phantom.php), and they likely didn't have a dedicated developer for it until recently... and he'll need to be a hell of a coder to look into codec issues that are bugs as well as redoing an entire user interface that aren't bugs. (You should know that it's almost entirely flat, based on static bitmap graphics, so the location of things on the screens aren't trivial to tweak. Perhaps we can skin (http://en.wikipedia.org/wiki/Skin_%28computing%29) the interface, but we're not going to be moving things around for a while.) Many folks aren't asking for "upgrades" but instead whole new applications and interfaces. Do not expect someone to slap Aero (http://en.wikipedia.org/wiki/Windows_Aero) or Aqua (http://en.wikipedia.org/wiki/Aqua_%28user_interface%29) on this thing, but understand that some of your requests are comparable at this point.

If you want to help, you'll need to understand what's missing from the appliance Linux "distribution" and be comfortable compiling things for another architecture (see MIPS toolchain (http://www.linux-mips.org/wiki/Toolchains)). Then you'll be adding to it (while eating up more storage space!) and helping everyone else out along the way. At a minimum, check out other appliances, other forums, and even the blogs that cover RTD1073 and RTD1282 homebrew activity (I was going to drop about 20 links here, but there's apparently a 10000 character limit to posts!)

If you want to make all media visible remotely over Samba (http://www.samba.org/samba/what_is_samba.html) (the Windows-compatible (http://en.wikipedia.org/wiki/Samba_%28software%29) file sharing software) then you'll need to understand the smb.conf file. If you want to make your own GUI "shortcuts" then you'll need to find the file that DvdPlayer reads to show those (can't recall the exact file at this moment!) You should also keep symbolic links (http://en.wikipedia.org/wiki/Symbolic_link) in the back of your mind to aid in those endeavors. What we report back to Patriot are the issues where making shortcuts is uncomfortable (or silly) and request that they provide a way to symlink from the remote to resolve all those issues.

If you've never used linux before, then you're at a disadvantage. If you've never installed a package FROM SOURCE before, then you're at a disadvantage. You don't have to be a developer or a system administrator to get dirty, but you must know the basics of HOW and WHY (which only become "basic" after you've really toyed around for a while). I'd like to figure out why the CPU load seems to be pegged all the time (not counting the hardware decoding, of course) and why there are more than a dozen copies of the DvdPlayer application running at the same time. (or why it still has code in it from other DVR appliances when we don't even have video inputs!) Maybe if you're not familiar with the inside of your box yet, then your first assignment could be to figure out what the "night mode" setting in the GUI does. It's that kind of effort that is needed. [hint: it's rather dynamic]

I've been here before. A vendor has picked up a ready-made chipset and slaps their label on it. Some reselers don't bother to support it. Others, like Patriot, seem interested at first but that eventually dies off when they fear the effort put into supporting it is more than the investment (and margin). With enough negative threads around here, potential customers might get the impression that this is not the toy they want to buy. When Patriot sells no more, they're not going to keep their developer(s) making it better. Hopefully they'll still push Realtek upgrades, but for how long if no one is buying them? Notice that the Box Office is not listed in the Products menu, and there's only one reference to it now on the front page which sends you offsite to a review (http://hardocp.com/article/2009/12/29/patriot_memorys_box_office_media_player_review/1) that puts it clearly:


"The Box Office is NOT a consumer level product. It is NOT as simple as plugging in a DVD player and pushing the play button. There are likely going to be some hoops that you need to jump through. [...] This is common with this type of device, and worth knowing about before you purchase because not all is "plug and play" with the Box Office."

If you're the type who just skips to the bottom of long posts (tl;dr (http://www.urbandictionary.com/define.php?term=tl%3Bdr)) then I'll take the opportunity to be brash and ask that you understand the complexities of your request before expecting an outlandish upgrade to something that only cost you a hundred bucks. Because, for the folks who do understand it and spend their spare time working on it, your comments come off as ignorant whining rather than simple naïve statements. Interrogatory works better than demand.

[and now we flip a coin: deleted for being a flame, or made into a sticky?]

wigout
05-07-2010, 04:35 AM
Most of the thread this post (http://www.patriotmemory.com/forums/showthread.php?t=2438) came from is really of a general nature, but there are many excellent insights here in this post, as well as a strong levelling of expectations (with hope nonetheless).

I thought it belonged in the Mod/Hack section.

scboley
05-07-2010, 06:27 AM
Yeah when you hack the image apart it has a video firmware file and an audio firmware file and I'm betting that this is binary coded something like akin to a ramdisk within linux that it injects those 2 drivers straight into the kernel as it loads on the bootcode foundation. The updates for tv compatibilities would have to reside in those 2 file packages alone as they're not within the linux code and the dvdplayer has an x type shell builtin but isn't a real video driver level thing par say like x.org and how traditional linux does the gui. Pretty ingenuis since the manner they built the sdk package really locks you down without either the full sdk or knowing how the sdk really works. I do find playing with these little boxes fascinating and has revived my inner child that loves to tinker disassemble and rebuild something.

notserpe
10-13-2010, 10:10 PM
Hey tpublic,

I commend you on taking the time to write a pretty long and well thought out explanation of
both sides to the equation of companies leveraging embedded Linux (with various degrees
of difficult and success) and consumers' understanding (or lack) of the benefits, reasonable
limits, inherit drawbacks and freedom possible with such devices.

Nice job.

Monkey
10-19-2010, 01:24 PM
Hey tpublic. Very nice post and I am 100% agree with you. (Glad I did started playing with linux since 1.2.8 kernel... haha, those good old days where you have to download source package and compile your own binaries. Not to mention need to tweak the code sometimes...)

I guess, my wish is, one day, there will be a replacement for that damn DvdPlayer app and is open source (or 'open sores' as you call it...) That will be opened up hell alot of fun for 'hobbyists in their spare time'.

Meanwhile, PBO is pretty good enough in most cases to do the job I pay for. But I wouldn't mind to toy around the firmware when I have time.

Edit: Wigout seems to find a "possible" replacement for DvdPlayer (http://www.patriotmem.com/forums/showthread.php?t=4700) or let's hope enough hobbyist to get this going... ;)