[PATCH] gnu: linux-libre: enable hidraw by default

  • Open
  • quality assurance status badge
Details
3 participants
  • Tobias Geerinckx-Rice
  • Pavel Shlyak
  • Tom Fitzhenry
Owner
unassigned
Submitted by
Tom Fitzhenry
Severity
normal
T
T
Tom Fitzhenry wrote on 5 Jun 2022 14:02
(address . guix-patches@gnu.org)(name . Tom Fitzhenry)(address . tom@tom-fitzhenry.me.uk)
20220605120222.1902-1-tom@tom-fitzhenry.me.uk
* gnu/packages/linux.scm (%default-extra-linux-options): Enable CONFIG_HIDRAW.

hidraw is needed to create /dev/hidraw* devices, commonly used for U2F
devices, e.g. via libu2f-host.

CONFIG_HIDRAW is not enabled in the mainline arm64 defconfig, but is enabled
on:
* the mainline x86_64 defconfig
* gnu/packages/aux-files/linux-libre/*arm64.conf

HIDRAW's Kconfig documentation advises "If unsure, say Y."[0]

Tested by compiling and running linux-libre-arm64-generic, and observing that
/dev/hidraw* devices are created, and SSH-via-U2F now works.

0. Linux kernel, drivers/hid/Kconfig

Signed-off-by: Tom Fitzhenry <tom@tom-fitzhenry.me.uk>
---
gnu/packages/linux.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 4fc0ac16af..12e0db23c4 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -687,6 +687,8 @@ (define %default-extra-linux-options
("CONFIG_MEMCG_KMEM" . #t)
("CONFIG_CPUSETS" . #t)
("CONFIG_PROC_PID_CPUSET" . #t)
+ ;; Enable hidraw by default
+ ("CONFIG_HIDRAW" . #t)
;; Allow disk encryption by default
("CONFIG_DM_CRYPT" . m)
;; Modules required for initrd:

base-commit: 8334e7c36ba7266fdbcf783d80c02a072cf1347b
--
2.36.1
P
P
Pavel Shlyak wrote on 5 Jun 2022 14:23
(address . 55805@debbugs.gnu.org)
DAA819AB-A4D7-4EC2-B749-C30343883144@pantherx.org
Nice idea. Good to merge.
T
T
Tobias Geerinckx-Rice wrote on 5 Jun 2022 15:15
(name . Tom Fitzhenry)(address . tom@tom-fitzhenry.me.uk)
87leubgsj5@nckx
Hi Tom,

Tom Fitzhenry ???
Toggle quote (3 lines)
> + ;; Enable hidraw by default
> + ("CONFIG_HIDRAW" . #t)

I agree with the content of this change, but why add it here & not
to the kernel configuration aux-files?

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYpysjg0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15xL4A/jX2rPuH8dcUh9R5dHHXYDNuXMI+kqCuA6Sfa7qU
dp/YAQDV/02x4DeXYFp5r1npKCAOxJzW5lBc02pF/8aT7BKSDg==
=cem+
-----END PGP SIGNATURE-----

T
T
Tom Fitzhenry wrote on 5 Jun 2022 15:46
(name . Tobias Geerinckx-Rice via Guix-patches via)(address . guix-patches@gnu.org)
87czfndy05.fsf@tom-fitzhenry.me.uk
Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
writes:

Toggle quote (3 lines)
> I agree with the content of this change, but why add it here & not to
> the kernel configuration aux-files?

My understanding of gnu/packages/linux.scm is that kernels come in two
forms:

i. "-generic" kernels, which build their .config via mainline defconfig +
#:extra-options.
ii. non "-generic" kernels, which use "#:configuration-file
kernel-config" to use the config from aux-files.

This patch solely addresses (i) kernels, since (ii) kernels already have
CONFIG_HIDRAW, as we can see by inspecting the aux-files:

$ ls gnu/packages/aux-files/linux-libre/* | wc -l
25
$ grep CONFIG_HIDRAW=y gnu/packages/aux-files/linux-libre/* | wc -l
25
?