[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] system: grub: Introduce foreign-menu-entry.
From: |
Chris Marusich |
Subject: |
Re: [PATCH] system: grub: Introduce foreign-menu-entry. |
Date: |
Wed, 03 Aug 2016 01:48:36 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hi Tomáš,
Tomáš Čech <address@hidden> writes:
> foreign-menu-entry is very similar but is intended for entering other
> distributions so it doesn't limit the name and allows kernel and initrd to be
> placed in different device (in Grub syntax).
What is the use case which motivates this change? How do you intend to
use this after making the proposed changes?
> +(define-record-type* <foreign-menu-entry>
> + foreign-menu-entry make-foreign-menu-entry
> + foreign-menu-entry?
> + (label foreign-menu-entry-label)
> + (device foreign-menu-entry-device (default ""))
> + (linux foreign-menu-entry-linux)
> + (linux-arguments foreign-menu-entry-linux-arguments
> + (default '())) ; list of string-valued
> gexps
> + (initrd foreign-menu-entry-initrd)) ; file name of the initrd
> as a gexp
> +
This is identical to the existing <menu-entry> record type; however, it
adds the "device" parameter:
--8<---------------cut here---------------start------------->8---
(define-record-type* <menu-entry>
menu-entry make-menu-entry
menu-entry?
(label menu-entry-label)
(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
--8<---------------cut here---------------end--------------->8---
Would it be possible to accomplish the same thing by adding a "device"
parameter to the existing <menu-entry> record type? That way, we
wouldn't have to add a new record type which seems largely redundant.
> #~(string-append #$linux "/"
> #$linux-image-name))
> #$linux #$linux-image-name (string-join (list
> address@hidden))
> - #$initrd))))
> + #$initrd))
> + (($ <foreign-menu-entry> label device linux arguments initrd)
> + #~(format port "menuentry ~s {
> + linux ~a ~a
> + initrd ~a
> +}~%"
> + #$label
> + (string-append #$device #$linux)
Don't we need to insert a separator of some kind between #$device and
#$linux? Also, don't we need to include the linux image name (e.g.,
"bzImage")?
> + (string-join (list address@hidden))
> + (string-append #$device #$initrd)))))
>
> (mlet %store-monad ((sugar (eye-candy config store-fs system #~port)))
> (define builder
Isn't a separator of some kind needed between #$device and #$initrd?
--
Chris
signature.asc
Description: PGP signature