diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-03-09 10:41:46 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-08-16 23:00:27 +0200 |
commit | e1a9a7f2755dc23e1f4635c8aee45e1467c01619 (patch) | |
tree | 6a5f8b1735ba9cd697c21784ae24b8c3b80d73c0 /gnu/build/linux-modules.scm | |
parent | 2a693b69ca35ee942395e1adf458a666846881fc (diff) |
linux-modules: Add 'load-linux-modules-from-directory'.
* gnu/build/linux-modules.scm (load-linux-modules-from-directory): New
procedure.
* gnu/build/linux-boot.scm (boot-system)[lookup-module]: Remove.
Use 'load-linux-modules-from-directory' instead.
Diffstat (limited to 'gnu/build/linux-modules.scm')
-rw-r--r-- | gnu/build/linux-modules.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm index a73ccaf511..2af7c33d42 100644 --- a/gnu/build/linux-modules.scm +++ b/gnu/build/linux-modules.scm @@ -43,6 +43,7 @@ modules-loaded module-loaded? load-linux-module* + load-linux-modules-from-directory current-module-debugging-port @@ -314,6 +315,17 @@ appears in BLACK-LIST are not loaded." (or (and recursive? (= EEXIST (system-error-errno args))) (apply throw args))))))) +(define (load-linux-modules-from-directory modules directory) + "Load MODULES and their dependencies from DIRECTORY, a directory containing +the '.ko' files. The '.ko' suffix is automatically added to MODULES if +needed." + (define (lookup-module name) + (string-append directory "/" (ensure-dot-ko name))) + + (for-each (cut load-linux-module* <> + #:lookup-module lookup-module) + (map lookup-module modules))) + ;;; ;;; Device modules. |