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/system.scm | |
parent | 45f523d9f018c262900e94b0f70f17b05118941c (diff) | |
download | guix-8b22107e5d0bdeb300fb33b5a40aed2057a66b94.tar.gz |
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/system.scm')
-rw-r--r-- | gnu/system.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index 0076f2fcb1..674c6f85be 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -112,6 +112,7 @@ boot-parameters-initrd read-boot-parameters read-boot-parameters-file + menu-entry->boot-parameters local-host-aliases %setuid-programs @@ -299,6 +300,19 @@ The object has its kernel-arguments extended in order to make it bootable." system root-device))) #f))) + +(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 #f) + (store-mount-point #f) + (kernel (menu-entry-linux menu-entry)) + (kernel-arguments (menu-entry-linux-arguments menu-entry)) + (initrd (menu-entry-initrd menu-entry)))) + ;;; ;;; Services. |