From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#27007: [PATCH 1/2] bootloader: Use menu-entry to define custom bootloader entries. Date: Mon, 05 Jun 2017 12:23:33 +0200 Message-ID: <87efuyenru.fsf@gnu.org> References: <87shjvsquh.fsf@gnu.org> <20170531072328.16116-1-m.othacehe@gmail.com> <20170531072328.16116-2-m.othacehe@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHpB9-0005xU-Kq for bug-guix@gnu.org; Mon, 05 Jun 2017 06:24:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHpB4-0003SS-P2 for bug-guix@gnu.org; Mon, 05 Jun 2017 06:24:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHpB4-0003SO-Lo for bug-guix@gnu.org; Mon, 05 Jun 2017 06:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHpB4-00065n-Gm for bug-guix@gnu.org; Mon, 05 Jun 2017 06:24:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20170531072328.16116-2-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Wed, 31 May 2017 09:23:27 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Mathieu Othacehe Cc: 27007@debbugs.gnu.org Hi Mathieu, Mathieu Othacehe skribis: > * gnu/bootloader.scm (): New variable. Export associated gett= ers, > 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 (): 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 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 =E2=80=98device-mount-point=E2=80=99 now? For the dual-bo= ot use case, I don=E2=80=99t see how this would be used. > +(define (menu-entry->boot-parameters menu-entry) > + "Convert a instance to a corresponding ." > + (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=E2=80=99s weird to set =E2=80=98store-device=E2=80=99 and =E2=80=98store= -mount-point=E2=80=99 here since there=E2=80=99s no store (at least when defining a menu entry for another d= istro or OS). Should we set them to #f? BTW, this is unrelated to this patch series, but I think =E2=80=98boot-name= =E2=80=99 should be renamed to =E2=80=98bootloader-name=E2=80=99 since that=E2=80=99s= what it is. Thank you for working on this! Ludo=E2=80=99.