Compile xbmc with broadcom crystalhd support on linux

Broadcom CrystalHD is a Mini-PCIe expansioncard to make your box do hardware decoding of HD video material (h264, vc1++)
Got a old AppleTV which you dont use? Buy a CrystalHD chip on ebay for 30 dollars, and it will play 1080p for you :)

Install Ubuntu 8.04 Hardy on your box, if you are going to use an AppleTV you can follow the guide here:
http://dingleberry.me/2009/11/ubuntu-karmic-koala-on-appletv-with-broadcom-crystal-hd-decoder/

Download the xbmc crystalhd branch and the lib directory from the xdmx branch which has the necessary crystalhd include files:
svn co -r 22347 https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/xdmx/XBMC/xbmc/lib/
svn co -r 25101 https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/crystalhd

prepare the system for crystalhd support:
mkdir /usr/include/crystalhd
cp -a lib/crystalhd/include/* /usr/include/crystalhd
cp /usr/include/crystalhd/windows/bc_drv_if.h /usr/include/crystalhd/bc_ldil_if.h

Edit /usr/include/crystalhd/bc_dts_types.h and comment out line 59 so it looks like this:
//typedef void VOID;

Copy the crystalhd include files to the crystalhd branch source:
cp -a /usr/include/crystalhd crystalhd/xbmc/lib/

Download the bcm70012 source and build the module:
wget http://www.norco.net.cn/UpLoadFile/Driver/bcm70012_linux_01142009.rar
unrar e bcm70012_linux_01142009.rar
tar xf bcm70012_linux_01142009
dpkg -i bcm70012kmod-source_0.9.30_all.deb
apt-get -f install
dpkg -i bcm70012kmod-source_0.9.30_all.deb
cd /usr/src/
m-a -t a-i bcm70012kmod
cd -

Install the gstreamer plugin from the HP mini 110 distro (the file came with the driver download in the step above)
dpkg -i --force-all gst-broadcom-70012_0.9.30_lpia.deb

Now follow the steps from the README.ubuntu file inside the crystalhd source:
sudo aptitude install subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev

On 8.04 and older versions, libmms is outdated and thus XBMC will not compile properly.
In this case you will have to manually compile the latest version.
wget "http://launchpad.net/libmms/trunk/0.4/+download/libmms-0.4.tar.gz"
tar zxvf libmms-0.4.tar.gz
cd libmms-0.4
./configure --prefix=/usr
make
sudo make install

After all deps has been installed and libmms has been compiled and installed you are ready to compile xbmc. cd to the crystalhd source and do:
./bootstrap
./configure
make
make install

Finito! :)

POST-install tweaks:
Enable Pixel Buffer Objects
Start xbmc without loading Gnome
And some more AppleTV specific stuff:
Set fixed cpu frequency
Various fixes for Ubuntu on ATV

Be Sociable, Share!

Tags: , , , , , , , , , , , , , , ,

14 Responses to “Compile xbmc with broadcom crystalhd support on linux”

  1. Anonymous Coward Says:

    Do you have to check out those revisions? Is there any reason not to check out the latest?

  2. MrDingle Says:

    Hey, yes, the revisions matter. The files you need has been removed from the xdmx branch which is why you have to checkout the revision specified. For the crystalhd branch, the revision specified is a known “good” one as far bleeding edge development goes..

  3. DingleBerryFan Says:

    Hey MrDingle,

    Is it possible to send me an image of your hard drive with Linux and XBMC on it so I can just restore it.

  4. MrDingle Says:

    uhm, i know its christmas soon, but im afraid not :) But seriously, its dead simple to install linux. And its semi-simple to compile xbmc after that. I’ll help you out as much as i can from here, but thats about all I can do..

  5. DingleBerryFan Says:

    Do you hang out on IRC or MSN/Skype so I can contact you.

  6. MrDingle Says:

    I think we’re gonna keep it to the xbmc forums and here :)

  7. MrDingle Says:

    Thanks to davilla@xbmc for the solution to the increasinly annoying blinking light on the front of the appletv when running linux: http://xbmc.org/forum/showpost.php?p=449632&postcount=753

    (google atvtool)

  8. MrDingle Says:

    I compiled and am now running the latest revision of the crystalhd branch; 25287

  9. nerpissad Says:

    I’ve gotten to the final step where it says that I should cd to do crystalhd source.
    I cd to /usr/include/crystalhd but I don’t seem to be able to use the commands following the instructions:
    ./bootstrap
    ..etc.
    am I not cd-ing to the correct source?

  10. nerpissad Says:

    gotten a little further already..

    now I missing a required package after executing :

    dimitri@aTV-ubuntu:~/crystalhd$ sudo ./bootstrap
    autoreconf: Entering directory `.’
    autoreconf: configure.in: not using Gettext
    autoreconf: running: aclocal –force
    autoreconf: configure.in: tracing
    autoreconf: configure.in: not using Libtool
    autoreconf: running: /usr/bin/autoconf –force
    autoreconf: running: /usr/bin/autoheader –force
    autoreconf: configure.in: not using Automake
    autoreconf: Leaving directory `.’
    autoreconf: Entering directory `xbmc/lib/libass’
    autoreconf: configure.ac: not using Gettext
    autoreconf: running: aclocal –force -I shave
    autoreconf: configure.ac: tracing
    autoreconf: running: libtoolize –copy –force
    autoreconf: running: /usr/bin/autoconf –force
    autoreconf: running: /usr/bin/autoheader –force
    autoreconf: running: automake –add-missing –copy –force-missing
    autoreconf: Leaving directory `xbmc/lib/libass’
    Please (re)run configure…
    dimitri@aTV-ubuntu:~/crystalhd$ sudo ./configure
    configure: Ensuring config.guess and config.sub exist and is executable
    checking build system type… i686-pc-linux-gnu
    checking host system type… i686-pc-linux-gnu
    checking for ccache… none
    checking for g++… g++
    checking for C++ compiler default output file name… a.out
    checking whether the C++ compiler works… yes
    checking whether we are cross compiling… no
    checking for suffix of executables…
    checking for suffix of object files… o
    checking whether we are using the GNU C++ compiler… yes
    checking whether g++ accepts -g… yes
    checking for gcc… gcc
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking for gawk… gawk
    checking whether ln -s works… yes
    checking whether make sets $(MAKE)… yes
    checking how to run the C++ preprocessor… g++ -E
    checking for grep that handles long lines and -e… /bin/grep
    checking for egrep… /bin/grep -E
    checking for ANSI C header files… yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    checking boost/shared_ptr.hpp usability… yes
    checking boost/shared_ptr.hpp presence… yes
    checking for boost/shared_ptr.hpp… yes
    checking for main in -lGL… yes
    checking for main in -lGLEW… yes
    checking for main in -lGLU… yes
    checking how to run the C preprocessor… gcc -E
    checking mad.h usability… yes
    checking mad.h presence… yes
    checking for mad.h… yes
    checking jpeglib.h usability… yes
    checking jpeglib.h presence… yes
    checking for jpeglib.h… yes
    checking samplerate.h usability… yes
    checking samplerate.h presence… yes
    checking for samplerate.h… yes
    checking ogg/ogg.h usability… yes
    checking ogg/ogg.h presence… yes
    checking for ogg/ogg.h… yes
    checking vorbis/vorbisfile.h usability… yes
    checking vorbis/vorbisfile.h presence… yes
    checking for vorbis/vorbisfile.h… yes
    checking vorbis/vorbisenc.h usability… yes
    checking vorbis/vorbisenc.h presence… yes
    checking for vorbis/vorbisenc.h… yes
    checking for main in -lbz2… yes
    checking for main in -lmysqlclient… yes
    checking for main in -ljpeg… yes
    checking for main in -lpthread… yes
    checking for main in -llzo2… yes
    checking for main in -lz… yes
    checking for main in -lssl… yes
    checking for main in -lcrypto… yes
    checking for pkg-config… /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0… yes
    checking for MAD… yes
    checking for FONTCONFIG… no
    configure: error: Could not find a required library. Please see the README for your platform.
    dimitri@aTV-ubuntu:~/crystalhd$ sudo make
    make: *** Geen doelen opgegeven en geen makefile gevonden. Gestopt.
    dimitri@aTV-ubuntu:~/crystalhd$

  11. MrDingle Says:

    Broadcom finally released the official linux driver source! :
    http://www.broadcom.com/support/crystal_hd/
    The crystalhd branch has now been merged to trunk :)
    ( http://xbmc.org/forum/showpost.php?p=468454&postcount=215 )

  12. MrDingle Says:

    osx lib/kext is out! :)

    http://dingleberry.me/2010/01/crystalhd-appletv-osx-kext-lib-is-ready-for-download/

  13. topcasinomayflow Says:

    MAYFLOWER CASINO – $ 5500 WELCOME BONUS!
    http://toponlinecasino.weebly.com

  14. Yvette Says:

    I see a lot of interesting articles on your website. You have to spend a lot of time writing,
    i know how to save you a lot of work, there is a tool that creates readable, google friendly posts in couple of minutes,
    just search in google – k2 unlimited content

Leave a Reply