linux-initrd: Copy all the script's closure to the initrd.

* gnu/system/linux-initrd.scm (expression->initrd): Remove calls to
  'imported-modules' and 'compiled-modules'.  Use 'gexp->script' with
  EXP.  Add the result to TO-COPY.  Make /init a symlink to that script,
  and copy its closure into the "contents" directory.  Add fake
  /proc/self/exe symlink.
* gnu/build/linux-boot.scm (load-linux-module*): Add comment about mmap.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add "-m
  256".  This turns out to be needed for initrds containing things like
  e2fsck and several modules; with the default of 128 MiB, loading
  libahci.ko may fail with -1.
This commit is contained in:
Ludovic Courtès 2014-09-08 22:26:05 +02:00
parent c2619e10ea
commit 70608adb4a
3 changed files with 56 additions and 61 deletions

View file

@ -221,6 +221,7 @@ networking values.) Return #t if INTERFACE is up, #f otherwise."
(define (load-linux-module* file)
"Load Linux module from FILE, the name of a `.ko' file."
(define (slurp module)
;; TODO: Use 'mmap' to reduce memory usage.
(call-with-input-file file get-bytevector-all))
(load-linux-module (slurp file)))