aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-09-08 23:27:40 +0200
committerLudovic Courtès <ludo@gnu.org>2014-09-08 23:47:28 +0200
commitdf650fa84e15bfd65245adcd454c0433ad8c6121 (patch)
treeeb6295fc93d0730eab06cea8f2e2fb596c6c4cb3
parent1621cf97aa0b0e19a53366479abe19f602f5f9da (diff)
downloadgnu-guix-df650fa84e15bfd65245adcd454c0433ad8c6121.tar
gnu-guix-df650fa84e15bfd65245adcd454c0433ad8c6121.tar.gz
linux-initrd: Remove #:to-copy argument of 'expression->initrd'.
* gnu/system/linux-initrd.scm (expression->initrd): Remove #:to-copy parameter. Remove 'graph-files', and adjust #:references-graphs arguments to just list INIT. (base-initrd): Remove #:to-copy argument. * doc/guix.texi (Initial RAM Disk): Adjust accordingly.
-rw-r--r--doc/guix.texi10
-rw-r--r--gnu/system/linux-initrd.scm19
2 files changed, 10 insertions, 19 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index e0251f5ffd..1e8a55e9a5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3616,16 +3616,16 @@ program to run in that initrd.
@deffn {Monadic Procedure} expression->initrd @var{exp} @
[#:guile %guile-static-stripped] [#:name "guile-initrd"] @
- [#:modules '()] [#:to-copy '()] [#:linux #f] @
+ [#:modules '()] [#:linux #f] @
[#:linux-modules '()]
Return a derivation that builds a Linux initrd (a gzipped cpio archive)
containing @var{guile} and that evaluates @var{exp}, a G-expression,
-upon booting.
+upon booting. All the derivations referenced by @var{exp} are
+automatically copied to the initrd.
@var{linux-modules} is a list of @file{.ko} file names to be copied from
-@var{linux} into the initrd. @var{to-copy} is a list of additional
-derivations or packages to copy to the initrd. @var{modules} is a list
-of Guile module names to be embedded in the initrd.
+@var{linux} into the initrd. @var{modules} is a list of Guile module
+names to be embedded in the initrd.
@end deffn
@node Invoking guix system
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index c2c8722ebb..03ac24d450 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -54,15 +54,14 @@
(name "guile-initrd")
(system (%current-system))
(modules '())
- (to-copy '())
(linux #f)
(linux-modules '()))
"Return a derivation that builds a Linux initrd (a gzipped cpio archive)
-containing GUILE and that evaluates EXP, a G-expression, upon booting.
+containing GUILE and that evaluates EXP, a G-expression, upon booting. All
+the derivations referenced by EXP are automatically copied to the initrd.
LINUX-MODULES is a list of '.ko' file names to be copied from LINUX into the
-initrd. TO-COPY is a list of additional derivations or packages to copy to
-the initrd. MODULES is a list of Guile module names to be embedded in the
+initrd. MODULES is a list of Guile module names to be embedded in the
initrd."
;; General Linux overview in `Documentation/early-userspace/README' and
@@ -71,15 +70,8 @@ initrd."
(mlet* %store-monad ((init (gexp->script "init" exp
#:modules modules
#:guile guile))
- (to-copy -> (cons init to-copy))
(module-dir (flat-linux-module-directory linux
linux-modules)))
- (define graph-files
- (unfold-right zero?
- number->string
- 1-
- (length to-copy)))
-
(define builder
#~(begin
(use-modules (gnu build linux-initrd))
@@ -88,7 +80,7 @@ initrd."
(build-initrd (string-append #$output "/initrd")
#:guile #$guile
#:init #$init
- #:references-graphs '#$graph-files
+ #:references-graphs '("closure")
#:linux-module-directory #$module-dir
#:cpio (string-append #$cpio "/bin/cpio")
#:gzip (string-append #$gzip "/bin/gzip"))))
@@ -97,7 +89,7 @@ initrd."
#:modules '((guix build utils)
(guix build store-copy)
(gnu build linux-initrd))
- #:references-graphs (zip graph-files to-copy))))
+ #:references-graphs `(("closure" ,init)))))
(define (flat-linux-module-directory linux modules)
"Return a flat directory containing the Linux kernel modules listed in
@@ -229,7 +221,6 @@ exception and backtrace!)."
#:modules '((guix build utils)
(gnu build linux-boot)
(gnu build file-systems))
- #:to-copy helper-packages
#:linux linux-libre
#:linux-modules linux-modules))