[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/07: activation: Firmware activation handles missing support in kernel
From: |
guix-commits |
Subject: |
02/07: activation: Firmware activation handles missing support in kernel. |
Date: |
Sat, 17 Dec 2022 11:09:32 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit 4d94cdf69889043dd8d9b1305f5f3946ec0f8ff6
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Dec 15 16:28:14 2022 +0100
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.
---
gnu/build/activation.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index 10c9045740..eea2233563 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -363,9 +363,14 @@ second element is the name it should appear at, such as:
"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))))
+
+ ;; If the kernel was built without firmware loading support, this file
+ ;; 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)
"Allow users to PTRACE_ATTACH their own processes.
- branch master updated (491bddfa27 -> 810b455013), guix-commits, 2022/12/17
- 02/07: activation: Firmware activation handles missing support in kernel.,
guix-commits <=
- 07/07: gnu: QEMU: Update to 7.2.0., guix-commits, 2022/12/17
- 01/07: services: ganeti: Add support for cluster hooks., guix-commits, 2022/12/17
- 03/07: gnu: ungoogled-chromium: Update to 108.0.5359.124-1., guix-commits, 2022/12/17
- 04/07: gnu: SeaBIOS: Update to 1.16.1., guix-commits, 2022/12/17
- 05/07: gnu: SeaBIOS: Build verbosely., guix-commits, 2022/12/17
- 06/07: gnu: SeaBIOS: Simplify build., guix-commits, 2022/12/17