summary refs log tree commit diff
path: root/gnu/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-11-11 22:42:15 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-11 22:42:39 +0100
commitf34c56be3a53c10d9a267331a0a6119c79c815a0 (patch)
treed227f6eeb076321f5e26ef62a4965505e2ad3098 /gnu/build
parent1306b0b003a557105d3b27e44052db217c7283d3 (diff)
downloadguix-f34c56be3a53c10d9a267331a0a6119c79c815a0.tar.gz
activation: Set the firmware search path.
* gnu/build/activation.scm (activate-firmware): New procedure.
* gnu/system.scm (<operating-system>)[firmware]: New field.
  (directory-union): New procedure.
  (%base-firmware): New variable.
  (operating-system-activation-script): Use 'directory-union', and call
  'activate-firmware'.
* doc/guix.texi (operating-system Reference): Document 'firmware'.
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/activation.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index 142ed8f693..3eebb71dfc 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -28,6 +28,7 @@
             activate-setuid-programs
             activate-/bin/sh
             activate-modprobe
+            activate-firmware
             activate-current-system))
 
 ;;; Commentary:
@@ -259,6 +260,15 @@ copy SOURCE to TARGET."
     (lambda (port)
       (display modprobe port))))
 
+(define (activate-firmware directory)
+  "Tell the kernel to look for device firmware under DIRECTORY.  This
+mechanism bypasses udev: it allows Linux to handle firmware loading directly
+by itself, without having to resort to a \"user helper\"."
+  (call-with-output-file "/sys/module/firmware_class/parameters/path"
+    (lambda (port)
+      (display directory port))))
+
+
 (define %current-system
   ;; The system that is current (a symlink.)  This is not necessarily the same
   ;; as the system we booted (aka. /run/booted-system) because we can re-build