From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 27529@debbugs.gnu.org
Subject: [bug#27529] [PATCH] bootloader: Use <menu-entry> for the bootloader side.
Date: Sun, 2 Jul 2017 20:26:56 +0200 [thread overview]
Message-ID: <20170702202656.60c2af09@scratchpost.org> (raw)
In-Reply-To: <8737ae995g.fsf@gnu.org>
Hi Ludo,
On Sun, 02 Jul 2017 16:59:55 +0200
ludo@gnu.org (Ludovic Courtès) wrote:
> Danny Milosavljevic <dannym@scratchpost.org> skribis:
>
> > * gnu/bootloader.scm (menu-entry-device-mount-point): New variable. Export it.
> > (<menu-entry>: New field "device".
> > * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry>
> > entries.
> > * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle
> > <menu-entry> entries.
> > * gnu/system.scm (menu->entry->boot-parameters): Delete variable.
> > (boot-parameters->menu-entry): New variable. Export it.
> > (operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>.
> > * guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage.
> > ---
> > gnu/bootloader.scm | 3 +++
> > gnu/bootloader/extlinux.scm | 19 +++++++++----------
> > gnu/bootloader/grub.scm | 27 ++++++++++++---------------
> > gnu/system.scm | 29 ++++++++++++++---------------
> > guix/scripts/system.scm | 10 +++++-----
> > 5 files changed, 43 insertions(+), 45 deletions(-)
>
> Could you explain the rationale?
>
> IIRC there was the idea that implementations of the bootloader API
> should use <boot-parameters>, and that <menu-entry> would be used only
> in the user-facing APIs (it had even disappeared with the initial
> thing.)
Yeah, it's preparation for chainloading support (non-Linux OSes etc). I don't feel strongly one way or another but I think those chainloading entries would actually be menu entries and not really boot-parameters as in Guix-can-use-them-for-anything.
What this does is use boot-parameters for stuff which Guix needs for itself, and menu entries (which could be a poem by Goethe as much as Guix cares) for the rest. *Some* boot-parameters will end up as menu entries, but not all (for example think of chainloading: There would only be a menu-entry for chainloading, but both a boot-parameter and a (generated) menu-entry for the Guix Linux kernel).
There would be no way to get from a <menu-entry> to a <boot-parameter> because it could as well make no sense to do that.
In short, the bootloader would always and only get menu-entries, but the remainder of Guix would only use them as support under wobbly chairs or something :)
On the other hand, boot-parameters are things which Guix needs and manages.
If we want that (or want it again - it was that way before), this patch would be a way to do it. If not, I'm fine with it as well. It just bothered me a bit even when the (otherwise great) multi bootloader support went in that it used boot-parameters as some kind of menu-entry substitute. In the beginning, <menu-entry> was grub-private, so that was the only way to get the multi bootloader support to work. But now the <menu-entry> is public. Then why not use it for what it is?
next prev parent reply other threads:[~2017-07-02 18:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 10:42 [bug#27529] [PATCH] bootloader: Use <menu-entry> for the bootloader side Danny Milosavljevic
2017-07-02 14:59 ` Ludovic Courtès
2017-07-02 18:26 ` Danny Milosavljevic [this message]
2017-07-09 19:30 ` Ludovic Courtès
2017-07-10 7:30 ` Mathieu Othacehe
2017-07-26 8:43 ` Ludovic Courtès
2017-07-27 12:55 ` [bug#27529] Guix system tests Danny Milosavljevic
2017-07-27 14:57 ` Ludovic Courtès
2017-07-29 11:50 ` 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=20170702202656.60c2af09@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=27529@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).