Linux 3.2.17 on apple tv

244 views
Skip to first unread message

Bharath Ramesh

unread,
May 20, 2012, 8:34:31 PM5/20/12
to atv-boo...@googlegroups.com
I have been trying to get the Ubuntu precise kernel booting on the apple tv. I used the initrd and vmlinuz to create the mach_kernel. I had no luck in booting into trying every option to vga that people have tried. I finally downloaded the latest 3.2.17 kernel from kernel.org. I created the kernel configuring it using the i386_defconfig, I only modified the processor type to pentium-m from pentium-pro. This doesnt boot either, I am left with display stuck showing "ATV: Staring Linux...". I was wondering what I need to change in the kernel config to get the kernel to boot directly. I am able to kexec into this kernel without any issues.

Scott D. Davilla

unread,
May 21, 2012, 1:04:16 AM5/21/12
to atv-boo...@googlegroups.com
I would look into kernel framebuffer issues, in addition the atv efi
firmware does not contain any traditional pc bios so any bios calls
the kernel makes will fail. This includes vbios. While there does
exist an nvidia vbios, it has not been setup. Only when X11 launches
with, does the nvidia X11 driver search, find and setup vbios.

The existing boot kernel used to construct the mach_kernel is
carefully configured to support the efi handoff that the code in
atv-bootloader does. Step outside this configuration and your kernel
will not boot or might boot and panic later but you will have no
indication. Also, any code changes that have occurred to boot
structures that are expected in atv-bootloader.

FYI, it took about three hard months to figure out the boot and
handoff to the kernel. I seriously doubt that just picking the
i386_defconfig and setting the processor is enough. You must match
how the existing boot kernel is configured and also take account any
code changes to the boot sequence.

The code in atv-bootloader is well commented, if none of that code
makes sense, then you need to spend some time learning how the linux
kernel boots before you can achieve your goal.

Bharath Ramesh

unread,
May 22, 2012, 9:42:27 AM5/22/12
to atv-boo...@googlegroups.com
Thanks for your detailed reply, I will first try to get the newer kernels config match what exists in the 2.6.39 kernel config which is part of current atv-bootloader recovery release. I will see if that boots, else I will start trying to debug.

Bharath Ramesh

unread,
Jun 2, 2012, 10:53:23 AM6/2/12
to atv-boo...@googlegroups.com
Thanks for all the help Davilla I now have a booting 3.2.17 using the mach_kernel it is an extremely bare bone kernel. If any one wants I can share the .config. I am now going to work on getting working xbmc set up.

Travis Hansen

unread,
Jun 2, 2012, 12:19:52 PM6/2/12
to atv-bootloader
Bharath

That's awesome. Something changed around 3.0 and I've never seen
anyone have a working kernel past the 2.6.X series. I would like a
copy of the config.

If you're looking to run only xbmc a good choice is http://openelec.tv
currently the install script is setup to run in a dual-boot setup but
I did the initial work to make a single boot process work as well.
Perhaps with your config I can revist and get single boot working
again!

Bharath Ramesh

unread,
Jun 2, 2012, 5:38:31 PM6/2/12
to atv-boo...@googlegroups.com
On Saturday, June 2, 2012 12:19:52 PM UTC-4, Travis Hansen wrote:
Bharath

That's awesome.  Something changed around 3.0 and I've never seen
anyone have a working kernel past the 2.6.X series.  I would like a
copy of the config.

I am attaching the config for your perusal. I would warn you that I am yet to figure out the reason why I am able to get only 64MB of the RAM when I use vesafb. If I enable nouveau from staging then I get to see the entire 256MB of RAM, this is very much unlike the hardy kernel that I am currently running. Enabling nouveau implies the loss of using nvidia drivers. If you could help in getting over this hurdle it would be really awesome.

If you're looking to run only xbmc a good choice is http://openelec.tv
currently the install script is setup to run in a dual-boot setup but
I did the initial work to make a single boot process work as well.
Perhaps with your config I can revist and get single boot working  
again!

I am currently running Sam's crystalbuntu, I am hoping to move to precise and xbmc as xbmc is now part of debian. Nothing against openelec.tv, just that I am comfortable with ubuntu.

 --
Bharath
linux-3.2.17.config

Scott D. Davilla

unread,
Jun 3, 2012, 8:58:32 AM6/3/12
to atv-boo...@googlegroups.com
>I am attaching the config for your perusal. I would warn you that I
>am yet to figure out the reason why I am able to get only 64MB of
>the RAM when I use vesafb. If I enable nouveau from staging then I
>get to see the entire 256MB of RAM, this is very much unlike the
>hardy kernel that I am currently running. Enabling nouveau implies
>the loss of using nvidia drivers. If you could help in getting over
>this hurdle it would be really awesome.

Is the nvidia driver stealing system ram ? You can turn that off.

Bharath Ramesh

unread,
Jun 3, 2012, 3:34:00 PM6/3/12
to atv-boo...@googlegroups.com
Its not the nvidia driver stealing system ram, that I can turn off from xorg.conf.
This just minimal command line only installation which doesnt see the entire
256MB of ram. Dmesg output

[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Initializing CPU#0
[    0.000000] Initializing HighMem for node 0 (00000000:00000000)
[    0.000000] Memory: 61412k/261120k available (2861k kernel code,
9512k reserved, 1056k data, 372k init, 0k highmem) 

Bharath Ramesh

unread,
Jun 3, 2012, 8:29:54 PM6/3/12
to atv-boo...@googlegroups.com
I have been trying to debug this issue further. I am not sure if this has anything to do with the framebuffer driver. It seems mostly related to the size of the kernel. I am sure I am missing some option which is causing the kernel only to load the close to 64MB of the available memory once it falls below particular size. Any suggestions on how to further debug this issue is greatly appreciated.

--
Bharath
Reply all
Reply to author
Forward
0 new messages