[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/07: bootloader: Add bootloader name to boot-parameters record.
From: |
Mathieu Othacehe |
Subject: |
03/07: bootloader: Add bootloader name to boot-parameters record. |
Date: |
Tue, 16 May 2017 08:42:05 -0400 (EDT) |
mothacehe pushed a commit to branch master
in repository guix.
commit bcaf67c44f4556b4a632310013a06318811aa0f0
Author: Mathieu Othacehe <address@hidden>
Date: Sun Apr 2 15:10:52 2017 +0200
bootloader: Add bootloader name to boot-parameters record.
* gnu/system.scm (<boot-parameters>)[name]: New field.
(boot-parameters-boot-name): Ditto.
(operating-system-boot-parameters-file): Add new field.
(operating-system-boot-parameters): Ditto.
(read-boot-parameters): Ditto.
---
gnu/system.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gnu/system.scm b/gnu/system.scm
index a705bf6..5bd6017 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -104,6 +104,7 @@
boot-parameters?
boot-parameters-label
boot-parameters-root-device
+ boot-parameters-boot-name
boot-parameters-store-device
boot-parameters-store-mount-point
boot-parameters-kernel
@@ -214,6 +215,7 @@ directly by the user."
;; exactly to the device field of the <file-system> object representing the
;; OS's root file system, so it might be a device path like "/dev/sda3".
(root-device boot-parameters-root-device)
+ (boot-name boot-parameters-boot-name)
(store-device boot-parameters-store-device)
(store-mount-point boot-parameters-store-mount-point)
(kernel boot-parameters-kernel)
@@ -232,6 +234,11 @@ directly by the user."
(label label)
(root-device root)
+ (boot-name
+ (match (assq 'boot-name rest)
+ ((_ args) args)
+ (#f 'grub))) ; for compatibility reasons.
+
;; In the past, we would store the directory name of the kernel instead
;; of the absolute file name of its image. Detect that and correct it.
(kernel (if (string=? linux (direct-store-path linux))
@@ -869,6 +876,9 @@ kernel arguments for that derivation to <boot-parameters>."
(mlet* %store-monad
((initrd (operating-system-initrd-file os))
(store -> (operating-system-store-file-system os))
+ (bootloader -> (bootloader-configuration-bootloader
+ (operating-system-bootloader os)))
+ (boot-name -> (bootloader-name bootloader))
(label -> (kernel->boot-label (operating-system-kernel os))))
(return (boot-parameters
(label label)
@@ -879,6 +889,7 @@ kernel arguments for that derivation to <boot-parameters>."
(operating-system-kernel-arguments os system.drv root-device)
(operating-system-user-kernel-arguments os)))
(initrd initrd)
+ (boot-name boot-name)
(store-device (fs->boot-device store))
(store-mount-point (file-system-mount-point store))))))
@@ -904,6 +915,7 @@ being stored into the \"parameters\" file)."
(kernel-arguments
#$(boot-parameters-kernel-arguments params))
(initrd #$(boot-parameters-initrd params))
+ (boot-name #$(boot-parameters-boot-name params))
(store
(device #$(boot-parameters-store-device params))
(mount-point #$(boot-parameters-store-mount-point
params))))
- branch master updated (ce92d26 -> 5641dff), Mathieu Othacehe, 2017/05/16
- 07/07: scripts: system: Display bootloader name in "list-generations"., Mathieu Othacehe, 2017/05/16
- 02/07: bootloader: Adapt vm to new bootloader API., Mathieu Othacehe, 2017/05/16
- 05/07: scripts: system: Adapt "init" to new bootloader API., Mathieu Othacehe, 2017/05/16
- 04/07: scripts: system: Adapt "reconfigure" to new bootloader API., Mathieu Othacehe, 2017/05/16
- 03/07: bootloader: Add bootloader name to boot-parameters record.,
Mathieu Othacehe <=
- 01/07: bootloader: Add extlinux support., Mathieu Othacehe, 2017/05/16
- 06/07: scripts: system: Adapt "switch-generation" to new bootloader API., Mathieu Othacehe, 2017/05/16