From b2e769487eba7f699a90f32e6bf802eb9d18f0a3 Mon Sep 17 00:00:00 2001 From: PRESFIL Date: Mon, 29 Jan 2024 20:27:29 +0100 Subject: nongnu: Add rtl8821cu-linux-module. * nongnu/packages/linux.scm: (rtl8821cu-linux-module): New variable. Signed-off-by: Jonathan Brielmaier --- nongnu/packages/linux.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm index 9d28d2f..ce4b0bf 100644 --- a/nongnu/packages/linux.scm +++ b/nongnu/packages/linux.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2019 Giacomo Leidi ;;; Copyright © 2019 Timotej Lazar ;;; Copyright © 2020, 2021 James Smith -;;; Copyright © 2020-2023 Jonathan Brielmaier +;;; Copyright © 2020-2024 Jonathan Brielmaier ;;; Copyright © 2020, 2022 Michael Rohleder ;;; Copyright © 2020, 2021, 2022 Tobias Geerinckx-Rice ;;; Copyright © 2020, 2021, 2022 Zhu Zihao @@ -25,6 +25,7 @@ ;;; Copyright © 2023 Hilton Chain ;;; Copyright © 2023 Ada Stevenson ;;; Copyright © 2023 Tomas Volf <~@wolfsden.cz> +;;; Copyright © 2023 PRESFIL (define-module (nongnu packages linux) #:use-module (gnu packages) @@ -849,6 +850,60 @@ network adapters.") ;; hal/rtl8821c/hal8821c_fw.c (license gpl2)))) +(define-public rtl8821cu-linux-module + (let ((commit "a41ef7cabd1aa36fa2b4eb63a71cf719bff11b72") + (revision "1")) + (package + (name "rtl8821cu-linux-module") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/morrownr/8821cu-20210916") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0fnv4gm4adnf8gbjzc2lljh2a3i111159qira3w0qm1zhyqadaq0")))) + (build-system linux-module-build-system) + (arguments + (list + #:make-flags #~(list (string-append "CC=" + #$(cc-for-target)) + (string-append "KSRC=" + (assoc-ref %build-inputs + "linux-module-builder") + "/lib/modules/build")) + #:phases #~(modify-phases %standard-phases + (replace 'build + (lambda* (#:key (make-flags '()) + (parallel-build? #t) #:allow-other-keys) + (apply invoke "make" + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) ,@make-flags))))) + #:tests? #f)) + (home-page "https://github.com/morrownr/8821cu-20210916") + (synopsis "Linux driver for Realtek USB WiFi adapters") + (description + "Linux driver for USB WiFi adapters that are based on the +Realtek RTL8811CU, RTL8821CU, RTL8821CUH and RTL8731AU chipsets. + +To work, in addition to installing the driver, you need +to disable the conflicting rtw88 driver: + +@example +(operating-system + ;; ... + ;; Blacklist conflicting kernel modules. + (kernel-arguments '(\"modprobe.blacklist=rtw88_8821cu\")) + (kernel-loadable-modules (list rtl8821cu-linux-module))) +@end example") + ;; Rejected by Guix beause it contains a binary blob in: + ;; hal/rtl8821c/hal8821c_fw.c + (license (nonfree + "https://github.com/morrownr/8821cu-20210916/blob/main/LICENSE"))))) + (define-public rtl8812au-aircrack-ng-linux-module (let ((commit "35308f4dd73e77fa572c48867cce737449dd8548") (revision "11")) -- cgit v1.2.3