Saturday, October 30, 2010

Hacking the Apple tv

So these are my notes over the past week or so on hacking my appletv.

I obtained an appletv generation 1 with a 160GB HD at the Ohio Linux Fest 2010. At first it just sat around for a few days before I could really get to hacking at it. The first thing that I did was to grab a friend's macbook and make a patchstick for it and installed ssh and xbmc. I've never been a big fan of boxee so I just left that off. That friend went back to college (this will come into play later). I installed binaries of rtorrent and irssi from projects on google code.

The rtorrent binary worked great while the irssi binary ran but coughed up some error about perl not being where it thought it should be. I though about creating a symlink to fix this but just decided that I'd rather get gcc running and build my own sources.
I pulled down the darwinx86-801 release from this link. I then used 'sudo hdiutil mount' to mound the .iso to the system and pulled a few binaries that I thought I would need from it to my ~/bin directory. I.E. screen, nano, vim, xsltproc, wget, and quite a few more. I added ~/bin to the $PATH variable and chmod the binaries so that I could use them. I noted that there were a few gcc packages on the disk, so I also pulled those down and attempted to install them into /usr/local/bin which was just a symlink to /mnt/local. This failed. I'm pretty sure that I'm going to have to build my own gcc sources on either an intel Tiger mac or a linux box with the proper toolchain set up. I found a possible guide for the linux setup here. Still need to get this done.
I installed the XAMPP webserver stack just for kicks and giggles. This was a stupid simple install. I had to find an older version of it though so I'm a bit wary about the security of the install. I downloaded the older binary and extracted it to /Applications which was a symlink to /mnt/Applications. Made a few changes to the configurations to what I wanted/needed at the time and fired it up. It worked like a champ. I installed rutorrent there and watched a pretty gui of my torrents. That lasted all of 10 mins.

NOTE: if your wondering why I didn't just install everything into the OSBoot partition and be done with it, the default OSBoot partition is 900MB, not enough space to really play around with installing much of anything. This is the reason for all the symlinks.

Next I installed Python, AGAIN I had to find an older version that would run on the hardware. I really need to get gcc or something working so that I can build the latest sources. I managed to get python 2.5.4 and 2.6 working on the hardware, but I have not tried anything newer yet.
I have a couple different versions of Xcode downloaded to the system. 2.5 being the newest. I've played with the gcc packages there, they run but still do not build anything that will run on the system. I'm pretty sure that this is just misconfiguration on my part and I need to read about how the thing works. I've even pulled down the pre-compiled version of gcc for macs from the sourceforge project HPC. I had to dig in the archives to find the version that worked and found this.

And last but never the least, I needed a *cast catcher. Since getcast wouldn't run with the version of python that I'm running I decided to look over to bashpodder. Bashpodder has saved me some heartache as I messed around with this little white box. I was able to download and listen to *casts through xbmc while I was working. Thanks, Linc.

As I took the device apart at OLF, I noted that the wifi card was in a mini-PCIe slot and very easily removed. After a little research, I found that you could install a HD decoder into the slot instead of wireless. I will be looking to do this in the future sometime after we move into the new house at the first of the year. 

No comments:

Post a Comment