From: ludo@gnu.org (Ludovic Courtès)
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 27007@debbugs.gnu.org
Subject: bug#27007: [PATCH 1/2] bootloader: Use menu-entry to define custom bootloader entries.
Date: Mon, 05 Jun 2017 12:23:33 +0200 [thread overview]
Message-ID: <87efuyenru.fsf@gnu.org> (raw)
In-Reply-To: <20170531072328.16116-2-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Wed, 31 May 2017 09:23:27 +0200")
Hi Mathieu,
Mathieu Othacehe <m.othacehe@gmail.com> skribis:
> * gnu/bootloader.scm (<menu-entry>): New variable. Export associated getters,
> This record is extracted from grub module.
> * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Use
> menu-entry->boot-parameters to convert menu-entry records to
> boot-parameters.
> * gnu/bootloader/grub.scm (<menu-entry>): Remove.
> (boot-parameters->menu-entry): Remove.
> (grub-configuration-file): Use boot-parameters to create configuration
> entries.
> * gnu/system.scm (menu-entry->boot-parameters): New exported procedure.
Overall LGTM. Some comments and questions:
> +(define-record-type* <menu-entry>
> + menu-entry make-menu-entry
> + menu-entry?
> + (label menu-entry-label)
> + (device menu-entry-device ; file system uuid, label, or #f
> + (default #f))
> + (device-mount-point menu-entry-device-mount-point
> + (default "/"))
> + (linux menu-entry-linux)
> + (linux-arguments menu-entry-linux-arguments
> + (default '())) ; list of string-valued gexps
> + (initrd menu-entry-initrd)) ; file name of the initrd as a gexp
Do we still need ‘device-mount-point’ now? For the dual-boot use case,
I don’t see how this would be used.
> +(define (menu-entry->boot-parameters menu-entry)
> + "Convert a <menu-entry> instance to a corresponding <boot-parameters>."
> + (boot-parameters
> + (label (menu-entry-label menu-entry))
> + (root-device #f)
> + (boot-name 'custom)
> + (store-device (menu-entry-device menu-entry))
> + (store-mount-point (menu-entry-device-mount-point menu-entry))
> + (kernel (menu-entry-linux menu-entry))
> + (kernel-arguments (menu-entry-linux-arguments menu-entry))
> + (initrd (menu-entry-initrd menu-entry))))
It’s weird to set ‘store-device’ and ‘store-mount-point’ here since
there’s no store (at least when defining a menu entry for another distro
or OS). Should we set them to #f?
BTW, this is unrelated to this patch series, but I think ‘boot-name’
should be renamed to ‘bootloader-name’ since that’s what it is.
Thank you for working on this!
Ludo’.
next prev parent reply other threads:[~2017-06-05 10:24 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-20 20:00 bug#27007: boot-parameters are not documented Tomáš Čech
2017-05-20 20:31 ` Mathieu Othacehe
2017-05-20 21:07 ` Leo Famulari
2017-05-20 21:43 ` Tomáš Čech
2017-05-20 20:52 ` Danny Milosavljevic
2017-05-20 21:00 ` Tomáš Čech
2017-05-22 15:55 ` Ludovic Courtès
2017-05-22 17:31 ` Mathieu Othacehe
2017-05-23 8:13 ` Ludovic Courtès
2017-05-23 9:31 ` Mathieu Othacehe
2017-05-23 9:57 ` Tomáš Čech
2017-05-23 11:23 ` Ludovic Courtès
2017-05-23 11:40 ` Mathieu Othacehe
2017-05-23 12:24 ` Ludovic Courtès
2017-05-31 7:23 ` bug#27007: [PATCH 0/2] Use menu-entry to define custom bootloader entries Mathieu Othacehe
2017-05-31 7:23 ` bug#27007: [PATCH 1/2] bootloader: " Mathieu Othacehe
2017-05-31 22:11 ` Danny Milosavljevic
2017-06-01 8:34 ` Mathieu Othacehe
2017-06-01 11:14 ` Danny Milosavljevic
2017-06-02 9:29 ` Mathieu Othacehe
2017-06-02 14:30 ` Marius Bakke
2017-06-01 11:22 ` Ludovic Courtès
2017-06-05 10:23 ` Ludovic Courtès [this message]
2017-06-06 8:14 ` Mathieu Othacehe
2017-05-31 7:23 ` bug#27007: [PATCH 2/2] doc: Adapt to multiple bootloader support Mathieu Othacehe
2017-05-31 21:57 ` Danny Milosavljevic
2017-06-05 10:38 ` Ludovic Courtès
2017-06-05 10:36 ` Ludovic Courtès
2017-06-05 14:11 ` Danny Milosavljevic
2017-06-06 22:51 ` Ludovic Courtès
2017-06-08 10:59 ` Mathieu Othacehe
2017-06-06 9:20 ` Mathieu Othacehe
2017-05-24 20:11 ` bug#27007: boot-parameters are not documented Danny Milosavljevic
2017-05-26 8:47 ` Ludovic Courtès
2017-05-26 9:03 ` ng0
2017-06-08 10:57 ` bug#27007: [PATCH v2 1/2] bootloader: Use menu-entry to define custom bootloader entries Mathieu Othacehe
2017-06-08 10:57 ` bug#27007: [PATCH v2 2/2] doc: Adapt to multiple bootloader support Mathieu Othacehe
2017-06-08 12:39 ` Ludovic Courtès
2017-06-08 14:33 ` Mathieu Othacehe
2017-06-08 12:36 ` bug#27007: [PATCH v2 1/2] bootloader: Use menu-entry to define custom bootloader entries Ludovic Courtès
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=87efuyenru.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=27007@debbugs.gnu.org \
--cc=m.othacehe@gmail.com \
/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).