Re: [gentoo-user] Gentoo on Apple TV 1

2018-08-31 Thread Mick
On Friday, 31 August 2018 22:10:48 BST Andrew Udvare wrote:
> On 8/31/18 2:41 PM, Mick wrote:
> > What I have not fathomed yet is how to compile into the mach_kernel the
> > vmlinuz and initrd the boot.efi uses to boot linux.  :-/
> 
> (Note that I am making assumptions that the Apple TV 1st gen can be
> treated kind of like a Mac.)

Right, I'm not sure if it can ...


> You probably should try rEFInd to help. You can get rid of it once you
> are comfortable. rEFInd can be avoided:
> 
> https://glandium.org/blog/?p=2830
> 
> This is what I used years back on a MacBook Pro but I was not successful
> in getting an EFI stub to boot correctly. The issue was a bug with USB
> 2/3 initialisation or something at the time in the kernel, which you
> probably won't run into. I had to use the BIOS emulation which you might
> have the ability to do. So it was rEFInd -> BIOS emulation (calls it
> Windows) -> LILO (GRUB didn't work) and then Linux.

Last time I was dual booting into a MacBook Pro a couple of years ago, I think 
I used CONFIG_EFI_STUB on linux and no boot manager at the time.  The 
MacBook's boot manager listed my gentoo bootx64.efi file which booted into 
Linux without any drama.


> Here is what it looked like (holding C at boot time):
> https://i.imgtc.com/jjBY8AF.jpg (OS is macOS, "Windows" CD in the
> picture was just Gentoo live CD).

Yes, I recall a similar picture with my installation at the time.


> Your problem can be made simpler if you have a) no desire to dual-boot
> and b) no disk encryption. This would mean you only have your VFAT
> partition for EFI and your main partition.

Well, this box has a 32bit EFI, for which a special boot.efi[1] binary was 
developed a long time ago to boot a mach_kernel executable.[2]  The 
mach_kernel is compiled to contain a compressed vmlinuz and initrd image for 
the Linux OS.  The /boot partition is on an 'AppleTV Recovery' (AF04) 
partition type with an HFS+ fs.  At least this is how OSMC and from what I 
understand older Gentoo installations were booting these devices.

However, all this was happening 10 years ago.  I don't know if I can bypass 
all this  malarkey and just compile a kernel with an EFI stub and without 
initrd to boot with.

[1] https://www.developerfusion.com/project/24162/atvbootloader/
[2] https://github.com/davilla/atv-bootloader

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Gentoo on Apple TV 1

2018-08-31 Thread Andrew Udvare
On 8/31/18 2:41 PM, Mick wrote:
> 
> What I have not fathomed yet is how to compile into the mach_kernel the 
> vmlinuz and initrd the boot.efi uses to boot linux.  :-/
> 

(Note that I am making assumptions that the Apple TV 1st gen can be
treated kind of like a Mac.)

You probably should try rEFInd to help. You can get rid of it once you
are comfortable. rEFInd can be avoided:

https://glandium.org/blog/?p=2830

This is what I used years back on a MacBook Pro but I was not successful
in getting an EFI stub to boot correctly. The issue was a bug with USB
2/3 initialisation or something at the time in the kernel, which you
probably won't run into. I had to use the BIOS emulation which you might
have the ability to do. So it was rEFInd -> BIOS emulation (calls it
Windows) -> LILO (GRUB didn't work) and then Linux.

Here is what it looked like (holding C at boot time):
https://i.imgtc.com/jjBY8AF.jpg (OS is macOS, "Windows" CD in the
picture was just Gentoo live CD).

Your problem can be made simpler if you have a) no desire to dual-boot
and b) no disk encryption. This would mean you only have your VFAT
partition for EFI and your main partition.

-- 
Andrew



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Gentoo on Apple TV 1

2018-08-31 Thread Mick
On Friday, 31 August 2018 17:22:43 BST Andrew Udvare wrote:
> On 8/31/18 11:31 AM, Mick wrote:
> > Hi All,
> > 
> > Would anyone have *recent* experience of installing and running Gentoo
> 
> plus
> 
> > Kodi on the above?  It has a Pentium-M with Apple's 32bit EFI.
> 
> It also has a GeForce Go 7300 which is still supported. 304.137 of the
> proprietary driver is still in the tree. From what I can tell you will
> be better off with the proprietary driver over Nouveau.
> 
> I question if it can handle running Kodi. Maybe you would want to use
> something else for video playback/media management?

Yes, it can run it, at least it could last year using the OSMC build based on 
Dedian.


> You definitely would want to cross-compile everything for this machine
> on a modern system, with minimal dependencies since you only have 512 MB
> of RAM to work with. You can set Kodi to start with xinitrc or you can
> have something like SDDM show Kodi as an option.
> 
> Nouveau may work for you other than hardware acceleration of video
> decoding. Maybe that CPU can handle 480P MPEG-2 and non-HD XviD but
> almost certainly not x264 or HEVC (I doubt the OpenGL renderer can help
> here). If you are willing to convert files and use lower resolutions
> then this may be acceptable.

TBH I'm mostly using it for audio, but 720p video plays quite respectably and 
by the time the TV upscales it to 1080 it shows a very acceptable picture.


> https://nouveau.freedesktop.org/wiki/VideoAcceleration/
> 
> Conflicting information here as Nvidia says there are no VDPAU features
> supported by this graphics card.
> http://us.download.nvidia.com/XFree86/Linux-x86/304.137/README/supportedchip
> s.html

What I have not fathomed yet is how to compile into the mach_kernel the 
vmlinuz and initrd the boot.efi uses to boot linux.  :-/

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Gentoo on Apple TV 1

2018-08-31 Thread Andrew Udvare
On 8/31/18 11:31 AM, Mick wrote:
> Hi All,
>
> Would anyone have *recent* experience of installing and running Gentoo
plus
> Kodi on the above?  It has a Pentium-M with Apple's 32bit EFI.


It also has a GeForce Go 7300 which is still supported. 304.137 of the
proprietary driver is still in the tree. From what I can tell you will
be better off with the proprietary driver over Nouveau.

I question if it can handle running Kodi. Maybe you would want to use
something else for video playback/media management?

You definitely would want to cross-compile everything for this machine
on a modern system, with minimal dependencies since you only have 512 MB
of RAM to work with. You can set Kodi to start with xinitrc or you can
have something like SDDM show Kodi as an option.

Nouveau may work for you other than hardware acceleration of video
decoding. Maybe that CPU can handle 480P MPEG-2 and non-HD XviD but
almost certainly not x264 or HEVC (I doubt the OpenGL renderer can help
here). If you are willing to convert files and use lower resolutions
then this may be acceptable.

https://nouveau.freedesktop.org/wiki/VideoAcceleration/

Conflicting information here as Nvidia says there are no VDPAU features
supported by this graphics card.
http://us.download.nvidia.com/XFree86/Linux-x86/304.137/README/supportedchips.html




signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Gentoo on Apple TV 1

2018-08-31 Thread Andrew Udvare
On 8/31/18 11:31 AM, Mick wrote:
> Hi All,
> 
> Would anyone have *recent* experience of installing and running Gentoo plus 
> Kodi on the above?  It has a Pentium-M with Apple's 32bit EFI.

Not exactly the same but I've tried converting old systems into usable
ones with Gentoo involved.

The Apple TV also has a GeForce Go 7300 which is still supported but
barely. 304.137 of the proprietary driver is still in the tree for the
time being. From what I can tell you will be better off with the
proprietary driver over Nouveau.

I question if it can handle running modern Kodi. Maybe you would want to
use something else for video playback/media management?

You definitely would want to cross-compile everything for this machine
on a modern system, with minimal dependencies since you only have 512 MB
of RAM to work with. You can set Kodi to start with xinitrc or you can
have something like SDDM show Kodi as an option.

Nouveau may work for you other than hardware acceleration of video
decoding. Maybe that CPU can handle 480P MPEG-2 and non-HD XviD but
almost certainly not x264 or HEVC (I doubt the OpenGL renderer can help
here). If you are willing to convert files and use lower resolutions
then this may be acceptable. You would still be able to have 6 channel
output via the HDMI or optical output.

Conflicting information here as Nvidia says there are no VDPAU features
supported by this graphics card.
http://us.download.nvidia.com/XFree86/Linux-x86/304.137/README/supportedchips.html
vs https://nouveau.freedesktop.org/wiki/VideoAcceleration/

-- 
Andrew



signature.asc
Description: OpenPGP digital signature


[gentoo-user] Gentoo on Apple TV 1

2018-08-31 Thread Mick
Hi All,

Would anyone have *recent* experience of installing and running Gentoo plus 
Kodi on the above?  It has a Pentium-M with Apple's 32bit EFI.

There are a number of pages on the interwebs, but all I could find mentioning 
Gentoo are a few years old and superseded.  The latest installation supported 
until last year was by OSMC running debian jessie.  I'd like to update this 
with Gentoo binaries but I'm not exactly sure how the boot process is 
chainloaded from Apple's kernel and in addition OSMC's debian is running 
systemd.

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.