View previous topic :: View next topic |
Author |
Message |
milktoast84 n00b
Joined: 03 Oct 2014 Posts: 17
|
Posted: Sat Oct 18, 2014 4:56 am Post subject: EFI stub requires EFI framebuffer? |
|
|
I'm trying to configure my kernel so it's happy with the NVIDIA card on my Macbook Air from 2010, but I discovered a funny quirk that I haven't wrapped my mind around.
The EFI frame buffer option seems to be required for my efi stub to boot? (The screen stays on apple white, and the mouse light turns off) Is that normal? Expected? (It may be interfering with my nvidia driver, if so I hope not) Would switching back to rEFInd directed at a grub loader change anything? |
|
Back to top |
|
|
s4e8 Guru
Joined: 29 Jul 2006 Posts: 311
|
Posted: Sat Oct 18, 2014 7:28 am Post subject: |
|
|
EFI fb or KMS driver is required in EFI mode. In nvidia case, you must choose between EFI fb or nouveau. |
|
Back to top |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Sat Oct 18, 2014 2:15 pm Post subject: |
|
|
s4e8 wrote: | EFI fb or KMS driver is required in EFI mode. In nvidia case, you must choose between EFI fb or nouveau. |
:sigh:
EFI_FB does not conflict with intel KMS, so I doubt with does with nouveau either.
It's (after all) only something for FRAMEBUFER_CONSOLE to tap into before the correct driver takes over. |
|
Back to top |
|
|
s4e8 Guru
Joined: 29 Jul 2006 Posts: 311
|
Posted: Sun Oct 19, 2014 11:43 am Post subject: |
|
|
yes. KMS supersede EFI fb. |
|
Back to top |
|
|
milktoast84 n00b
Joined: 03 Oct 2014 Posts: 17
|
Posted: Wed Oct 22, 2014 4:19 am Post subject: |
|
|
Quick update:
Dropped efi entirely.Turns out the only reason my kernel works is because some key functionality is taken care of by switching to an efi stub. No boot yet.
Screen goes black, no backlight, then heads to next rEFInd boot option.
Could KMS be what I'm missing? I'm not even sure if it's already enabled( he says like a smiling crazy person on the edge)
Any other guess at what I missed in the kernel? What the stub provides?
All the other modules enabled were detected by a script I ran with an installed Debian desktop. Then I just applied as many as would fit, pretty much all of them with no trouble. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Wed Feb 22, 2023 8:34 am Post subject: |
|
|
i know this is a necro but was searching for how to properly get my efi boot machine to boot.
as of 2023 witb a 6.1 kernel,
- appears that efi stub is not necessary if your bootloader knows how to deal with standard linux kernels. grub will load your kernels whether it has the stub or not. i think that refind and definitely using efishell or efibootmgr will require the stub. however having efi support is recommended so you can run efibootmgr and muck with your efivars... as well as earlier console support...
- if you don't have config_fb_efi you won't get boot progress, seems screen will stay blank as it goes through init. If it never loads a kms driver, you'll be wondering if you have a dead machine or not. however I just tried - if i did compile CONFIG_FB_EFI into the kernel and included the nouveau kernel driver as a module, it seems that the framebuffer driver did relinquish control during init and I got KMS and X starts fine.
I don't have a mac however, this is a supermicro board with uefi... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1972
|
Posted: Wed Feb 22, 2023 10:17 am Post subject: |
|
|
eccerr0r wrote: | ...
as of 2023 witb a 6.1 kernel,
- appears that efi stub is not necessary if your bootloader knows how to deal with standard linux kernels. grub will load your kernels whether it has the stub or not. i think that refind and definitely using efishell or efibootmgr will require the stub. however having efi support is recommended so you can run efibootmgr and muck with your efivars... as well as earlier console support...
. |
If you have a boot manager - grub, rEFInd, even the Microsoft thingy if you can find out how to configure it for linux (?), you do not need EFI_STUB. The stub provides your kernel with a fake bootmenager API, so your box's EFI implementation will run your kernel instead of a true bootmanager; if you have a separate bootmanager, the stub is just unused cruft. Using the stub instead of a boormanger means a quicker and simpler boot, but losing the flexibility of a boot-time menu of possible boot options.
Using efibootmgr or directly manipulating EFI variables requires (not surprisingly) EFIVARS support built into the kernel. That's independent of both the FB_EFI and EFI_STUB, though if you use the stub, you will almost certainly want to use efibootmanager to handle your boot options, and so want EFIVARS. You want FB_EFI if you are using EFI_STUB to get early kernel console output. Once you're past the early console stuff, the kernel should switch to your preferred video hardware driver.
None of this has changed for ages - probably before kernel 4, I forget. _________________ Greybeard |
|
Back to top |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1445
|
Posted: Wed Feb 22, 2023 11:40 am Post subject: |
|
|
Goverp wrote: | Using the stub instead of a boormanger means a quicker and simpler boot, but losing the flexibility of a boot-time menu of possible boot options. |
What I do is having everything enabled in the kernel and two entries in the efi loader, one for grub and one for my preferred efi-stub kernel. Whenever I decide to update the prefered efi-stub kernel, I always override the newer kernel over the older using the same file names. This way I have both efi stub and grub and I don't recreate the efi bootloader entry. And in the same time I don't lose the flexibility of a boot-time menu. I prefer it that way as it only requires opening my laptop and no other intervention.
That's my 50 cents on the topic.
Best Regards,
Georgi |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1507 Location: South America
|
Posted: Wed Feb 22, 2023 1:22 pm Post subject: |
|
|
As far as I know, rEFInd does need CONFIG_EFI_STUB=y, because it boots Linux by doing what GRUB would call chainloading another (EFI) boot manager –the EFI stub in this case—. Only GRUB and Syslinux support the Linux/x86 boot protocol (see /usr/src/Linux/Documentation/x86/boot.rst) so they can be given 'plain' bzImages.
Syslinux, on the other hand, unlike GRUB and rEFInd, does not have filesystem drivers, so it can only load bzImages and initramfs from the FAT-formatted EFI System Partition... _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Wed Feb 22, 2023 5:27 pm Post subject: |
|
|
logrusx wrote: | That's my 50 cents on the topic.
|
damn this inflation!!!
Alas hopefully setting the record straight, hate threads that seem to come to improper conclusions. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1972
|
Posted: Wed Feb 22, 2023 7:43 pm Post subject: |
|
|
GDH-gentoo wrote: | As far as I know, rEFInd does need CONFIG_EFI_STUB=y, because it boots Linux by doing what GRUB would call chainloading another (EFI) boot manager –the EFI stub in this case—. Only GRUB and Syslinux support the Linux/x86 boot protocol (see /usr/src/Linux/Documentation/x86/boot.rst) so they can be given 'plain' bzImages....
|
I stand corrected. Could have sworn it worked without - I guess I had EFI_STUB in my kernels even though I didn't think I was using it. _________________ Greybeard |
|
Back to top |
|
|
|