diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index c062ab5c71..d2bf7418fd 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -371,6 +371,8 @@ (define* (root-partition-initializer #:key (closures '()) (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 @@ (define target-store 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 65e96d42ee..e8c2f6e162 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -369,6 +369,7 @@ (define* (qemu-image #:key (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 @@ (define* (qemu-image #:key 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 @@ (define schema #~(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 @@ (define schema #: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.