[LINUX] How do I complile Broadcom Crystal HD driver on Ubuntu Karmic?
#16
atbrandt Wrote:I'll check playback of this file in XBMC tomorrow. Do you have any suggestions on which other files to check playback of?

Do you have a suggestion on what might be causing the Gstreamer fail?

The Gstreamer might need fixes to support totem/gstreamer greater than ubuntu 8.04. We have spent very little time with the gstreamer code, majority with driver/lib and getting something working in xbmc.
Reply
#17
atbrandt Wrote:@miseryshining: Thanks for your thumbs up. Most work is done by davilla of course. I think he's currently more focused on getting a good baseline on the atv/Hardy combination. But anyway he spent the time to give me all the hints needed. Kudos for that! That said; you might want to wait a day or so until I clean the how-to up a bit.

I know that, but right now, you're doubling the value of that work Wink You both rock!
Reply
#18
Wink 
Here goes: the how-to for using Broadcom Crystal HD card (BCM70012) on mini-PCIe mobo with Ubuntu Karmic 64 bit.

- Install Ubuntu Karmic 64 bit on your favorite motherboard with a mini-PCIe slot containing a Broadcom Crystal HD video decoding acceleration card. Or use a mini-PCIe to PCIe converter card if you only have PCIe. Make sure you have OpenGL drivers installed. Intel graphics will probably work out of the box.

- Download and unpack broadcom driver
Code:
cd ~
wget -O crystalhd.tar.gz http://git.wilsonet.com//crystalhd.git?a=snapshot;h=82bb6578c4e7cafdbbfb898e2eddea5116969e8d;sf=tgz
tar zxvf chrystalhd.tar.gz

- Install needed packages
Code:
sudo apt-get update
apt-get install autoconf g++ subversion

- Create the configure script
Code:
cd ~/crystalhd/driver/linux
autoconf

- Run configure script
Code:
./configure

- Compile driver
Code:
make clean
make
Note that 'make clean' is to make sure no files from failed attempts are messing things up. It is not always needed, but does no harm.

- Install driver
Code:
sudo make install

- Load driver
Code:
sudo modprobe crystalhd

- Compile crystalhd libraries
Code:
cd ~/linux_lib/libcrystalhd
make clean
make

- Install libraries
Code:
sudo make install

- Add XBMC SVN binary and source repositories by adding the following two lines to your sources:
Code:
deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu karmic main
Please note that 'add ppa:team-xbmc/ppa' won't work because it doesn't add the source code repository!

- Update package list
Code:
sudo apt-get update

- Install the following package separately.
Code:
sudo apt-get install libasound2-dev
This is done to avoid the following step from failing.

- Install all dependancies for compiling XBMC
Code:
sudo apt-get build-dep xbmc

- Download the latest XBMC code to the XBMC folder
Code:
cd ~
svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/ XBMC
This will take a while. Be patient, drink some coffee. Or two.

- If you want to download a specific revision number, you can do that. The next command would download revision 26614 for example.
Code:
svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/@26614 XBMC

- Create the configure script.
Code:
cd XBMC
./bootstrap
Don't use 'autoconf'. That won't work.

- Run the configure script.
Code:
./configure

- Compile XBMC
Code:
make clean
make
This will take a long time. Bake a cake to go with that coffee.

- Now you're done. You can run XBMC from your home directory by running:
Code:
cd ~
./XBMC/xbmc.bin
We're not going to install XBMC because it runs fine from your home directory, and you're likely to try out new revisions now and again. Please note that sometimes XBMC crashes immediately. Just start it again, and it will be fine.

- From within XBMC you need to select Broadcom Crystal HD as your video renderer under system->video. Also select 'Use pixel buffer objects' to make video playback start with less delay.

- Check if it's working by downloading a h264 encoded video and press 'o' during playback. It should show bcm-h264 being used as video renderer.

- To get sound working properly you might consider removing pulseaudio.
Code:
apt-get purge pulseaudio
This is not specific to the Broadcom Card.

- Also make sure you have disabled display effects under appearance preferences in Gnome. This reduces artifacts.

- Lastly you might want to disable that annoying pop-up that tells you there are updates during the best parts of the movie by unchecking Update Notifier under System -> Preferences -> Sessions -> Startup Programs (tab).

Enjoy!
Reply
#19
Good stuff! I took the bits and parts from your previous posts last night and got it running without problems. The Intel GMA 950 graphics chip works out of the box in Karmic.

The only thing i notice right now is that the fps isn't as steady as expected in one movie - it runs between 22 and 26 fps. This is a 720p movie. No dropped frames though. A rough edge in the driver? Another (1080p) movie runs much closer to 24 fps.

Thanks again for figuring it all, it was a breeze to setup (and the XBMC svn version also solved a caching problem for video streams!).

Oh, it would be nice for new visitors to have the tutorial in the opening post, so they don't have to search the thread Smile
Reply
#20
Hi,

After downloading XBMC and running ./bootstrap and ./configure

Checked out revision is 27030.

I get this:

Code:
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 188.
Use of uninitialized value $libtoolize in pattern match (m//) at /usr/bin/autoreconf line 188.
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 `.'
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 188.
Use of uninitialized value $libtoolize in pattern match (m//) at /usr/bin/autoreconf line 188.
autoreconf: Entering directory `xbmc/lib/libass'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I shave
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:7: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 188.
Use of uninitialized value $libtoolize in pattern match (m//) at /usr/bin/autoreconf line 188.
autoreconf: Entering directory `xbmc/cores/dvdplayer/Codecs/libbdnav'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory build-aux
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:40: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
Please (re)run configure...

Does the latest version of XBMC support the Broadcom Crystal HD already? Because I think I can just do it by downloading the Synaptic Package Manager.

Thank you!

UPDATE:

I just went ahead and installed from the Synaptic Package manager since I can't install via terminal. XBMC runs fine under System > Video > Playback > Render Method.

I only have:

VDPAU
Software
Advanced shaders (GLSL)
Basic shaders (ARB)
Auto Detect

No broadcom listed. I tried all of them and as expected, playback was not good.

Please help.

Thank you.
Reply
#21
Double Posting is a crime - deleted. Sorry.
Reply
#22
keplenk Wrote:Hi,

After downloading XBMC and running ./bootstrap and ./configure

Checked out revision is 27030.

I get this:

Code:
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 188.
Use of uninitialized value $libtoolize in pattern match (m//) at /usr/bin/autoreconf line 188.
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 `.'
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 188.
Use of uninitialized value $libtoolize in pattern match (m//) at /usr/bin/autoreconf line 188.
autoreconf: Entering directory `xbmc/lib/libass'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I shave
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:7: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 188.
Use of uninitialized value $libtoolize in pattern match (m//) at /usr/bin/autoreconf line 188.
autoreconf: Entering directory `xbmc/cores/dvdplayer/Codecs/libbdnav'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory build-aux
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:40: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
Please (re)run configure...

Does the latest version of XBMC support the Broadcom Crystal HD already? Because I think I can just do it by downloading the Synaptic Package Manager.

Thank you!

UPDATE:

I just went ahead and installed from the Synaptic Package manager since I can't install via terminal. XBMC runs fine under System > Video > Playback > Render Method.

I only have:

VDPAU
Software
Advanced shaders (GLSL)
Basic shaders (ARB)
Auto Detect

No broadcom listed. I tried all of them and as expected, playback was not good.

Please help.

Thank you.

Did you ever read README.ubuntu or README.linux ?
Reply
#23
Rainbow 
@keplenk:

The XBMC versions from the repositories currently do not support Crystal HD, that's why you need to compile it yourself.

On the error; did you install libtool?
Code:
sudo apt-get install libtool
Reply
#24
I followed atbrant's guide and it worked perfectly. Thank you for that. Nod I have a fully funtional XBMC with Crystal HD, perfect audio, MCE remote, etc, under Ubuntu Karmic.

Can I do all of that again, but this time make a Live version? I'd like to start from scratch, wipe out the drive and create a custom compiled version with Crystal HD, MCE remote, etc.

I've seen some guides on how to install / setup Live, but haven't seen one that discusses compiling a new version with the Crystal HD drivers, MCE remote, etc.
Reply
#25
Hi!

I did the compiling based on the how-to from atbrandt. Thanks by the way for the excellent work to all contributors!

My problem is now that the picture does how a slight pink tone.
I tried it with different videos in 1080 and 720 (like the Big Bug Bunny in 720p h264). When switching to software rendering everything is fine with the colors.

I'm using a Dell Studio Hybrid with Ubuntu Karmik.
XBMC SVN r27017
CrystalHD drivers from http://git.wilsonet.com/crystalhd.git
The bcmFilePlayFw.bin has the md5-sum: 4d329cd4a5dc5875f0ab55a6a3794ba2

I do get some messages on the syslog:
Code:
[ 8255.296127] list_index:1 rx[5] Y:10 UV:10 Int:2800 YDnSz:0 UVDnSz:0
[ 8255.422234] list_index:1 rx[6] Y:10 UV:10 Int:2800 YDnSz:0 UVDnSz:0
[ 8255.620642] list_index:1 rx[7] Y:10 UV:10 Int:2800 YDnSz:0 UVDnSz:0
[ 8255.712357] list_index:0 rx[8] Y:2 UV:2 Int:28 YDnSz:0 UVDnSz:0
(more of the messages including loading messages can be found here:
http://pastebin.com/mfc264e4)

Here is the XBMC Log File:
http://pastebin.com/m1194f672

Is my card broken?

BR
Mavogs
Reply
#26
lord-mavogs Wrote:Hi!

I did the compiling based on the how-to from atbrandt. Thanks by the way for the excellent work to all contributors!

My problem is now that the picture does how a slight pink tone.
I tried it with different videos in 1080 and 720 (like the Big Bug Bunny in 720p h264). When switching to software rendering everything is fine with the colors.

I'm using a Dell Studio Hybrid with Ubuntu Karmik.
XBMC SVN r27017
CrystalHD drivers from http://git.wilsonet.com/crystalhd.git
The bcmFilePlayFw.bin has the md5-sum: 4d329cd4a5dc5875f0ab55a6a3794ba2

Is my card broken?

BR
Mavogs

No, it's something else. xorg.conf related I bet.
Reply
#27
Great !!! This seems like the first effort to integrate the Broadcom released Driver Source into a distro(Karmic K) !!!

Now can we a step by step for noobs like for...Jaunty J !!!

the device is already on the list of upgrades.

Hoping a driver ready by then.

thanks & Great Work !!!!!!!
Reply
#28
Muzafsh Wrote:Great !!! This seems like the first effort to integrate the Broadcom released Driver Source into a distro(Karmic K) !!!

Now can we a step by step for noobs like for...Jaunty J !!!

the device is already on the list of upgrades.

Hoping a driver ready by then.

thanks & Great Work !!!!!!!

You can install the driver now, if you want to. You first need to install a few packages.
Code:
sudo apt-get install linux-source linux-headers-`uname -r` build-essential tofrodos autoconf git-core
Then pull the driver source from the GIT repository.
Code:
git clone git://git.wilsonet.com/crystalhd.git
Now cd to the newly created driver folder, and build the driver.

=========================
EDIT: As of this date (03/28/2010) the SVN git and trunk are unstable. Use the 1.0.3 tag version.
Code:
svn checkout http://crystalhd-for-osx.googlecode.com/svn/tags/crystalhd-for-osx-1.0.3 crystalhd-for-osx-1.0.3
/EDIT
=========================

Code:
cd ~/crystalhd/driver/linux
Code:
dos2unix *
Code:
autoconf
Code:
./configure
Code:
make
Code:
sudo make install
Now load the newly compiled crystalhd module
Code:
sudo modprobe crystalhd
You will also want to build and install the crystalhd library files. So cd to that folder.
Code:
cd ~/crystalhd/linux_lib/libcrystalhd
And run the standard build commands.
Code:
make
Code:
sudo make install
I have found when doing a major revision such as this, it is always a good thing to then do a reboot.

This is the way I installed the drivers. If anyone sees a mistake, please tell me!

BTW: I would like to thank Scott and Jarod for their contribution to the CrystalHD project. Without their contribution, there would be no project.
Reply
#29
compiled the latest SVN and got horrible results:
hw used: asrock ion 330 pro + broadcom crystal hd

1. while using broadcom crystal hd (the selection in xbmc is blank) i can only see what seems to be a negative b&w of the video, while playing pretty smoothly
2. while choosing VDPAU, the playback is pretty crappy ( even 720p don't get passed ~12 fps)

what gives?

great project anyway, i'm coming from a popcornhour Smile
cheers!
Reply
#30
dlbogdan Wrote:compiled the latest SVN and got horrible results:
hw used: asrock ion 330 pro + broadcom crystal hd

1. while using broadcom crystal hd (the selection in xbmc is blank) i can only see what seems to be a negative b&w of the video, while playing pretty smoothly
2. while choosing VDPAU, the playback is pretty crappy ( even 720p don't get passed ~12 fps)

what gives?

great project anyway, i'm coming from a popcornhour Smile
cheers!

xbmc.log please, svn changes rapidly so "latest" does not tell me much Smile
Reply



Logout Mark Read Team Forum Stats Members Help
[LINUX] How do I complile Broadcom Crystal HD driver on Ubuntu Karmic?0
This forum uses Lukasz Tkacz MyBB addons.