mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 14:07:01 +01:00
activation: Firmware activation handles missing support in kernel.
* gnu/build/activation.scm (activate-firmware): Check if firmware loading is enabled before attempting to use it.
This commit is contained in:
parent
88908c6edc
commit
4d94cdf698
1 changed files with 8 additions and 3 deletions
|
@ -363,9 +363,14 @@ (define (activate-firmware directory)
|
||||||
"Tell the kernel to look for device firmware under DIRECTORY. This
|
"Tell the kernel to look for device firmware under DIRECTORY. This
|
||||||
mechanism bypasses udev: it allows Linux to handle firmware loading directly
|
mechanism bypasses udev: it allows Linux to handle firmware loading directly
|
||||||
by itself, without having to resort to a \"user helper\"."
|
by itself, without having to resort to a \"user helper\"."
|
||||||
(call-with-output-file "/sys/module/firmware_class/parameters/path"
|
|
||||||
(lambda (port)
|
;; If the kernel was built without firmware loading support, this file
|
||||||
(display directory port))))
|
;; does not exist. Do nothing in that case.
|
||||||
|
(let ((firmware-path "/sys/module/firmware_class/parameters/path"))
|
||||||
|
(when (file-exists? firmware-path)
|
||||||
|
(call-with-output-file firmware-path
|
||||||
|
(lambda (port)
|
||||||
|
(display directory port))))))
|
||||||
|
|
||||||
(define (activate-ptrace-attach)
|
(define (activate-ptrace-attach)
|
||||||
"Allow users to PTRACE_ATTACH their own processes.
|
"Allow users to PTRACE_ATTACH their own processes.
|
||||||
|
|
Loading…
Reference in a new issue