[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/16: vm: Make the device node procedure a parameter.
From: |
guix-commits |
Subject: |
05/16: vm: Make the device node procedure a parameter. |
Date: |
Sat, 11 Apr 2020 15:09:11 -0400 (EDT) |
civodul pushed a commit to branch core-updates
in repository guix.
commit cd45d656f1e8746fadacfbffd5740d22228c4c21
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/build/vm.scm | 4 +++-
gnu/system/vm.scm | 12 ++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index c062ab5..d2bf741 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -371,6 +371,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.
@@ -392,7 +394,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/vm.scm b/gnu/system/vm.scm
index 65e96d4..e8c2f6e 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -369,6 +369,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
@@ -397,6 +398,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
@@ -416,6 +420,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)
@@ -453,6 +460,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.
- branch core-updates updated (916ec91 -> 5084fd3), guix-commits, 2020/04/11
- 01/16: database: 'reset-timestamps' can optionally preserve permissions., guix-commits, 2020/04/11
- 02/16: vm: Preserve file permissions on /dev., guix-commits, 2020/04/11
- 04/16: linux-boot: Add 'make-hurd-device-nodes'., guix-commits, 2020/04/11
- 03/16: linux-boot: 'make-essential-device-nodes' root parameter is optional., guix-commits, 2020/04/11
- 05/16: vm: Make the device node procedure a parameter.,
guix-commits <=
- 09/16: system: hurd: Add /etc/{passwd,shadow}., guix-commits, 2020/04/11
- 08/16: system: hurd: Add ttys symlink in "/etc/ttys"., guix-commits, 2020/04/11
- 10/16: system: hurd: Add "/bin/sh" symlink., guix-commits, 2020/04/11
- 11/16: system: hurd: Create /etc/{hostname,motd,login} and /root., guix-commits, 2020/04/11
- 14/16: system: hurd: Create a proper profile., guix-commits, 2020/04/11
- 07/16: system: hurd: Add "/etc/fstab"., guix-commits, 2020/04/11
- 13/16: gnu: hurd: "/libexec/rc" spawns the console client., guix-commits, 2020/04/11
- 12/16: system: hurd: Add root profile., guix-commits, 2020/04/11
- 06/16: Add (gnu system hurd)., guix-commits, 2020/04/11
- 15/16: system: hurd: Add net-base and inetutils, and /etc/{services, protocols}., guix-commits, 2020/04/11