Enable Kext Loading

From AwkwardTV
Jump to: navigation, search

A lot of .kexts are missing on Apple TV (like missing USB support, no mount_smbfs, ...). Users familiar with OS X kernel extensions will know from experience that a stock 10.4.7 or 10.4.8 smbfs.kext will not load/link against the ATV kernel. But thanks to the great work of Turbo, it's now possible to load kernel extensions from Intel Macs.

DISCLAIMER

This process would not be available without the hard work of Turbo and he deserves all the credit for this accomplishment. Please donate on his site. http://0xfeedbeef.com/appletv/

This guide here is based on Turbos guide and Enable USB Storage, where the kextloader originally has been developed for.


Requirements

Turbo's Excellent Kext Enabler

Follow Turbo's instructions accurately(!) to create the /mach and /mach.sym files, a reboot is required. Execute the following commands on your Apple TV:

sudo mount -uw /
sudo touch /.readwrite
sudo sync

Next, reboot the Apple TV. When it comes back up, you'll have 2 new files /mach and /mach.sym (if you don't, something went wrong!). Now you can make it read-only again:

sudo rm /.readwrite
sudo sync
sudo mount -ur /

Now you have to make the kernel load your .kexts, which it does not yet. Download Turbo's excellent kextloader (turbo_kext_enabler.bin) from http://0xfeedbeef.com/appletv/ and copy it to your Apple TV. After that you have to make it executable and run it:

chmod +x turbo_kext_enabler.bin
sudo ./turbo_kext_enabler.bin

Now you can load any kernel extensions! This has been reported to work with Apple TV 1.0 as well as 1.1. This also works properly on Take2 installs, all teh way up to 2.4. Not all kexts will load, e.g. smbfs.kext from 10.4.10 does not load, but from 10.4.9 (from update) works.

Ensure your owner and permissions are correct

sudo chmod -R 755 /System/Library/Extensions/<YOUR_EXTENSION>.kext
sudo chown -R root:wheel /System/Library/Extensions/<YOUR_EXTENSION>.kext

Load <YOUR_EXTENSION>.kext

After that you'll need to load <YOUR_EXTENSION>.kext:

sudo kextload /System/Library/Extensions/<YOUR_EXTENSION>.kext

If there is an error, you should add option -v 6 to the kextload command, to see more debug info.

Note that Apple TV will not load the <YOUR_EXTENSION>.kext after a reboot automatically. To make this persistent, you can add something like this to your /etc/rc.local:

 /your/path/to/turbo_kext_enabler.bin kextload /System/Library/Extensions/<YOUR_EXTENSION>.kext

Applications of Turbos kextloader