unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 27695@debbugs.gnu.org
Subject: [bug#27695] [PATCH 1/2] bootloader: Add grub-hybrid-bootloader.
Date: Thu, 20 Jul 2017 13:47:32 +0200	[thread overview]
Message-ID: <20170720134732.7972d5bb@scratchpost.org> (raw)
In-Reply-To: <87379rzeml.fsf@gnu.org>

Hi Ludo,

On Thu, 20 Jul 2017 10:39:14 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Is it really all it takes to make a GRUB that can do both BIOS and UEFI?
> I wonder why GRUB upstream doesn’t do it by default.

I think they do, in a sense.  In many other distributions the directory is common - so if you install both grub-pc and grub-efi on your disk then grub will indeed use both (for grub-mkrescue).

>  Do you think we should discuss it with them?
> 
> If that works, we might just as well make it the new “grub” package and
> remove “grub-efi”.  Or is there any downside?

I only use this feature for grub-mkrescue right now.  I know that it is supported *there* in the sense that there's explicit "if" blocks checking for both platforms (by literals) in the same function, but not exclusively (i.e. "if (efi) A; if (non efi) B;" without "else").  See main() in util/grub-mkrescue.c in grub 2.02 (lines 667ff for EFI, lines 571ff for "PC"). The EFI stuff has "_EFI" in the preprocessor definitions, so search for that.

Note that main() supports a command line option for getting the source files for ONE SINGLE platform, but when you don't specify that option then it uses multiple platforms (the ones it can find).

For using multiple platforms as a regular bootloader I do NOT know whether that works or makes sense at all.  Maybe it does, I just didn't test it (and can't usefully).

That's why there's the alternative implementation that wouldn't add a Guix bootloader for it.

I hope someone else knows.  I don't have EFI hardware so I'm really the wrong person to find out that stuff.  Well I could try reading the documentation / asking and hoping that it's all correct, but ... you know... paper is patient :)

util/grub-install.c seems to use a case anaylsis with exclusive cases for finding out EFI or not *shrugs*.

  reply	other threads:[~2017-07-20 11:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 18:59 [bug#27695] [PATCH 0/2] Introduce grub hybrid bootloader and use it Danny Milosavljevic
2017-07-14 19:01 ` [bug#27695] [PATCH 1/2] bootloader: Add grub-hybrid-bootloader Danny Milosavljevic
2017-07-14 19:01   ` [bug#27695] [PATCH 2/2] install: Use grub-hybrid-bootloader Danny Milosavljevic
2017-07-20  8:39   ` [bug#27695] [PATCH 1/2] bootloader: Add grub-hybrid-bootloader Ludovic Courtès
2017-07-20 11:47     ` Danny Milosavljevic [this message]
2017-07-20 18:42       ` Danny Milosavljevic
2017-07-14 19:34 ` [bug#27695] [PATCH 0/2] Introduce grub hybrid bootloader and use it Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170720134732.7972d5bb@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=27695@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).