Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Gentoo on Apple TV 1
Date: Fri, 31 Aug 2018 22:17:06
Message-Id: 7801542.9tG7oKzLiV@dell_xps
In Reply to: Re: [gentoo-user] Gentoo on Apple TV 1 by Andrew Udvare
1 On Friday, 31 August 2018 22:10:48 BST Andrew Udvare wrote:
2 > On 8/31/18 2:41 PM, Mick wrote:
3 > > What I have not fathomed yet is how to compile into the mach_kernel the
4 > > vmlinuz and initrd the boot.efi uses to boot linux. :-/
5 >
6 > (Note that I am making assumptions that the Apple TV 1st gen can be
7 > treated kind of like a Mac.)
8
9 Right, I'm not sure if it can ...
10
11
12 > You probably should try rEFInd to help. You can get rid of it once you
13 > are comfortable. rEFInd can be avoided:
14 >
15 > https://glandium.org/blog/?p=2830
16 >
17 > This is what I used years back on a MacBook Pro but I was not successful
18 > in getting an EFI stub to boot correctly. The issue was a bug with USB
19 > 2/3 initialisation or something at the time in the kernel, which you
20 > probably won't run into. I had to use the BIOS emulation which you might
21 > have the ability to do. So it was rEFInd -> BIOS emulation (calls it
22 > Windows) -> LILO (GRUB didn't work) and then Linux.
23
24 Last time I was dual booting into a MacBook Pro a couple of years ago, I think
25 I used CONFIG_EFI_STUB on linux and no boot manager at the time. The
26 MacBook's boot manager listed my gentoo bootx64.efi file which booted into
27 Linux without any drama.
28
29
30 > Here is what it looked like (holding C at boot time):
31 > https://i.imgtc.com/jjBY8AF.jpg (OS is macOS, "Windows" CD in the
32 > picture was just Gentoo live CD).
33
34 Yes, I recall a similar picture with my installation at the time.
35
36
37 > Your problem can be made simpler if you have a) no desire to dual-boot
38 > and b) no disk encryption. This would mean you only have your VFAT
39 > partition for EFI and your main partition.
40
41 Well, this box has a 32bit EFI, for which a special boot.efi[1] binary was
42 developed a long time ago to boot a mach_kernel executable.[2] The
43 mach_kernel is compiled to contain a compressed vmlinuz and initrd image for
44 the Linux OS. The /boot partition is on an 'AppleTV Recovery' (AF04)
45 partition type with an HFS+ fs. At least this is how OSMC and from what I
46 understand older Gentoo installations were booting these devices.
47
48 However, all this was happening 10 years ago. I don't know if I can bypass
49 all this malarkey and just compile a kernel with an EFI stub and without
50 initrd to boot with.
51
52 [1] https://www.developerfusion.com/project/24162/atvbootloader/
53 [2] https://github.com/davilla/atv-bootloader
54
55 --
56 Regards,
57 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature