<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pure Insanity! &#187; MediaTomb</title>
	<atom:link href="http://intellidick.com/wordpress/tag/mediatomb/feed/" rel="self" type="application/rss+xml" />
	<link>http://intellidick.com/wordpress</link>
	<description>Life is hard, get a helmet.</description>
	<lastBuildDate>Mon, 17 Oct 2011 21:15:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ahhhh, the joys of the standards compliance&#8230;</title>
		<link>http://intellidick.com/wordpress/2008/12/30/ahhhh-the-joys-of-the-standards-compliance/</link>
		<comments>http://intellidick.com/wordpress/2008/12/30/ahhhh-the-joys-of-the-standards-compliance/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 20:15:08 +0000</pubDate>
		<dc:creator>ekrunch</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[DroboShare]]></category>
		<category><![CDATA[MediaTomb]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Xbox 360]]></category>

		<guid isPermaLink="false">http://intellidick.com/wordpress/?p=179</guid>
		<description><![CDATA[After managing to build a functional copy of MediaTomb for my DroboShare, I then found out that it doesn&#8217;t support the Xbox 360. Yay&#8230; the single device that I wanted to work with it. Oh well, I suppose I should have loaded up the Ubuntu based version first or something beforehand. According to the authors [...]]]></description>
			<content:encoded><![CDATA[<p>After managing to <a href="http://intellidick.com/wordpress/2008/12/30/building-mediatomb-for-the-drobo-using-ubunutu/">build</a> a functional copy of <a href="http://mediatomb.cc/">MediaTomb</a> for my <a href="http://www.drobo.com/Products/droboshare.html">DroboShare</a>, I then found out that it doesn&#8217;t support the Xbox 360. Yay&#8230; the single device that I wanted to work with it. Oh well, I suppose I should have loaded up the Ubuntu based version first or something beforehand. According to the authors of MediaTomb, it is the fault of Microsoft. That I can believe. I have yet to do a protocol trace but I do know that most other UPnP media servers have a special switch that you have to flip to make it work with the Xbox 360. What a bummer&#8230; so much for the UPnP &#8220;standard&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://intellidick.com/wordpress/2008/12/30/ahhhh-the-joys-of-the-standards-compliance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Building MediaTomb for the Drobo using Ubunutu</title>
		<link>http://intellidick.com/wordpress/2008/12/30/building-mediatomb-for-the-drobo-using-ubunutu/</link>
		<comments>http://intellidick.com/wordpress/2008/12/30/building-mediatomb-for-the-drobo-using-ubunutu/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 07:06:50 +0000</pubDate>
		<dc:creator>ekrunch</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Useful Information]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[Drobo]]></category>
		<category><![CDATA[DroboShare]]></category>
		<category><![CDATA[FUPPES]]></category>
		<category><![CDATA[Intrepid Ibex]]></category>
		<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MediaTomb]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://intellidick.com/wordpress/?p=149</guid>
		<description><![CDATA[Seeing as it constantly comes up on the Drobo developer forums, I thought i&#8217;d take the time to put in some work and compile MediaTomb for the DroboShare. For those of you who don&#8217;t know, DroboShare is a NAS device that attaches to the Drobo and allows for the device to be used over the [...]]]></description>
			<content:encoded><![CDATA[<p>Seeing as it constantly comes up on the Drobo developer forums, I thought i&#8217;d take the time to put in some work and compile MediaTomb for the DroboShare. For those of you who don&#8217;t know, DroboShare is a NAS device that attaches to the Drobo and allows for the device to be used over the network instead of direct USB connections. The beauty of the DroboShare is that it&#8217;s an embedded Linux machine with an ARM processor and shell access. Gotta love that! The default media server on the Drobo forums is FUPPES. No offense to it&#8217;s author, but I really can&#8217;t stand using it. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  It seems slow and I really dislike the interface. I also don&#8217;t like the amount of configuration that it takes to get it to work with my Xbox 360 so I decided to do MediaTomb instead.</p>
<p>The first part of this is going to require a working Ubuntu 8.10 installation. I use Kubuntu 8.10 as my desktop OS so I already had this part covered. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  You can also use a VMware image if you don&#8217;t have a Ubuntu Linux machine around. Everything is done in a chroot environment and can be easily deleted after the software is compiled and uploaded to the DroboShare.</p>
<p>First, let&#8217;s create the jailed environment.</p>
<pre>sudo mkdir -p /var/chroot/drobo</pre>
<p>Install schroot (you can also use chroot if you&#8217;d like) and debootstrap</p>
<pre>sudo apt-get install schroot debootstrap</pre>
<p>Create the file <em>/etc/schroot/chroot.d/drobo</em> with the following contents<br />
&#8212;&#8212;&#8211; /etc/schroot/chroot.d/drobo &#8212;&#8212;&#8211;</p>
<pre>[drobo]
description=Ubunutu Intrepid for DroboApps
location=/var/chroot/drobo
priority=3
users=<em>&lt;Your Username&gt;</em>
groups=sbuild
root-groups=root</pre>
<p>&#8212;&#8212;&#8211; /etc/schroot/chroot.d/drobo &#8212;&#8212;&#8211;</p>
<p>Create a minimal system in the chroot jail</p>
<pre>sudo debootstrap --variant=buildd --arch i386 intrepid /var/chroot/drobo</pre>
<p>Create a place to extract the new downloads</p>
<pre>sudo mkdir /var/chroot/drobo/root/code</pre>
<p>Download the Drobo toolchain to a temporary directory<br />
<a href="http://www.codesourcery.com/gnu_toolchains/arm/releases/2006q1-6">http://www.codesourcery.com/gnu_toolchains/arm/releases/2006q1-6</a><br />
<em>(Select ARM GNU/Linux, then IA32 GNU/Linux, then click Download)</em></p>
<p>Extract the Drobo toolchain</p>
<pre>cd /var/chroot/drobo/usr/local
sudo tar xfj <em>&lt;DownloadDir&gt;</em>/arm-2006q1-6-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2</pre>
<p>Download MediaTomb<br />
Grab a copy from here : <a href="http://mediatomb.cc/pages/download#source_code">http://mediatomb.cc/pages/download#source_code</a><br />
Extract the files into the chroot</p>
<pre>cd /var/chroot/drobo/root/code
sudo tar xfz <em>&lt;DownloadDir&gt;</em>/mediatomb-0.11.0.tar.gz</pre>
<p>Because i&#8217;m building MediaTomb, i&#8217;ll need SQLite, ZLib, expat, and a few other things &#8230; Let&#8217;s start with SQLite<br />
Grab a copy from here : <a href="http://www.sqlite.org/download.html">http://www.sqlite.org/download.html</a><br />
I used &#8216;sqlite-amalgamation-3.6.7.tar.gz&#8217;<br />
Extract to the code directory</p>
<pre>cd /var/chroot/drobo/root/code
sudo tar xfz <em>&lt;DownloadDir&gt;</em>/sqlite-amalgamation-3.6.7.tar.gz</pre>
<p>ZLib &#8211; <a href="http://www.zlib.net/">http://www.zlib.net/</a><br />
I used &#8216;zlib-1.2.3.tar.gz&#8217;<br />
Extract to the directory</p>
<pre>cd /var/chroot/drobo/root/code
sudo tar xfz <em>&lt;DownloadDir&gt;</em>/zlib-1.2.3.tar.gz</pre>
<p>Expat &#8211; <a href="http://sourceforge.net/projects/expat/">http://sourceforge.net/projects/expat/</a><br />
I used &#8216;expat-2.0.1.tar.gz&#8217;<br />
Extract to the directory</p>
<pre>cd /var/chroot/drobo/root/code
sudo tar xfz <em>&lt;DownloadDir&gt;</em>/expat-2.0.1.tar.gz</pre>
<p>File &#8211; <a href="http://www.darwinsys.com/file/">http://www.darwinsys.com/file/</a><br />
Note : The site admin removed the 4.24 version of file so I had to get mine from here<br />
<a href="ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/file-4.24.tar.gz">ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/file-4.24.tar.gz</a><br />
I used &#8216;file-4.24.tar.gz&#8217;<br />
Extract to the directory</p>
<pre>cd /var/chroot/drobo/root/code
sudo tar xfz <em>&lt;DownloadDir&gt;</em>/file-4.24.tar.gz</pre>
<p>TagLib &#8211; <a href="http://developer.kde.org/~wheeler/taglib.html">http://developer.kde.org/~wheeler/taglib.html</a><br />
I used &#8216;taglib-1.5.tar.gz&#8217;<br />
Extract to the directory</p>
<pre>cd /var/chroot/drobo/root/code
sudo tar xfz <em>&lt;DownloadDir&gt;</em>/taglib-1.5.tar.gz</pre>
<p>libexif &#8211; <a href="http://libexif.sourceforge.net">http://libexif.sourceforge.net</a><br />
I used &#8216;libexif-0.6.17.tar.gz&#8217;<br />
Extract to the directory</p>
<pre>cd /var/chroot/drobo/root/code
sudo tar xfz <em>&lt;DownloadDir&gt;</em>/libexif0.6.17.tar.gz
</pre>
<p>ffmpeg &#8211; <a href="http://ffmpeg.org">http://ffmpeg.org</a><br />
FFmpeg doesn&#8217;t really do releases so I used a snapshot from a Gentoo mirror. The filename was &#8216;ffmpeg-0.4.9-p20081219.tar.bz2&#8242; and I got it from <a href="http://gentoo-distfiles.mirrors.tds.net/distfiles/ffmpeg-0.4.9-p20081219.tar.bz2">http://gentoo-distfiles.mirrors.tds.net/distfiles/ffmpeg-0.4.9-p20081219.tar.bz2</a><br />
Extract to the directory</p>
<pre>cd /var/chroot/drobo/root/code
sudo tar xfj <em>&lt;DownloadDir&gt;</em>/ffmpeg-0.4.9-p20081219.tar.bz2</pre>
<p>Create a directory for the resulting binaries.</p>
<pre>sudo mkdir -p /var/chroot/drobo/usr/arm</pre>
<p>Now it&#8217;s time to enter the chroot jail and start compiling!</p>
<p>Mount the required filesystems</p>
<pre>sudo mount -o bind /proc /var/chroot/drobo/proc
sudo cp /etc/resolv.conf /var/chroot/drobo/etc/resolv.conf</pre>
<p>Activate the chroot</p>
<pre>sudo schroot -c drobo -d /root</pre>
<p>Load some extra packages</p>
<pre>apt-get install vim</pre>
<p><em>(Feel free to use whatever editor you like in place of vim)</em></p>
<pre>apt-get install automake autoconf libtool autotools-dev m4</pre>
<p>Setup some environment variables. The trick to cross-compiling is to use the system&#8217;s binaries for running autotools but tell the compiler to link against the ARM headers, libraries, and binaries. These environment variables ease the pain when building in a non-standard directory. If they&#8217;re not set, a few of the below builds will fail miserably. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Seeing as we know the CPU/Architecture of the Drobo and the version of GCC, a quick check of the docs gives us some additional command line switches to further tweak things for our processor. The Drobo is no speed demon so everything helps.</p>
<pre>export CFLAGS="-I/usr/arm/include -march=armv5te"
export CPPFLAGS=${CFLAGS}
export LDFLAGS="-L/usr/arm/lib"
export CC=arm-none-linux-gnueabi-gcc
</pre>
<p>With that out of that way, let&#8217;s build some software! ZLib is up first</p>
<pre>cd /root/code/zlib-1.2.3
./configure --prefix=/usr/arm --shared
make
make install
</pre>
<p>Now Expat</p>
<pre>cd /root/code/expat-2.0.1
./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm
make
make install
</pre>
<p>SQLite</p>
<pre>cd /root/code/sqlite-3.6.7
./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm
make
make install
</pre>
<p>File proved to be a bit more tricky, but nothing too horid&#8230;</p>
<pre>cd /root/code/file-4.24</pre>
<p>Edit magic/Makefile.am</p>
<pre>vi magic/Makefile.am</pre>
<p>Change line 224 from</p>
<pre>${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE)</pre>
<p>to</p>
<pre>${MAGIC}: $(EXTRA_DIST)</pre>
<p>Now run the following to rebuild the build system &#8230;</p>
<pre>aclocal
autoheader
autoconf
libtoolize
automake
./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm
make
make install</pre>
<p>Libexif</p>
<pre>cd /root/code/libexif-0.6.17
./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm
make
make install</pre>
<p>Taglib time!</p>
<pre>cd /root/code/taglib-1.5
./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm
make
make install</pre>
<p>Hold on to your cookies &#8230; it&#8217;s time for ffmpeg. This is a seriously daunting command line but I have a feeling that this version is broken when cross compiling. Who knows what the problem is &#8230; this build works, just no Matroska. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<pre>cd /root/code/ffmpeg
./configure --cross-prefix=arm-none-linux-gnueabi- --prefix=/usr/arm --arch=arm --enable-armv5te --enable-nonfree --disable-network --disable-ipv6 --enable-pthreads --disable-zlib --disable-bzlib --disable-ffserver --disable-ffplay --disable-devices --disable-encoders --disable-muxers --enable-shared --disable-static --disable-vhook --enable-avfilter --enable-cross-compile --disable-decoder=matroska
make
make install</pre>
<p>MediaTomb leaves a lot to be desired when it comes to properly detecting items in a cross-compiled environment. It also looks like some of the distributions move header files around&#8230; which of course breaks it further. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  The following hack fixes it up for us to use again.</p>
<pre>mkdir -p /usr/arm/include/ffmpeg
cp -v /usr/arm/include/libavcodec/* /usr/arm/include/ffmpeg
cp -v /usr/arm/include/libavutil/* /usr/arm/include/ffmpeg
cp -v /usr/arm/include/libavformat/* /usr/arm/include/ffmpeg
cp -v /usr/arm/include/libavdevice/* /usr/arm/include/ffmpeg
cp -v /usr/arm/include/libswscale/* /usr/arm/include/ffmpeg</pre>
<p>Last but not least &#8230; MediaTomb! Time for some build system hacking again.<br />
Enter the code directory</p>
<pre>cd /root/code/mediatomb-0.11.0</pre>
<p>Hack up the configure script a little. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>vi configure.ac</pre>
<p>Change the following line numbers.<br />
<em>2378, 2395, 2402, 2418</em><br />
On each of those lines, you&#8217;re going to see the following section</p>
<pre>"-lavformat -lavutil"</pre>
<p>With this version of FFmpeg, a</p>
<pre>"-lavcodec"</pre>
<p>is needed. Here&#8217;s how mine turned out.<br />
<em>Line 2378</em></p>
<pre>FFMPEG_LIBS="-L$FFMPEG_SEARCH_LIBS -lavcodec -lavformat -lavutil -lz"</pre>
<p><em>Line 2395</em></p>
<pre>FFMPEG_LIBS="-lavcodec -lavformat -lavutil"</pre>
<p><em>Line 2402</em></p>
<pre>FFMPEG_LIBS="-L$SEARCH_DIR_LIBS -lavcodec -lavformat -lavutil -lz"</pre>
<p><em>Line 2418</em></p>
<pre>FFMPEG_LIBS="-L$SEARCH_DIR_LIBS -lavcodec -lavformat -lavutil -lz"</pre>
<p>Now it&#8217;s autotools time again.</p>
<pre>aclocal
autoheader
autoconf
libtoolize
automake
./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm --disable-external-transcoding --enable-ffmpeg --with-taglib-cfg=/usr/arm/bin/taglib-config --disable-libjs --disable-rpl-malloc --with-ffmpeg-lbs=/usr/arm/lib --disable-inotify --disable-mysql
make
make install
</pre>
<p>If all went well, you should see the following output</p>
<pre>CONFIGURATION SUMMARY ----
sqlite3               : yes
mysql                 : disabled
libjs                 : disabled
libmagic              : yes
inotify               : disabled
libexif               : yes
expat                 : yes
id3lib                : disabled
taglib                : yes
ffmpeg                : yes
external transcoding  : disabled
libextractor          : disabled</pre>
<p>Okay, now to create the required scripts, tar it up and send it to the Drobo! I&#8217;ve attached them here as text files and also as a ZIP file all of the necessary files.</p>
<p>The following two files go in the</p>
<pre>/usr/arm</pre>
<p>directory<br />
<a href="http://intellidick.com/wordpress/wp-content/uploads/2008/12/mediatomb-stopsh.txt">mediatomb-stop.sh</a><br />
<a href="http://intellidick.com/wordpress/wp-content/uploads/2008/12/mediatomb-startsh.txt">mediatomb-start.sh</a></p>
<p>The following file goes into the</p>
<pre>/usr/arm/config</pre>
<p>directory. This directory does not exist in the default MediaTomb setup, just create it and put the file in there. This is the default configuration that MediaTomb creates on first startup except that the paths have been modified to work on the DroboShare. This file will definitely need some more tweaking.<br />
<a href="http://intellidick.com/wordpress/wp-content/uploads/2008/12/configxml.txt">config.xml</a></p>
<p>This ZIP file contains all of the original files in their original form. Just unzip this file to /usr/arm and move the configuration file to /usr/arm/config<br />
<a href="http://intellidick.com/wordpress/wp-content/uploads/2008/12/configs_for_mediatomb.zip">configs_for_mediatomb.zip</a></p>
<p>Almost home &#8230; just create the Tarball</p>
<pre>cd /usr/arm
tar cvfz ../mediatomb.tgz *
</pre>
<p>Now exit the chroot jail and upload</p>
<pre>/var/chroot/drobo/usr/mediatomb.tgz</pre>
<p>to the Drobo. For more information on how to add applications to the DroboShare, check out the DroboSpace <a href="http://www.drobospace.com/">site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://intellidick.com/wordpress/2008/12/30/building-mediatomb-for-the-drobo-using-ubunutu/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

