diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-09-08 23:46:48 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-09-08 23:47:29 +0200 |
commit | 42d10464bedb43a9211d8bc187e668fe33272368 (patch) | |
tree | 5920fcb26601739f079e565ba46f7cf732090eed /gnu/system | |
parent | df650fa84e15bfd65245adcd454c0433ad8c6121 (diff) | |
download | guix-42d10464bedb43a9211d8bc187e668fe33272368.tar.gz |
linux-initrd: Store Linux modules in a normal store directory.
* gnu/system/linux-initrd.scm (expression->initrd): Remove #:linux and #:linux-modules parameters. Remove call to 'float-linux-module-directory'. (base-initrd): Add call to 'float-linux-module-directory'. Use it in #:linux-modules argument in the gexp. Remove #:linux and #:linux-modules arguments to 'expression->initrd'. * gnu/build/linux-initrd.scm (build-initrd): Remove #:linux-module-directory parameter. Don't create 'modules' sub-directory. * gnu/build/linux-boot.scm (boot-system): Mentin that LINUX-MODULES is a list of absolute file names. Don't prepend "/modules/" to LINUX-MODULES. * doc/guix.texi (Initial RAM Disk): Adjust accordingly.
Diffstat (limited to 'gnu/system')
-rw-r--r-- | gnu/system/linux-initrd.scm | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 03ac24d450..e83a9a5b23 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -34,6 +34,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:export (expression->initrd base-initrd)) @@ -53,25 +54,19 @@ (gzip gzip) (name "guile-initrd") (system (%current-system)) - (modules '()) - (linux #f) - (linux-modules '())) + (modules '())) "Return a derivation that builds a Linux initrd (a gzipped cpio archive) 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. 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 ;; `Documentation/filesystems/ramfs-rootfs-initramfs.txt'. - (mlet* %store-monad ((init (gexp->script "init" exp - #:modules modules - #:guile guile)) - (module-dir (flat-linux-module-directory linux - linux-modules))) + (mlet %store-monad ((init (gexp->script "init" exp + #:modules modules + #:guile guile))) (define builder #~(begin (use-modules (gnu build linux-initrd)) @@ -80,8 +75,8 @@ initrd." (build-initrd (string-append #$output "/initrd") #:guile #$guile #:init #$init + ;; Copy everything INIT refers to into the initrd. #:references-graphs '("closure") - #:linux-module-directory #$module-dir #:cpio (string-append #$cpio "/bin/cpio") #:gzip (string-append #$gzip "/bin/gzip")))) @@ -201,27 +196,29 @@ exception and backtrace!)." (list unionfs-fuse/static) '()))) - (expression->initrd - #~(begin - (use-modules (gnu build linux-boot) - (guix build utils) - (srfi srfi-26)) - - (with-output-to-port (%make-void-port "w") - (lambda () - (set-path-environment-variable "PATH" '("bin" "sbin") - '#$helper-packages))) - - (boot-system #:mounts '#$(map file-system->spec file-systems) - #:linux-modules '#$linux-modules - #:qemu-guest-networking? #$qemu-networking? - #:guile-modules-in-chroot? '#$guile-modules-in-chroot? - #:volatile-root? '#$volatile-root?)) - #:name "base-initrd" - #:modules '((guix build utils) - (gnu build linux-boot) - (gnu build file-systems)) - #:linux linux-libre - #:linux-modules linux-modules)) + (mlet %store-monad ((kodir (flat-linux-module-directory linux-libre + linux-modules))) + (expression->initrd + #~(begin + (use-modules (gnu build linux-boot) + (guix build utils) + (srfi srfi-26)) + + (with-output-to-port (%make-void-port "w") + (lambda () + (set-path-environment-variable "PATH" '("bin" "sbin") + '#$helper-packages))) + + (boot-system #:mounts '#$(map file-system->spec file-systems) + #:linux-modules (map (lambda (file) + (string-append #$kodir "/" file)) + '#$linux-modules) + #:qemu-guest-networking? #$qemu-networking? + #:guile-modules-in-chroot? '#$guile-modules-in-chroot? + #:volatile-root? '#$volatile-root?)) + #:name "base-initrd" + #:modules '((guix build utils) + (gnu build linux-boot) + (gnu build file-systems))))) ;;; linux-initrd.scm ends here |