[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
30/52: vm: Make the device node procedure a parameter.
From: |
guix-commits |
Subject: |
30/52: vm: Make the device node procedure a parameter. |
Date: |
Thu, 9 Apr 2020 13:29:09 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 2160bb6ebd19562de514c8362f1771f01a56715d
Author: Ludovic Courtès <address@hidden>
AuthorDate: Tue Apr 7 10:21:48 2020 +0200
vm: Make the device node procedure a parameter.
* gnu/build/vm.scm (root-partition-initializer): Add #:make-device-nodes
parameter and use it.
* gnu/system/vm.scm (qemu-image): Add #:device-node parameter. Pass
#:make-device-nodes to 'root-partition-initializer'.
* gnu/system/hurd.scm (cross-hurd-image): Pass #:device-nodes 'hurd to
'qemu-image'.
---
gnu/build/vm.scm | 4 +++-
gnu/system/hurd.scm | 1 +
gnu/system/vm.scm | 12 ++++++++++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 1c62492..a3943ab 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -370,6 +370,8 @@ it, run its initializer, and unmount it."
(register-closures? #t)
system-directory
(deduplicate? #t)
+ (make-device-nodes
+ make-essential-device-nodes)
(extra-directives '()))
"Return a procedure to initialize a root partition.
@@ -391,7 +393,7 @@ system that is passed to 'populate-root-file-system'."
target))
;; Populate /dev.
- (make-essential-device-nodes target)
+ (make-device-nodes target)
;; Optionally, register the inputs in the image's store.
(when register-closures?
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 64ecffc..d5ed2b7 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -156,6 +156,7 @@ menuentry \"GNU\" {
#:bootcfg-drv grub.cfg
#:bootloader grub-bootloader
#:register-closures? #f
+ #:device-nodes 'hurd
#:extra-directives hurd-directives))
;; Return this thunk so one can type "guix build -f gnu/system/hurd.scm".
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index f2f4912..b3a46c8 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -361,6 +361,7 @@ INPUTS is a list of inputs (as for packages)."
(disk-image-format "qcow2")
(file-system-type "ext4")
(file-system-options '())
+ (device-nodes 'linux)
(extra-directives '())
file-system-label
file-system-uuid
@@ -388,6 +389,9 @@ the image. By default, REGISTER-CLOSURES? is set to true
only if a service of
type GUIX-SERVICE-TYPE is present in the services definition of the operating
system.
+When DEVICE-NODES is 'linux, create Linux-device block and character devices
+under /dev. When it is 'hurd, do Hurdish things.
+
EXTRA-DIRECTIVES is an optional list of directives to populate the root file
system that is passed to 'populate-root-file-system'."
(define schema
@@ -407,6 +411,9 @@ system that is passed to 'populate-root-file-system'."
#~(begin
(use-modules (gnu build bootloader)
(gnu build vm)
+ ((gnu build linux-boot)
+ #:select (make-essential-device-nodes
+ make-hurd-device-nodes))
(guix store database)
(guix build utils)
(srfi srfi-26)
@@ -444,6 +451,11 @@ system that is passed to 'populate-root-file-system'."
#:register-closures? #$register-closures?
#:system-directory #$os
+ #:make-device-nodes
+ #$(match device-nodes
+ ('linux #~make-essential-device-nodes)
+ ('hurd #~make-hurd-device-nodes))
+
;; Disable deduplication to speed things up,
;; and because it doesn't help much for a
;; single system generation.
- 10/52: gnu: hurd: Ensure startup scripts refer to the right programs., (continued)
- 10/52: gnu: hurd: Ensure startup scripts refer to the right programs., guix-commits, 2020/04/09
- 11/52: gnu: guile@3: Disable JIT on GNU/Hurd., guix-commits, 2020/04/09
- 17/52: system: hurd: Add "/etc/passwd"., guix-commits, 2020/04/09
- 15/52: gnu: hurd: Add "hurd/sbin" to PATH., guix-commits, 2020/04/09
- 18/52: gnu: cross-libc: Add patch to allow 'gettyent' reading store file names., guix-commits, 2020/04/09
- 20/52: system: hurd: Add "/etc/shadow"., guix-commits, 2020/04/09
- 24/52: vm: Preserve file permissions on /dev., guix-commits, 2020/04/09
- 25/52: linux-boot: 'make-essential-device-nodes' root parameter is optional., guix-commits, 2020/04/09
- 19/52: system: hurd: Add "/bin/sh" symlink., guix-commits, 2020/04/09
- 16/52: system: hurd: Add ttys symlink in "/etc/ttys"., guix-commits, 2020/04/09
- 30/52: vm: Make the device node procedure a parameter.,
guix-commits <=
- 26/52: gnu: libgcrypt: Fix cross-compilation., guix-commits, 2020/04/09
- 23/52: database: 'reset-timestamps' can optionally preserve permissions., guix-commits, 2020/04/09
- 22/52: system: hurd: Create /etc/{hostname,motd,login} and /root., guix-commits, 2020/04/09
- 29/52: linux-boot: Add 'make-hurd-device-nodes'., guix-commits, 2020/04/09
- 28/52: gnu: guix: Apply courage for the Hurd., guix-commits, 2020/04/09
- 34/52: gnu: hurd: Add dependency on libgcrypt., guix-commits, 2020/04/09
- 32/52: system: hurd: Add guix., guix-commits, 2020/04/09
- 36/52: gnu: hurd: Install a BDF font., guix-commits, 2020/04/09
- 33/52: gnu: libdaemon: Allow cross-compilation., guix-commits, 2020/04/09
- 21/52: gnu: hurd: Install the UTF-8 motd., guix-commits, 2020/04/09