Kodi Community Forum
[AppleTV] Compiling crystalhd-for-osx Lib/Kext - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Mac OS X (https://forum.kodi.tv/forumdisplay.php?fid=56)
+---- Thread: [AppleTV] Compiling crystalhd-for-osx Lib/Kext (/showthread.php?tid=66174)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


- Sam.Nazarko - 2010-01-08

Hey,

Grab it from the 10.4.9 combo update.


- TeknoJnky - 2010-01-08

davilla Wrote:Nope, no card, no driver, no lib, no firmware, then no renderer setting.

I'm starting to think my card is failing/has failed.

How can I trouble shoot it from ssh?

it sort of worked well once using the crystalhd on a stick image/update, but I've never been able to reproduce it again, and its not working with the osx updates/instructions.

It does show up in linux on lspci as broadcom unknown something or other, and I know xbmc (linux) detects it because the broadcom crystalhd is on the renderer option, I just don't seem to get any smooth playback and high cpu usage.


On OSX/ATV, I've installed and followed the instructions (even used copy/paste), but the broadcom crystalhd option doesn't even show up (using the questors nightly build r26532).


- mtehonica - 2010-01-08

Sam.Nazarko Wrote:Hey,

Grab it from the 10.4.9 combo update.

I think I tried this but couldn't find it. Maybe I downloaded 10.4.8. Should I just be able to show package contents and it's right there?


- Coyote63 - 2010-01-09

I just reloaded the kext from the command line, and when already loaded it will tell you (in a less clear way, tho).


- Bobby Blixberg - 2010-01-09

herod98 Wrote:I used Davilla's binary
http://crystalhd-for-osx.googlecode.com/files/crystalhd-for-osx-1.0.0.zip
And the following instructions :-
http://todayguesswhat.blogspot.com/2010/01/thanks-davilla-and-xbmc-team-apple-tv.html

Excellent instructions - I did everything described there twice without visible errors.
But Broadcom Crystal HD does not show up in the video renderer settings Sad

grep -i crystal /Users/frontrow/Library/Logs/xbmc.log results in the following:

22:57:26 T:2684407808 M: 24035328 DEBUG: SECTION:LoadDLL(libcrystalhd.dylib)
22:57:26 T:2684407808 M: 24039424 DEBUG: Loading: libcrystalhd.dylib
22:57:26 T:2684407808 M: 24031232 ERROR: CrystalHD: device open failed
22:57:26 T:2684407808 M: 24031232 INFO: CrystalHD: broadcom crystal hd not found
22:57:57 T:2684407808 M: 17182720 DEBUG: SECTION:UnloadDelayed(DLL: libcrystalhd.dylib)
22:57:57 T:2684407808 M: 17178624 DEBUG: Unloading: libcrystalhd.dylib

Sad

I must say that I did _not_ cut off the two wires from the WiFi card to have the chance to revert back to original state - could that be a reason for the failure of the Crystal HD?
I also removed it and put back again, checking for correct fitting.

Does anyone have any other idea?

\EDIT: Ok, in the meantime I realized that the wires can simply be pulled of the WiFi card...
\\EDIT:

It works!

You have to enter the following (SSH of course) after rebooting apple TV:

cd /sbin
chmod 755 turbo_atv_enabler.bin
sudo ./turbo_kext_enabler.bin
sudo kextload -v 6 /System/Library/Extensions/BroadcomCrystalHD.kext

Is it possible to do that at startup of the aTV?

TeknoJnky Wrote:On OSX/ATV, I've installed and followed the instructions (even used copy/paste), but the broadcom crystalhd option doesn't even show up (using the questors nightly build r26532).

Maybe this will help you, too Wink


- TeknoJnky - 2010-01-09

@ bobby, looks like I'm getting the same type of errors, so its not just you.

http://forum.xbmc.org/showpost.php?p=477630&postcount=190

either we both have bad cards or there is some other issue(s) going with either the xbmc build or crystalhd drivers/lib/firmware.


- Bobby Blixberg - 2010-01-09

Hi TeknoJnky,

please read my 2nd EDIT - I've got it running now! Cool


- agehring - 2010-01-09

Bobby Blixberg Wrote:Is it possible to do that at startup of the aTV?

from http://code.google.com/p/crystalhd-for-osx/

Special Instructions for the AppleTV

The AppleTV OS will not allow loadoing of kexts until you run Turbo's kext enabler (http://0xfeedbeef.com/appletv/) . Install the kext and setup loading in "/etc/rc.local". You also need the crystalhd library and firmware installed.

sudo cp -r BroadcomCrystalHD.kext /System/Library/Extensions/
sudo -S chmod -R 755 /System/Library/Extensions/BroadcomCrystalHD.kext
sudo -S chown -R root:wheel /System/Library/Extensions/BroadcomCrystalHD.kext
Your "/etc/rc.local" should have something like this:

# rc.local
/sbin/turbo_kext_enabler.bin

/sbin/kextload -v /System/Library/Extensions/BroadcomCrystalHD.kext
If "/etc/rc.local" does not exist, make it

sudo touch /etc/rc.local
sudo chmod 755 /etc/rc.local
sudo chown root:wheel /etc/rc.local
Copy the library and firmware into place, this assumes you have already copied these items to the AppleTV. Warning, the firmware name will change to bcm70012fw.bin in the near future.

sudo cp libcrystalhd.dylib /usr/lib/
sudo chmod 755 /usr/lib/libcrystalhd.dylib

sudo cp bcmFilePlayFw.bin /usr/lib/
Enjoy


- xpo_dk - 2010-01-09

Damm I'm way too stupid to figure all this out, but installed the Crystal card and is waiting until it's possible for us "dummies"...

But damm you guys is doing a great job!


- Bobby Blixberg - 2010-01-09

agehring Wrote:from http://code.google.com/p/crystalhd-for-osx/
The AppleTV OS will not allow loadoing of kexts until you run Turbo's kext enabler (http://0xfeedbeef.com/appletv/) .

Yes - and on http://0xfeedbeef.com/appletv/ you can read this:

"You'll need to run turbo_kext_enabler and kextload your extensions each time you reboot your AppleTV."

Wink


- i5Js - 2010-01-09

davilla Wrote:XCode, macports (10.4SDK), crystalhd headers (intel build). buildbot (is in macports), there's some trivial setup and a launchd plist.

The initial svn checkout takes the longest, once that is done, it's cached and builds are pulled from it following an svn update. The dmg upload is next. Impact is pretty minimal, I'm on a 3Mb DSL line and am handling both i386 and ppc builds, don't notice it except when I'm using the MacMini for active development. A firewall does not matter, slaves contact the master.

is there any instructions to setup it? I've buildbot installed and ready to help. Smile


- TeknoJnky - 2010-01-09

so uhm yeah, I feel like a retard...

My rc.local had the turbo kext, but of course my sbin was missing it.

now I'm getting the bcm crystalhd rendrer and cpu is down to 30-50%, so it seems to be detected and working...

but still get alot of stuttering and even a local kill bill vol1 m2ts won't play more than a few fps


@ bobby, the rc.local file is supposed to take care of loading on reboot

(or so I thought), but actually it doesn't seem to be doing that.

edit more duhhhhh, rc.local had turbo kext instead of turbo atv
now that I fixed my rc.local, it loads the turbo atv and crystalhd kext correctly on boot.


- davilla - 2010-01-09

TeknoJnky Wrote:so uhm yeah, I feel like a retard...

My rc.local had the turbo kext, but of course my sbin was missing it.

now I'm getting the bcm crystalhd rendrer and cpu is down to 30-50%, so it seems to be detected and working...

but still get alot of stuttering and even a local kill bill vol1 m2ts won't play more than a few fps


@ bobby, the rc.local file is supposed to take care of loading on reboot

(or so I thought), but actually it doesn't seem to be doing that.

blib a ff on that m2ts TeknoJnky.


- TeknoJnky - 2010-01-09

ok not sure what that means exactly, this?

Code:
20:19:19 T:52662272 M:  3796992   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:19 T:52662272 M:  4165632   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:19 T:52662272 M:  4087808   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:19 T:52662272 M:  3915776   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:19 T:53996544 M:  3911680   DEBUG: CrystalHD: SetDropState... 1
20:19:19 T:52662272 M:  3874816   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:19 T:52662272 M:  4165632   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:20 T:52662272 M:  4124672   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:20 T:52662272 M:  4083712   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:20 T:53996544 M:  4079616   DEBUG: CrystalHD: SetDropState... 0
20:19:20 T:52662272 M:  3874816   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:20 T:52662272 M:  4030464   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:20 T:52662272 M:  4001792   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:20 T:52662272 M:  3911680   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period
20:19:20 T:53996544 M:  3907584   DEBUG: CrystalHD: SetDropState... 1
20:19:20 T:52662272 M:  3805184   ERROR: ffmpeg[3239000]: [NULL] non-existing SPS 1 referenced in buffering period

http://pastebin.com/mf982560


- m_lopez_h - 2010-01-09

herod98 Wrote:I used Davilla's binary

http://crystalhd-for-osx.googlecode.com/files/crystalhd-for-osx-1.0.0.zip

And the following instructions :-

http://todayguesswhat.blogspot.com/2010/01/thanks-davilla-and-xbmc-team-apple-tv.html

I followed the instructions from herod98's post and eventually got everything working. CrystalHD shows up as a rendering option and works great (thanks Davilla!). I'm now able to decode HD with the Apple TV.

Going forward, do I need to update the crystalhd lib / kext manually or will Launcher 3.x be updated to download both XBMC and crystal HD necessary files?