[mythtv-users] AppleTV with Linux

Scott D. Davilla davilla at 4pi.com
Wed Feb 20 19:10:39 UTC 2008


>This is great news.  A low cost, small, low-noise HD capable 
>frontend is like the holy grail.  Out of curiousity, how extensive 
>are the changes you made to a base kernel in order to get to this 
>point?  Meaning can someone with reasonable linux experience be able 
>to get a box to the point you have?
>

I'm currently backing out kernel changes that were made over the past 
few months in trying to resolve the glitch. I might drop that path 
and jump straight to the current MythBuntu distro kernel and restart 
with that.

With my new bootloader, kernel changes are minimal and are isolated to;
1) imacfb (for console support)
2) realtek (for analog audio support)
3) IR support (there are two methods and I need to figure out which)

If I do it correctly, I might not have to rebuild the kernel, just 
two or three kernel modules.

nvidia driver is currently the current 169.09 but I think the 
previous versions will be ok. My gpu/vram clock adjustments using 
nvidia-settings can be done after the nvidia driver is loaded so it's 
just a script somewhere.

Given reasonable linux experience, it's pretty easy once you get past 
the point of creating the proper gpt GUID partitions. There are rules 
and required gpt GUID formats which can only be created by a patched 
parted under Linux or under OSX.

You do have to make a decision of A) using the original internal HD 
and resizing the last partition to add an ext3 root filesystem or B) 
replace the internal and install linux to the new drive. If you 
choose A) then backing up the original partitions is highly 
recommended.

Since the AppleTV boots linux using a secondary bootloader that looks 
like a darwin mach_kernel, you have to keep the first three partition 
GUIDs intact to get boot.efi to load the mach_kernel loaded. In the 
past, one needed a bunch of OSX bits but I've eliminated that 
dependency. You don't actually need two of the three original GUID 
partitions but it seems to boot faster if they are present.

For testing, I boot on a USB pen drive which has my rescue tools and 
sshd. From that, I have a script that does a kexec to the kernel on 
the internal drive. That way if I hose the internal kernel, I can 
recover quickly.

My current internal drive has three gpt partitions formatted the way 
the appletv firmware expects. Then an ext2 for /boot and ext3 for 
root and swap. This is "old style" to make the two flavors of older 
bootloaders happy. The new bootloader will not require a separate 
ext2 /boot and everything can live under root. It should also be 
possible to boot using an external USB HD using the new bootloader. 
Then you would not even have to crack the box (which is pretty easy).

The real easy way to install is to create the partitions using the 
patched parted and install a linux distro using an existing Linux 
box. Then add the bootloader bits to correct partitions and grap a 
copy of boot.efi from the appletv 1.1 update on the web. boot.efi is 
the only file that cannot be distributed. chroot into this rootfile 
system and rebuilt the kernel/initrd. Stick it in (or attach via USB) 
and go.


Scott
-- 
-----------------------------------------------------------------------
Scott D. Davilla                       Phone: 919 489-1757 ext 13 (tel)
4pi Analysis, Inc.                            Fax:   919 489-1487 (fax)
3500 Westgate Drive, Suite 403                email: davilla at 4pi.com
Durham, North Carolina  27707-2534            web: http://www.4pi.com         



More information about the mythtv-users mailing list