mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
1621cf97aa
commit
df650fa84e
2 changed files with 10 additions and 19 deletions
|
@ -3616,16 +3616,16 @@ program to run in that initrd.
|
||||||
|
|
||||||
@deffn {Monadic Procedure} expression->initrd @var{exp} @
|
@deffn {Monadic Procedure} expression->initrd @var{exp} @
|
||||||
[#:guile %guile-static-stripped] [#:name "guile-initrd"] @
|
[#:guile %guile-static-stripped] [#:name "guile-initrd"] @
|
||||||
[#:modules '()] [#:to-copy '()] [#:linux #f] @
|
[#:modules '()] [#:linux #f] @
|
||||||
[#:linux-modules '()]
|
[#:linux-modules '()]
|
||||||
Return a derivation that builds a Linux initrd (a gzipped cpio archive)
|
Return a derivation that builds a Linux initrd (a gzipped cpio archive)
|
||||||
containing @var{guile} and that evaluates @var{exp}, a G-expression,
|
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-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
|
@var{linux} into the initrd. @var{modules} is a list of Guile module
|
||||||
derivations or packages to copy to the initrd. @var{modules} is a list
|
names to be embedded in the initrd.
|
||||||
of Guile module names to be embedded in the initrd.
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@node Invoking guix system
|
@node Invoking guix system
|
||||||
|
|
|
@ -54,15 +54,14 @@
|
||||||
(name "guile-initrd")
|
(name "guile-initrd")
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
(modules '())
|
(modules '())
|
||||||
(to-copy '())
|
|
||||||
(linux #f)
|
(linux #f)
|
||||||
(linux-modules '()))
|
(linux-modules '()))
|
||||||
"Return a derivation that builds a Linux initrd (a gzipped cpio archive)
|
"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
|
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
|
initrd. MODULES is a list of Guile module names to be embedded in the
|
||||||
the initrd. MODULES is a list of Guile module names to be embedded in the
|
|
||||||
initrd."
|
initrd."
|
||||||
|
|
||||||
;; General Linux overview in `Documentation/early-userspace/README' and
|
;; General Linux overview in `Documentation/early-userspace/README' and
|
||||||
|
@ -71,15 +70,8 @@ initrd."
|
||||||
(mlet* %store-monad ((init (gexp->script "init" exp
|
(mlet* %store-monad ((init (gexp->script "init" exp
|
||||||
#:modules modules
|
#:modules modules
|
||||||
#:guile guile))
|
#:guile guile))
|
||||||
(to-copy -> (cons init to-copy))
|
|
||||||
(module-dir (flat-linux-module-directory linux
|
(module-dir (flat-linux-module-directory linux
|
||||||
linux-modules)))
|
linux-modules)))
|
||||||
(define graph-files
|
|
||||||
(unfold-right zero?
|
|
||||||
number->string
|
|
||||||
1-
|
|
||||||
(length to-copy)))
|
|
||||||
|
|
||||||
(define builder
|
(define builder
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (gnu build linux-initrd))
|
(use-modules (gnu build linux-initrd))
|
||||||
|
@ -88,7 +80,7 @@ initrd."
|
||||||
(build-initrd (string-append #$output "/initrd")
|
(build-initrd (string-append #$output "/initrd")
|
||||||
#:guile #$guile
|
#:guile #$guile
|
||||||
#:init #$init
|
#:init #$init
|
||||||
#:references-graphs '#$graph-files
|
#:references-graphs '("closure")
|
||||||
#:linux-module-directory #$module-dir
|
#:linux-module-directory #$module-dir
|
||||||
#:cpio (string-append #$cpio "/bin/cpio")
|
#:cpio (string-append #$cpio "/bin/cpio")
|
||||||
#:gzip (string-append #$gzip "/bin/gzip"))))
|
#:gzip (string-append #$gzip "/bin/gzip"))))
|
||||||
|
@ -97,7 +89,7 @@ initrd."
|
||||||
#:modules '((guix build utils)
|
#:modules '((guix build utils)
|
||||||
(guix build store-copy)
|
(guix build store-copy)
|
||||||
(gnu build linux-initrd))
|
(gnu build linux-initrd))
|
||||||
#:references-graphs (zip graph-files to-copy))))
|
#:references-graphs `(("closure" ,init)))))
|
||||||
|
|
||||||
(define (flat-linux-module-directory linux modules)
|
(define (flat-linux-module-directory linux modules)
|
||||||
"Return a flat directory containing the Linux kernel modules listed in
|
"Return a flat directory containing the Linux kernel modules listed in
|
||||||
|
@ -229,7 +221,6 @@ exception and backtrace!)."
|
||||||
#:modules '((guix build utils)
|
#:modules '((guix build utils)
|
||||||
(gnu build linux-boot)
|
(gnu build linux-boot)
|
||||||
(gnu build file-systems))
|
(gnu build file-systems))
|
||||||
#:to-copy helper-packages
|
|
||||||
#:linux linux-libre
|
#:linux linux-libre
|
||||||
#:linux-modules linux-modules))
|
#:linux-modules linux-modules))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue