GNU bug report logs - #72457
[PATCH 00/15] Rewrite bootloader subsystem.

Previous Next

Package: guix-patches;

Reported by: Lilah Tascheter <lilah <at> lunabee.space>

Date: Sun, 4 Aug 2024 03:52:01 UTC

Severity: normal

Tags: patch

Fix blocked by 73202: [PATCH] Preparation for bootloader rewrite.

Full log


View this message in rfc822 format

From: Herman Rimm <herman <at> rimm.ee>
To: 72457 <at> debbugs.gnu.org
Cc: Lilah Tascheter <lilah <at> lunabee.space>, Florian Pelz <pelzflorian <at> pelzflorian.de>, Ludovic Courtès <ludo <at> gnu.org>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [bug#72457] [PATCH v6 11/12] gnu: system: Update examples.
Date: Tue, 24 Sep 2024 20:29:18 +0200
From: Lilah Tascheter <lilah <at> lunabee.space>

* gnu/system/examples/asus-c201.tmpl (bootloader): Use new depthcharge
bootloader name scheme and update to new target system.
* gnu/system/examples/bare-bones.tmpl (bootloader),
gnu/system/examples/bare-hurd.tmpl (bootloader),
gnu/system/examples/beaglebone-black.tmpl (bootloader),
gnu/system/examples/desktop.tmpl (bootloader),
gnu/system/examples/lightweight-desktop.tmpl (bootloader),
gnu/system/examples/plasma.tmpl (bootloader): Use new target system.
* gnu/system/examples/docker-image.tmpl (bootloader): Delete.
* gnu/system/examples/vm-image.tmpl (bootloader): Use auto image target.

Change-Id: I3675f17ae9cd94cff99328762600fb4e491bc9f2
---
 gnu/system/examples/asus-c201.tmpl           | 6 ++++--
 gnu/system/examples/bare-bones.tmpl          | 7 +++++--
 gnu/system/examples/bare-hurd.tmpl           | 4 +++-
 gnu/system/examples/beaglebone-black.tmpl    | 4 +++-
 gnu/system/examples/desktop.tmpl             | 4 +++-
 gnu/system/examples/docker-image.tmpl        | 6 ++----
 gnu/system/examples/lightweight-desktop.tmpl | 4 +++-
 gnu/system/examples/plasma.tmpl              | 4 +++-
 gnu/system/examples/vm-image.tmpl            | 5 ++---
 9 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/gnu/system/examples/asus-c201.tmpl b/gnu/system/examples/asus-c201.tmpl
index 019111c167..eec185eebf 100644
--- a/gnu/system/examples/asus-c201.tmpl
+++ b/gnu/system/examples/asus-c201.tmpl
@@ -14,8 +14,10 @@
   ;; Assuming /dev/mmcblk0p1 is the kernel partition, and
   ;; "my-root" is the label of the target root file system.
   (bootloader (bootloader-configuration
-                (bootloader depthcharge-bootloader)
-                (targets '("/dev/mmcblk0p1"))))
+                (bootloader depthcharge-veyron-speedy-bootloader)
+                (targets (list (bootloader-target
+                                 (type 'part)
+                                 (device "/dev/mmcblk0p1"))))))
 
   ;; The ASUS C201PA requires a very particular kernel to boot,
   ;; as well as the following arguments.
diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
index 7b6a4b09b0..9eed05f2e0 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -13,10 +13,13 @@
 
   ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the
   ;; target hard disk, and "my-root" is the label of the target
-  ;; root file system.
+  ;; root file system.  If you're just building an image, the
+  ;; 'targets' field may be omitted.
   (bootloader (bootloader-configuration
                 (bootloader grub-bootloader)
-                (targets '("/dev/sdX"))))
+                (targets (list (bootloader-target
+                                 (type 'disk)
+                                 (device "/dev/sdX"))))))
   ;; It's fitting to support the equally bare bones ‘-nographic’
   ;; QEMU option, which also nicely sidesteps forcing QWERTY.
   (kernel-arguments (list "console=ttyS0,115200"))
diff --git a/gnu/system/examples/bare-hurd.tmpl b/gnu/system/examples/bare-hurd.tmpl
index 463c7ee798..8dd700cd9d 100644
--- a/gnu/system/examples/bare-hurd.tmpl
+++ b/gnu/system/examples/bare-hurd.tmpl
@@ -32,7 +32,9 @@
     (inherit %hurd-default-operating-system)
     (bootloader (bootloader-configuration
                  (bootloader grub-minimal-bootloader)
-                 (targets '("/dev/sdX"))))
+                 (targets (list (bootloader-target
+                                  (type 'disk)
+                                  (device "/dev/sdX"))))))
     (file-systems (cons (file-system
                           (device (file-system-label "my-root"))
                           (mount-point "/")
diff --git a/gnu/system/examples/beaglebone-black.tmpl b/gnu/system/examples/beaglebone-black.tmpl
index 18bbb2723c..397fc2766e 100644
--- a/gnu/system/examples/beaglebone-black.tmpl
+++ b/gnu/system/examples/beaglebone-black.tmpl
@@ -15,7 +15,9 @@
   ;; the label of the target root file system.
   (bootloader (bootloader-configuration
                (bootloader u-boot-beaglebone-black-bootloader)
-               (targets '("/dev/mmcblk1"))))
+               (targets (list (bootloader-target
+                                (type 'disk)
+                                (device "/dev/mmcblk1"))))))
 
   ;; This module is required to mount the SD card.
   (initrd-modules (cons "omap_hsmmc" %base-initrd-modules))
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index 2d65f22294..30dbdeea31 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -20,7 +20,9 @@
   ;; Partition mounted on /boot/efi.
   (bootloader (bootloader-configuration
                 (bootloader grub-efi-bootloader)
-                (targets '("/boot/efi"))
+                (targets (list (bootloader-target
+                                 (type 'esp)
+                                 (path "/boot/efi"))))
                 (keyboard-layout keyboard-layout)))
 
   ;; Specify a mapped device for the encrypted root partition.
diff --git a/gnu/system/examples/docker-image.tmpl b/gnu/system/examples/docker-image.tmpl
index 7123917af4..6d3114a0bc 100644
--- a/gnu/system/examples/docker-image.tmpl
+++ b/gnu/system/examples/docker-image.tmpl
@@ -9,6 +9,8 @@
   (timezone "Europe/Berlin")
   (locale "en_US.utf8")
 
+  ;; Bootloader can be left blank!
+
   ;; This is where user accounts are specified.  The "root" account is
   ;; implicit, and is initially created with the empty password.
   (users (cons (user-account
@@ -34,10 +36,6 @@
   ;; similar services for us.
 
   ;; This will be ignored.
-  (bootloader (bootloader-configuration
-               (bootloader grub-bootloader)
-               (targets '("does-not-matter"))))
-  ;; This will be ignored, too.
   (file-systems (list (file-system
                         (device "does-not-matter")
                         (mount-point "/")
diff --git a/gnu/system/examples/lightweight-desktop.tmpl b/gnu/system/examples/lightweight-desktop.tmpl
index c061284ba8..0964238cb0 100644
--- a/gnu/system/examples/lightweight-desktop.tmpl
+++ b/gnu/system/examples/lightweight-desktop.tmpl
@@ -17,7 +17,9 @@
   ;; Partition mounted on /boot/efi.
   (bootloader (bootloader-configuration
                 (bootloader grub-efi-bootloader)
-                (targets '("/boot/efi"))))
+                (targets (list (bootloader-target
+                                 (type 'esp)
+                                 (path "/boot/efi"))))))
 
   ;; Assume the target root file system is labelled "my-root",
   ;; and the EFI System Partition has UUID 1234-ABCD.
diff --git a/gnu/system/examples/plasma.tmpl b/gnu/system/examples/plasma.tmpl
index c3850ffe37..a81916ffe9 100644
--- a/gnu/system/examples/plasma.tmpl
+++ b/gnu/system/examples/plasma.tmpl
@@ -15,7 +15,9 @@
   ;; is the label of the target root file system.
   (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
-               (targets (list "/dev/sdX"))))
+               (targets (list (bootloader-target
+                                (type 'disk)
+                                (device "/dev/sdX"))))))
 
   (file-systems (cons (file-system
                         (device "my-root")
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl
index 589de493b1..050c0bb971 100644
--- a/gnu/system/examples/vm-image.tmpl
+++ b/gnu/system/examples/vm-image.tmpl
@@ -38,11 +38,10 @@ accounts.\x1b[0m
 
   (firmware '())
 
-  ;; Below we assume /dev/vda is the VM's hard disk.
-  ;; Adjust as needed.
+  ;; Images automatically get the 'root, 'esp, and 'disk targets configured as
+  ;; needed.
   (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
-               (targets '("/dev/vda"))
                (terminal-outputs '(console))))
   (file-systems (cons (file-system
                         (mount-point "/")
-- 
2.45.2





This bug report was last modified 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.