diff options
| author | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-05-29 14:24:20 +0200 |
|---|---|---|
| committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-06-08 16:29:29 +0200 |
| commit | 8b22107e5d0bdeb300fb33b5a40aed2057a66b94 (patch) | |
| tree | ec2df97d8be877b40e24712aefd06b4dcdcc7f65 /gnu/bootloader.scm | |
| parent | 45f523d9f018c262900e94b0f70f17b05118941c (diff) | |
bootloader: Use menu-entry to define custom bootloader entries.
* 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.
Diffstat (limited to 'gnu/bootloader.scm')
| -rw-r--r-- | gnu/bootloader.scm | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index 4e77974d315..d5fcf30f056 100644 --- a/gnu/bootloader.scm +++ b/gnu/bootloader.scm | |||
| @@ -23,7 +23,15 @@ | |||
| 23 | #:use-module (guix records) | 23 | #:use-module (guix records) |
| 24 | #:use-module (guix ui) | 24 | #:use-module (guix ui) |
| 25 | #:use-module (srfi srfi-1) | 25 | #:use-module (srfi srfi-1) |
| 26 | #:export (bootloader | 26 | #:export (menu-entry |
| 27 | menu-entry? | ||
| 28 | menu-entry-label | ||
| 29 | menu-entry-device | ||
| 30 | menu-entry-linux | ||
| 31 | menu-entry-linux-arguments | ||
| 32 | menu-entry-initrd | ||
| 33 | |||
| 34 | bootloader | ||
| 27 | bootloader? | 35 | bootloader? |
| 28 | bootloader-name | 36 | bootloader-name |
| 29 | bootloader-package | 37 | bootloader-package |
| @@ -50,6 +58,22 @@ | |||
| 50 | 58 | ||
| 51 | 59 | ||
| 52 | ;;; | 60 | ;;; |
| 61 | ;;; Menu-entry record. | ||
| 62 | ;;; | ||
| 63 | |||
| 64 | (define-record-type* <menu-entry> | ||
| 65 | menu-entry make-menu-entry | ||
| 66 | menu-entry? | ||
| 67 | (label menu-entry-label) | ||
| 68 | (device menu-entry-device ; file system uuid, label, or #f | ||
| 69 | (default #f)) | ||
| 70 | (linux menu-entry-linux) | ||
| 71 | (linux-arguments menu-entry-linux-arguments | ||
| 72 | (default '())) ; list of string-valued gexps | ||
| 73 | (initrd menu-entry-initrd)) ; file name of the initrd as a gexp | ||
| 74 | |||
| 75 | |||
| 76 | ;;; | ||
| 53 | ;;; Bootloader record. | 77 | ;;; Bootloader record. |
| 54 | ;;; | 78 | ;;; |
| 55 | 79 | ||
