• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 10
Apple TV news
#1
This is an update on running linux on the appletv. The xvmc hang/video corruption (green block) has been solved. This means that reliable xvmc assisted HD decode of up to 1080i mpeg2 content is now possible. 1080i takes about 60 percent cpu in mplayer, mythfrontend is about 10 percent higher under current svn/trunk.

The trick was to underclock the gpu from 360MHz to 200MHz and overclock the vram from 720MHz to 800MHz. Other setting might also yield similar results. This problem has been the major stumbling block to reliable 1080i mpeg2 content decode and viewing on the appletv platform under a linux os.

Another performance point is 720p mpeg2 decode in software at 45-50 percent cpu. I've not done any mpeg4/h264 tests, I have no content in that format.

Once I finalize this round of testing and finish the new bootloader, I'll take a stab at getting XBMC (linux) running on the appletv for kicks. The OSX port has me interested.

See the following links if you are interested and want to play too.

http://wiki.awkwardtv.org/wiki/Linux_on_Apple_TV
http://wiki.awkwardtv.org/wiki/Apple_TV_Linux_Kernel
http://wiki.awkwardtv.org/wiki/Linux_on_Apple_TV/Debian
http://wiki.awkwardtv.org/wiki/Apple_TV_Linux_IR_Howto
http://forum.awkwardtv.org/viewforum.php?f=23

Scott
Reply
#2
Cool! (Note however that there is no XvMC support under Mac OS X, only Linux).

You should checkout this LiveUSB project => http://forum.xbmc.org/showthread.php?tid=30857

Big Grin
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
There was some work done in the past to pass mpeg2 to the non-doucumented API under the DVD framework. This enabled hardware accelerated mpeg2 decode and actually worked. Search for Accellent, this is the original source. Also this code is current in mythfrontend for osx but no one is actively working on it.

This is also something I'm thinking about. It will have to wait until the boot loader is finished.
Reply
#4
Thumbs Up 
FWIW, if you can pull this off I'd be THRILLED to take my ATV back out of the box where it's been gathering dust and put it to good use. My attempts to get decent playback from it were unsuccessful and both I and a friend set them aside for XBMC on Linux w\PC hardware. If this can be made anywhere near as easy to setup I'll be all over it. Frankly I'd written off the ATV as being too weak, this is good news indeed.

I'd appreciate any details you'd care to provide so far as specific distro or the path that you followed to get there, I see a thread on Ubuntu, yes? I'm NOT Mac savvy but my friend is, I've got no issues pulling the drive etc. but have no access to a Mac myself. Might be fun to try if it's not too far over my head!Oo

Godspeed sir!
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#5
Started with an Ubuntu 7.04 desktop, I have several Ubuntu boxes running separate mythbackend/frontend. Also Macs too.

One of my design requirements was everything must be build-able on OSX and Linux so the bootloader will not require a doner Intel MacOS. It only requires boot.efi which I can't distribute. It can be found on the internal hd (which means pulling it) or you can download the r1.1 update and pull it off that. You do have to decide to A) backup and use the existing drive or B) use a replacement and keep the original intact. It might also be possible to use an external USB hard drive but that might effect swap performance.

The whole thing should be easy to install if you have ever installed Linux.
Reply
#6
I've installed Linux more times than I can count here recently but always from something pretty simple like Ubuntu. I understand not distributing the EFI, not an issue as I've got the original drive and a spare thanks to eBay. Pulling the drive is no biggie, it's seal has been popped before. If there's someplace specific I should look for a "start here" sort of spot I'm all ears. Else I'll happily stand on the sidelines a bit and cheer you on - you've caught my interest and that of others for sure!
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#7
The "Linux" forum is here
http://forum.awkwardtv.org/viewforum.php?f=23

Here are a few wiki pages
http://wiki.awkwardtv.org/wiki/Linux_on_Apple_TV/Debian
http://wiki.awkwardtv.org/wiki/Apple_TV_Linux_Kernel
http://wiki.awkwardtv.org/wiki/Linux_on_Apple_TV

The last one is really detailed and but can be very confusing. you will see references to http://www.mythic-beasts.com/resources/appletv/ but you need to be careful as it's very dated and there are several versions of mb_boot_tv (one of the bootloaders) of which only one works.

Basically all Intel Apple computers (including teh AppleTV) use gpt as a partition format.

The first partition is labeled "EFI" and is FAT but is has a special GUID. This partition is typically empty and only used for RAID drives on OS X desktop or server computers. The AppleTV disk does not really need this partition but I always include it because you never know.

The second partition is labeled "Recovery". It's a HFS-plus format but it also has a special GUID. The AppleTV keeps a disk image (dmg) of the OSBoot files. It's called Recovery because the AppleTV firmware can restore the next (OSBoot) partition in case it detects problems. When you select "restore" from the configure menu, that's where the AppleTV pulls an OS image.

The third partition is labeled "OSBoot". It's also a HFS-plus format and has the normal GUID for HFS-plus. This holds the normally booted AppleTV OS (which is a derivative of OS X 10.4.7) and FrontRow.

The fourth partition is labeled "Media". It's also HFS-plus and it only holds synced content. This partition can be reduced in size if you want to create more partitions for linux usage.

The AppleTV firmware boots by looking for a file called boot.efi on OSBoot. Boot.efi loads a darwin mach kernel (called mach_kernel) and drivers (kext). If it can't find boot.efi, it then looks for boot.efi on Recovery. We boot Linux by taking advantage of the recovery mode of the firmware. When the AppleTV OS boots, it resets an internal boot attempt count. If the count goes to zero, the firmware will look over the USB bus for a Mass Storage Device with a Recovery partition and attempt boot. You can also force the USB probe by holding down the "menu" and "-" buttons on the IR remote at powerup.

So to get Linux to boot, we create a proper Recovery partition with boot.efi and a mach kernel that is actually a secondary Linux boot loader. The firmware loads boot.efi which loads our "mach kernel" and a dummy kext, at that point we have control and own the box.

That's a short primer that will help make sense of the above URL links and forum discussions.

One final def. Patchstick is a USB pen drive that enabled one to install sshd into the AppleTV OS. Don't worry too much about a PatchStick, we can build a linux based Patchstick that takes much less effort plus we don't really need it.

S.
Reply
#8
Thumbs Up 
Thank you! As it happens I'm somewhat familiar with EFI and have a patchstick for my ATV - a friend with a MAC built it but I understand the concept. I'm aware of getitng it to boot off the USB via the remote too. I knew it had a recovery partition etc. but I appreciate the explanation. I remember when I pulled the drive and looked at it - looked WAY different than it did via SSHShocked I might have been looking at the wrong partition heh.

Anyway, that wasn't complete Greek and I've been doing some reading on the links posted earlier. Where it seemed a little confusing to me was seeing references to Gentoo when I thought Ubuntu was what you were using.Huh

Not to worry, I'll read more. Sounds like a pretty interesting project and that you've made some terrific progress! I really look forward to hearing how XBMC runs on the ATV when Linux is native.Nod

Thanks for taking the time at writing up an explanation of terms etc!
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#9
Consider this a call for developers/testers in creating an AppleTV based XBMC distribution. I've svn commited atv-bootloader, it's still a work in progress but the basics of a kexec based appletv bootloader are present and working. It does not auto-boot (manual kexec'ing works) a secondary kernel yet and that's where I need some assistance in creating bash script tools to automatically locate and parse the default grub menu.lst. All code contributed must be GNU v2.

The first target is a USB based XBMC for Linux. The idea here is to create a USB pen drive based distro that one can boot XBMC for Linux without have to alter the original internal hard drive. Stick the USB pen in, re-boot and boot into XBMC instead of the AppleTV OS. I'd rather it be debian (Ubuntu) based as that's what I know best and it will most likely require at least a 4GB pen drive.

atv-bootloader is located here (http://code.google.com/p/atv-bootloader/source/browse). The svn commit has both source and compiled bits so one does not need to recompile unless the initrd contents change. The initrd creation Makefile will be posted in a few days and it will support running a secondary bootloader script located outside the initrd.

atv-bootloader does not require EFI patches to the kernel and supports vesafb as a console framebuffer. I'm currently using standard 2.6.24.3 as the boot kernel but it should be able to kexec boot earlier kernels without problem.

Send me a PM if you want to contribute and I'll PM back with my email address so we can take this off list until we have something to really brag about.

Scott
Reply
#10
Lightbulb 
davilla Wrote:Consider this a call for developers/testers in creating an AppleTV based XBMC distribution. I've svn commited atv-bootloader, it's still a work in progress but the basics of a kexec based appletv bootloader are present and working. It does not auto-boot (manual kexec'ing works) a secondary kernel yet and that's where I need some assistance in creating bash script tools to automatically locate and parse the default grub menu.lst. All code contributed must be GNU v2.

The first target is a USB based XBMC for Linux. The idea here is to create a USB pen drive based distro that one can boot XBMC for Linux without have to alter the original internal hard drive. Stick the USB pen in, re-boot and boot into XBMC instead of the AppleTV OS. I'd rather it be debian (Ubuntu) based as that's what I know best and it will most likely require at least a 4GB pen drive.
Good initiative, ...but why not use Ubuntu Mobile as the base? Ubuntu Mobile is what we are most likely going to base the official XBMC LiveDistro on when we get to that stage. l.capriotti have already created a LiveUSB proof of concept, (he might even be willing to help if he owns an Apple TV), see:
http://forum.xbmc.org/showthread.php?tid=30857
http://www.ubuntu.com/products/mobile
http://wiki.ubuntu.com/MobileAndEmbedded

more discussion about LiveUSB in these topic threads:
http://forum.xbmc.org/showthread.php?tid=31768
http://forum.xbmc.org/showthread.php?tid=30752
http://forum.xbmc.org/showthread.php?tid=27428

[EDIT:] Would it by the way be possible to make one image that could be bootable on both the Mac mini and the Apple TV?, or would the fact that the Mac mini uses Intel GMA950 GPU hardware and the Mac mini uses NVIDIA cuase to much problems? ...I think that if it would be possible then you would get many more people willing to help out.

Best of luck!

[EDIT]: PS! You might want to consider creating a new topic-thread to announce your intentions and recruit people to the cause, as otherwise I think your post will be lost in this existing topic-thread.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#11
I've seen the XBMC Ubuntu Mobile thread. It's interesting and I'll most likely start there. Ubuntu Mobile on x86 is still pretty recent. I was actually think something more along the lines of how MythBuntu works but this is not fixed in stone.

AppleTV or MacMini does not really matter. The AppleTV need atv-bootloader to boot Linux, a MacMini can boot Linux directly using either an EFI bootloader (elilo) or grub via the BIOS compatibility layer. While the USB pen drive must be gpt partition based, gpt does support a MBR compatibility. I've not tried it but one should be able to create a USB pen drive that supports both types.

Nvidia vs Intel does not matter, that's an X11 config issue. I'm also following the XBMC on OSX development and that works fine on my 1st gen 1.6GHz intel MacMini so a Linux based XBMC should be fine too.

If I don't get any responses, I'll create a new thread, too late now.

Scott
Reply
#12
GeeXboX (LiveCD based) is probably also a good project to take inspiration from, see:
http://www.geexbox.org/en/index.html
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#13
I would look at LinuxMCE. They have a wizard that can be started at boot time (by clicking shift) which guides you through a wizard. they also have a distro...

http://wiki.linuxmce.org/index.php/AVWiz...ep_by_Step
Reply
#14
boot parser is done, I finally created a c command-line app that can parse grub, kboot, syslinux, ioslinux and mb_boot_tv bootloader config files, extract and format for a kexec load command. Now to integrate with the initramfs and soon, auto-boot.
Reply
#15
I know where there are at least 3 aTVs just waiting to check this out. Mine being one of them but it's on the opposite coast for the moment. I'll have it home soon enough and would be happy to help test as would friends I think. BIG thumbs up for working on this, thank you!!
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 10

Logout Mark Read Team Forum Stats Members Help
Apple TV news1