GNU bug report logs - #30604
[PATCH 0/4] Load Linux module only when supported hardware is present.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Sun, 25 Feb 2018 11:47:02 UTC

Severity: important

Tags: patch

Full log


View this message in rfc822 format

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: 30604 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [bug#30604] [PATCH v5 7/7] linux-boot: Call make-static-device-nodes much earlier.
Date: Tue, 27 Feb 2018 16:50:51 +0100
* gnu/system/linux-initrd.scm (expression->initrd): Store data files for
make-static-device-nodes.
* gnu/build/linux-boot.scm (boot-system): Call make-static-device-nodes.
Delete lookup-module.
---
 gnu/build/linux-boot.scm    | 13 +++++++++----
 gnu/system/linux-initrd.scm |  3 ++-
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 6d00ea9be..1b16f267a 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -469,10 +469,6 @@ upon error."
              mounts)
         "ext4"))
 
-  (define (lookup-module name)
-    (string-append linux-module-directory "/"
-                   (ensure-dot-ko name)))
-
   (define (load-kernel-modules)
     "Examine /sys/devices to find out which modules to load and load them."
     (define enter?
@@ -512,6 +508,15 @@ upon error."
        (when (member "--repl" args)
          (start-repl))
 
+       (let* ((kernel-release
+               (utsname:release (uname)))
+              (directory
+               (string-append linux-module-directory "/lib/modules/"
+                              kernel-release))
+              (old-umask (umask #o022)))
+         (make-static-device-nodes directory)
+         (umask old-umask))
+
        (load-kernel-modules)
 
        (when qemu-guest-networking?




This bug report was last modified 5 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.