[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#69343] [PATCH v2 03/12] Also move boot-parameters->menu-entry.
From: |
Lilah Tascheter |
Subject: |
[bug#69343] [PATCH v2 03/12] Also move boot-parameters->menu-entry. |
Date: |
Fri, 8 Mar 2024 02:11:59 -0600 |
From: Felix Lechner <felix.lechner@lease-up.com>
* gnu/system.scm (boot-parameters->menu-entry): Move to...
* gnu/system/boot.scm (boot-parameters->menu-entry): ...here.
Change-Id: I794198e074b6d3012526a3056599ee3db1f1cdba
---
gnu/system.scm | 28 ----------------------------
gnu/system/boot.scm | 25 ++++++++++++++++++++++++-
2 files changed, 24 insertions(+), 29 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 048f9090e0..11f8e06cc0 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -149,8 +149,6 @@ (define-module (gnu system)
hurd-default-essential-services
- boot-parameters->menu-entry
-
local-host-aliases ;deprecated
%root-account
%setuid-programs
@@ -303,32 +301,6 @@ (define* (operating-system-kernel-arguments
(append (bootable-kernel-arguments os root-device version)
(operating-system-user-kernel-arguments os)))
-
-;;;
-;;; Boot parameters
-;;;
-
-(define (boot-parameters->menu-entry conf)
- "Return a <menu-entry> instance given CONF, a <boot-parameters> instance."
- (let* ((kernel (boot-parameters-kernel conf))
- (multiboot-modules (boot-parameters-multiboot-modules conf))
- (multiboot? (pair? multiboot-modules)))
- (menu-entry
- (label (boot-parameters-label conf))
- (device (boot-parameters-store-device conf))
- (device-mount-point (boot-parameters-store-mount-point conf))
- (linux (and (not multiboot?) kernel))
- (linux-arguments (if (not multiboot?)
- (boot-parameters-kernel-arguments conf)
- '()))
- (initrd (boot-parameters-initrd conf))
- (multiboot-kernel (and multiboot? kernel))
- (multiboot-arguments (if multiboot?
- (boot-parameters-kernel-arguments conf)
- '()))
- (multiboot-modules (if multiboot?
- (boot-parameters-multiboot-modules conf)
- '())))))
;;;
diff --git a/gnu/system/boot.scm b/gnu/system/boot.scm
index 3f227ab801..a3b9cce7d2 100644
--- a/gnu/system/boot.scm
+++ b/gnu/system/boot.scm
@@ -69,6 +69,8 @@ (define-module (gnu system boot)
read-boot-parameters
read-boot-parameters-file
+ boot-parameters->menu-entry
+
ensure-not-/dev
system-linux-image-file-name))
@@ -272,6 +274,28 @@ (define (read-boot-parameters-file system)
(kernel-arguments (append (bootable-kernel-arguments system root version)
(boot-parameters-kernel-arguments params))))))
+(define (boot-parameters->menu-entry conf)
+ "Return a <menu-entry> instance given CONF, a <boot-parameters> instance."
+ (let* ((kernel (boot-parameters-kernel conf))
+ (multiboot-modules (boot-parameters-multiboot-modules conf))
+ (multiboot? (pair? multiboot-modules)))
+ (menu-entry
+ (label (boot-parameters-label conf))
+ (device (boot-parameters-store-device conf))
+ (device-mount-point (boot-parameters-store-mount-point conf))
+ (linux (and (not multiboot?) kernel))
+ (linux-arguments (if (not multiboot?)
+ (boot-parameters-kernel-arguments conf)
+ '()))
+ (initrd (boot-parameters-initrd conf))
+ (multiboot-kernel (and multiboot? kernel))
+ (multiboot-arguments (if multiboot?
+ (boot-parameters-kernel-arguments conf)
+ '()))
+ (multiboot-modules (if multiboot?
+ (boot-parameters-multiboot-modules conf)
+ '())))))
+
(define (ensure-not-/dev device)
"If DEVICE starts with a slash, return #f. This is meant to filter out
Linux device names such as /dev/sda, and to preserve GRUB device names and
@@ -292,5 +316,4 @@ (define* (system-linux-image-file-name #:optional
((string-prefix? "riscv64" target) "Image")
(else "bzImage")))
-
;;; boot.scm ends here
--
2.41.0
- [bug#69343] [PATCH v2 00/12] Simplify bootloader data structures and procedures, Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 01/12] Fix bug where the extra menu entries for a bootloader were shown twice., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 09/12] Give a separate name to a commonly used expression., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 06/12] Offer a uniform decorated-boot-label and use it., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 05/12] Move epoch->date-string to gnu/system/boot.scm and use it elsewhere., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 03/12] Also move boot-parameters->menu-entry.,
Lilah Tascheter <=
- [bug#69343] [PATCH v2 08/12] Rename two remote variables confusingly named 'generations'., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 02/12] Move <boot-parameters> record to a separate file., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 10/12] Simplify profile->boot-alternatives., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 04/12] Rename seconds->string procedure to epoch->date-string., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 12/12] Encapsulate <boot-parameters> to retain generation, system-path and epoch., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 11/12] Split generation->boot-parameters out of profile->boot-alternatives., Lilah Tascheter, 2024/03/08
- [bug#69343] [PATCH v2 07/12] Rename boot-parameters to boot-alternatives when appropriate., Lilah Tascheter, 2024/03/08
- [bug#69343] Simplify bootloader data structures and procedures, Felix Lechner, 2024/03/08