From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kCW7L2jynGMfBAEAbAwnHQ (envelope-from ) for ; Fri, 16 Dec 2022 23:34:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cF7pLmjynGPKqQAAG6o9tA (envelope-from ) for ; Fri, 16 Dec 2022 23:34:16 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 17C9D3AEA8 for ; Fri, 16 Dec 2022 23:34:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6Izu-0005DB-1G; Fri, 16 Dec 2022 17:16:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6Izq-0005CK-Ok for guix-patches@gnu.org; Fri, 16 Dec 2022 17:16:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Izq-0007cI-BQ for guix-patches@gnu.org; Fri, 16 Dec 2022 17:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6Izq-0007RZ-6y for guix-patches@gnu.org; Fri, 16 Dec 2022 17:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60129] [PATCH 1/2] activation: Firmware activation handles missing support in kernel. References: <20221216221147.13945-1-marius@gnu.org> In-Reply-To: <20221216221147.13945-1-marius@gnu.org> Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Dec 2022 22:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60129 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60129@debbugs.gnu.org Received: via spool by 60129-submit@debbugs.gnu.org id=B60129.167122894428594 (code B ref 60129); Fri, 16 Dec 2022 22:16:02 +0000 Received: (at 60129) by debbugs.gnu.org; 16 Dec 2022 22:15:44 +0000 Received: from localhost ([127.0.0.1]:51836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6IzY-0007R8-6Y for submit@debbugs.gnu.org; Fri, 16 Dec 2022 17:15:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6IzW-0007R1-FH for 60129@debbugs.gnu.org; Fri, 16 Dec 2022 17:15:42 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6IzR-0007TM-6M for 60129@debbugs.gnu.org; Fri, 16 Dec 2022 17:15:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=w50SPAK0Sfe7sSl4GYNbv8uZlBXP/h4h1Xu2YRtKvfM=; b=UEwarNHj9st5O2 t9HVbfjUYo5Z63dgXIp92n2KRT4YIguV7d72hMbnzfp90PUO65F+q33Wxftu2n/GtC8c0bFexh0Nr 2woL+ESbROMl9+NDpYmD+oOYlyGxxX4PnAKGyiuqfHlagmeSFX4YBqAXLYEyebIk6VewfWjgXVS5Z jmPRQwEiD1f0bRaT/xKJYVDjBLhiXMs5xDAfOuS2HwfeiQfZHtjpPN6vi6I/sd6nqd8AmkzRyA8XD O+uj0Zs2qdPtLYg9AfdodeJwZZrHs4+qkWxccf54C1gJQrFc866Y8Rr5l7fblJtiSlePeFoayWZSx yACwZrWzE5IZfxv8ThqA==; Received: from [188.113.115.135] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6IzQ-00059X-Ih for 60129@debbugs.gnu.org; Fri, 16 Dec 2022 17:15:37 -0500 From: Marius Bakke Date: Fri, 16 Dec 2022 23:15:33 +0100 Message-Id: <20221216221534.14500-1-marius@gnu.org> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671230056; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=w50SPAK0Sfe7sSl4GYNbv8uZlBXP/h4h1Xu2YRtKvfM=; b=GTCuFMg5UEgHMBacRZV/GYljvSstcJnet4l1A5G/d74UGLNE2OJzQyzhhctvZM0MNnqxpa JtY30Epk3hoOIER17ZB1yDnG33PrVzN4Jh+HQdNIKPOye22ggDyUW2SDYOYbMfJcbliKsV +PD2wy06W24/Ph3VZAonMiFUzcGoRS05ypDQCqthFKiiFFJdyY6uB2e8Gp2YU7/FyXRUEN R+X4BYFWHjjHYv5bRwcXaSTBY53mJsgdtmdAAJENp1vbkh0wlx8i5YPsw8lPHKbt9U45Ly 95Oh6h9ornC5ag4Y+lIg1C5VrS/P0d0n8orjXIBmzWJclKbMUyZpUyq0qjisBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=UEwarNHj; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671230056; a=rsa-sha256; cv=none; b=UwSrtgc5hal45Xh6xInfQ41dpzfp/KdN+5vx6VMqdvy7X6Rpk3faCzM98HJb+iv+1SsZFx eUX90KzIBEvj/L9BPFHtA8bRgW++ZMLDB5IYbE601WSrpCuD7WQHaB0HHtt9pHuou424NW d/Xzu+SkPxM1ICL+DxTGe40dTWc/O7jJ/B3hbnTReJ/9/vQYtt+/v/t1oq1eWrZwysweRn 17NELOu9hrCQRiqSYdpjdgPEo9+64EMoPqpliOpASh/x7ZIv4fRvCunypYdK7x7JX7dgtg RdRzBw4+DUG5nOoZZUNBHf7Ko071RHUvu1BJrtsZWEfcYNQ1VhIhUWk0pY4WWw== X-Migadu-Spam-Score: -3.28 X-Spam-Score: -3.28 X-Migadu-Queue-Id: 17C9D3AEA8 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=UEwarNHj; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: IKhRlwQVSfTi * gnu/build/activation.scm (activate-firmware): Check if firmware loading is enabled before attempting to use it. --- gnu/build/activation.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 10c9045740..af1aa0f4c4 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -363,9 +363,12 @@ (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)))) + ;; If the kernel was built without firmware loading support, this file + ;; does not exist. Do nothing in that case. + (when (file-exists? "/sys/module/firmware_class/parameters/path") + (call-with-output-file "/sys/module/firmware_class/parameters/path" + (lambda (port) + (display directory port))))) (define (activate-ptrace-attach) "Allow users to PTRACE_ATTACH their own processes. -- 2.38.0