From 89bf140b10ae24755bf9d2b789b945d29ff11937 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 31 Aug 2013 14:52:12 +0200 Subject: gnu: linux-initrd: Make Guile modules accessible in the chroot. * gnu/packages/linux-initrd.scm (qemu-initrd): Add (guix build utils) to #:modules, and use it. Copy .scm and .go files to /root. * guix/build/linux-initrd.scm (bind-mount): New procedure. --- guix/build/linux-initrd.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'guix/build') diff --git a/guix/build/linux-initrd.scm b/guix/build/linux-initrd.scm index 274eef7ff3..81f9e46cfb 100644 --- a/guix/build/linux-initrd.scm +++ b/guix/build/linux-initrd.scm @@ -23,6 +23,7 @@ (define-module (guix build linux-initrd) linux-command-line configure-qemu-networking mount-qemu-smb-share + bind-mount load-linux-module* device-number)) @@ -92,6 +93,12 @@ (define (mount-qemu-smb-share share mount-point) (mount (string-append "//" server share) mount-point "cifs" 0 (string->pointer "guest,sec=none")))) +(define (bind-mount source target) + "Bind-mount SOURCE at TARGET." + (define MS_BIND 4096) ; from libc's + + (mount source target "" MS_BIND)) + (define (load-linux-module* file) "Load Linux module from FILE, the name of a `.ko' file." (define (slurp module) -- cgit v1.2.3