From 044d1478c9a63a64547c9cc320008f8d8fbf6791 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Sun, 5 Apr 2020 07:28:03 +0200 Subject: gnu: Add kernel-module-loader-service. * doc/guix.texi (Linux Services): Add a new subsection and document the new service and its configuration. * gnu/services/linux.scm (kernel-module-loader-service-type): New type. (kernel-module-loader-shepherd-service): New procedure. * gnu/tests/linux-modules.scm (module-loader-program): Procedure removed. (modules-loaded?-program): New procedure. (run-loadable-kernel-modules-test): 'module-loader-program' procedure replaced by the new one. [os]: Use 'kernel-module-loader-service'. Signed-off-by: Danny Milosavljevic --- doc/guix.texi | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 8cb85fe62c..bc5602474e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -76,6 +76,7 @@ Copyright @copyright{} 2020 Damien Cassou@* Copyright @copyright{} 2020 Jakub Kądziołka@* Copyright @copyright{} 2020 Jack Hill@* Copyright @copyright{} 2020 Naga Malleswari@* +Copyright @copyright{} 2020 Brice Waegeneire@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -25383,6 +25384,42 @@ notifications. @end table @end deftp +@cindex modprobe +@cindex kernel module loader +@subsubsection Kernel Module Loader Service + +The kernel module loader service allows one to load loadable kernel +modules at boot. This is especially useful for modules that don't +autoload and need to be manually loaded, as it's the case with +@code{ddcci}. + +@deffn {Scheme Variable} kernel-module-loader-service-type +The service type for loading loadable kernel modules at boot with +@command{modprobe}. Its value must be a list of strings representing +module names. For example loading the drivers provided by +@code{ddcci-driver-linux}, in debugging mode by passing some module +parameters, can be done as follow: + +@lisp +(use-modules (gnu) (gnu services)) +(use-package-modules linux) +(use-service-modules linux) + +(define ddcci-config + (plain-file "ddcci.conf" + "options ddcci dyndbg delay=120")) + +(operating-system + ... + (services (cons* (service kernel-module-loader-service-type + '("ddcci" "ddcci_backlight")) + (simple-service 'ddcci-config etc-service-type + (list `("modprobe.d/ddcci.conf" + ,ddcci-config))) + %base-services)) + (kernel-loadable-modules (list ddcci-driver-linux))) +@end lisp +@end deffn @node Miscellaneous Services @subsection Miscellaneous Services -- cgit v1.2.3