linux-initrd: Remove now obsolete #:guile-modules-in-chroot? parameter.

* gnu/build/linux-boot.scm (boot-system): Remove
  #:guile-modules-in-chroot? and related code.
* gnu/system/linux-initrd.scm (base-initrd): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Remove
  #:guile-modules-in-chroot? argument in 'base-initrd' call.
This commit is contained in:
Ludovic Courtès 2014-09-18 23:05:22 +02:00
parent dbcb0ab1a9
commit 6c1df0819c
3 changed files with 3 additions and 28 deletions

View file

@ -339,7 +339,6 @@ (define (switch-root root)
(define* (boot-system #:key (define* (boot-system #:key
(linux-modules '()) (linux-modules '())
qemu-guest-networking? qemu-guest-networking?
guile-modules-in-chroot?
volatile-root? volatile-root?
(mounts '())) (mounts '()))
"This procedure is meant to be called from an initrd. Boot a system by "This procedure is meant to be called from an initrd. Boot a system by
@ -354,9 +353,6 @@ (define* (boot-system #:key
MOUNTS must be a list suitable for 'mount-file-system'. MOUNTS must be a list suitable for 'mount-file-system'.
When GUILE-MODULES-IN-CHROOT? is true, make core Guile modules available in
the new root.
When VOLATILE-ROOT? is true, the root file system is writable but any changes When VOLATILE-ROOT? is true, the root file system is writable but any changes
to it are lost." to it are lost."
(define root-mount-point? (define root-mount-point?
@ -411,19 +407,6 @@ (define root-fs-type
(for-each mount-file-system (for-each mount-file-system
(remove root-mount-point? mounts)) (remove root-mount-point? mounts))
(when guile-modules-in-chroot?
;; Copy the directories that contain .scm and .go files so that the
;; child process in the chroot can load modules (we would bind-mount
;; them but for some reason that fails with EINVAL -- XXX).
(mkdir-p "/root/share")
(mkdir-p "/root/lib")
(mount "none" "/root/share" "tmpfs")
(mount "none" "/root/lib" "tmpfs")
(copy-recursively "/share" "/root/share"
#:log (%make-void-port "w"))
(copy-recursively "/lib" "/root/lib"
#:log (%make-void-port "w")))
(if to-load (if to-load
(begin (begin
(switch-root "/root") (switch-root "/root")

View file

@ -129,8 +129,7 @@ (define* (base-initrd file-systems
qemu-networking? qemu-networking?
virtio? virtio?
volatile-root? volatile-root?
(extra-modules '()) (extra-modules '()))
guile-modules-in-chroot?)
;; TODO: Support boot-time device mappings. ;; TODO: Support boot-time device mappings.
"Return a monadic derivation that builds a generic initrd. FILE-SYSTEMS is "Return a monadic derivation that builds a generic initrd. FILE-SYSTEMS is
a list of file-systems to be mounted by the initrd, possibly in addition to a list of file-systems to be mounted by the initrd, possibly in addition to
@ -146,12 +145,7 @@ (define* (base-initrd file-systems
The initrd is automatically populated with all the kernel modules necessary The initrd is automatically populated with all the kernel modules necessary
for FILE-SYSTEMS and for the given options. However, additional kernel for FILE-SYSTEMS and for the given options. However, additional kernel
modules can be listed in EXTRA-MODULES. They will be added to the initrd, and modules can be listed in EXTRA-MODULES. They will be added to the initrd, and
loaded at boot time in the order in which they appear. loaded at boot time in the order in which they appear."
When GUILE-MODULES-IN-CHROOT? is true, make core Guile modules available in
the new root. This is necessary is the file specified as '--load' needs
access to these modules (which is the case if it wants to even just print an
exception and backtrace!)."
(define virtio-modules (define virtio-modules
;; Modules for Linux para-virtualized devices, for use in QEMU guests. ;; Modules for Linux para-virtualized devices, for use in QEMU guests.
'("virtio.ko" "virtio_ring.ko" "virtio_pci.ko" '("virtio.ko" "virtio_ring.ko" "virtio_pci.ko"
@ -215,7 +209,6 @@ (define helper-packages
(string-append #$kodir "/" file)) (string-append #$kodir "/" file))
'#$linux-modules) '#$linux-modules)
#:qemu-guest-networking? #$qemu-networking? #:qemu-guest-networking? #$qemu-networking?
#:guile-modules-in-chroot? '#$guile-modules-in-chroot?
#:volatile-root? '#$volatile-root?)) #:volatile-root? '#$volatile-root?))
#:name "base-initrd" #:name "base-initrd"
#:modules '((guix build utils) #:modules '((guix build utils)

View file

@ -159,8 +159,7 @@ (define* (expression->derivation-in-linux-vm name exp
(return initrd) (return initrd)
(base-initrd %linux-vm-file-systems (base-initrd %linux-vm-file-systems
#:virtio? #t #:virtio? #t
#:qemu-networking? #t #:qemu-networking? #t))))
#:guile-modules-in-chroot? #t))))
(define builder (define builder
;; Code that launches the VM that evaluates EXP. ;; Code that launches the VM that evaluates EXP.