From 70608adb4a054438a9dee4abcf63858f3d0dfded Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 8 Sep 2014 22:26:05 +0200 Subject: 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. --- gnu/build/linux-boot.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/build/linux-boot.scm') diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 21ee58ad50..1312da6bbd 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -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))) -- cgit v1.2.3