[PATCH] gnu: Add rtl8821ce-linux-module.

  • Done
  • quality assurance status badge
Details
4 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
  • Michael Rohleder
Owner
unassigned
Submitted by
Michael Rohleder
Severity
normal
M
M
Michael Rohleder wrote on 12 Apr 2020 06:37
(address . guix-patches@gnu.org)
87r1wte2ub.fsf@rohleder.de
My girlfriend's laptop has this chip, so I needed this to spread the
love of guix (to her already endless sea of love).

Im not sure about the naming, it could also be something like
rtl8821ce-driver-linux.

So far (2 days), it works very well.
From 6332e69b7fedb614c404a434bcf35e217ce3a953 Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike@rohleder.de>
Date: Sun, 12 Apr 2020 06:33:23 +0200
Subject: [PATCH] gnu: Add rtl8821ce-linux-module.

* gnu/packages/linux.scm (rtl8821ce-linux-module): New variable.
---
gnu/packages/linux.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0be50c11e0..a833aae236 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -42,6 +42,7 @@
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1125,6 +1126,40 @@ module allows the control of the backlight level or luminance property when
supported under @file{/sys/class/backlight/}.")
(license license:gpl2+)))
+(define-public rtl8821ce-linux-module
+ (let ((commit "69765eb288a8dfad3b055b906760b53e02ab1dea")
+ (revision "0"))
+ (package
+ (name "rtl8821ce-linux-module")
+ (version (git-version "0.0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tomaspinho/rtl8821ce.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "17jiw25k74kv5lnvgycvj2g1n06hbrpjz6p4znk4a62g136rhn4s"))))
+ (build-system linux-module-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key inputs make-flags #:allow-other-keys)
+ (setenv "CC" "gcc")
+ (apply invoke "make"
+ (string-append "KSRC="
+ (assoc-ref inputs "linux-module-builder")
+ "/lib/modules/build")
+ (or make-flags '())))))
+ #:tests? #f))
+ (home-page "https://github.com/tomaspinho/rtl8821ce")
+ (synopsis "Linux Driver for Realtek RTL8821CE wireless network adapters")
+ (description "This is Realtek's RTL8821CE Linux driver for wireless
+network adapters.")
+ (license license:gpl2))))
+
;;;
;;; Pluggable authentication modules (PAM).
--
2.26.0
--
When a Banker jumps out of a window, jump after him--that's where the money is.
-- Robespierre
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAl6Smx0ACgkQfHr/vv7y
yyWKqwf+LZPcnYnPVhbzcX0Edack/3GUdcrimz5tirDe3WUZfu7YrgAu9Auy9PKk
qt50S7AoAd7Yq9zbyhpGagdDPJhlupIG+U0L6iQkkqAJIBHoS5ndiXTF8cB8ZgIL
dtBpihltF9AHUu2LFXjaBbYnooupecZCW5bqMwDLGN8pbDRG+svpcga4vhT6pisv
QLhPuBNSETMyMVKqjo9R+PESHKFKYHUNqNd6DAxSq/MQ97UfxAnLRtmgdHOqQrGM
/t/s5M9o0qP/eWXm2IAp1ts24Qu/4oUXC438YTwzb8OtCAF+4T+qApeoDGXQWfid
YWt7AiM3CE4kMYHwsyXS9Q2SaBD1MA==
=kX8m
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 12 Apr 2020 07:51
(address . 40568@debbugs.gnu.org)
871rotntf5.fsf@nckx
Good morning,

Michael Rohleder ???
Toggle quote (4 lines)
> My girlfriend's laptop has this chip, so I needed this to spread
> the
> love of guix (to her already endless sea of love).

Yay! Thank her for the patch.

Toggle quote (3 lines)
> Im not sure about the naming, it could also be something like
> rtl8821ce-driver-linux.

-linux-module's better. The currently random names should
probably be standardised.

Toggle quote (2 lines)
> + (define-public rtl8821ce-linux-module

This can go under the existing rtl8812au-aircrack-ng-linux-module.
I knew that chip number looked familiar.

Toggle quote (2 lines)
> + (version (git-version "0.0.1" revision commit))

This should be 0.0.0 unless there's some 0.0.1 release of which
I'm unaware.

Toggle quote (12 lines)
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url
> "https://github.com/tomaspinho/rtl8821ce.git")
> + (commit commit)))
> + (sha256
> + (base32
> +
> "17jiw25k74kv5lnvgycvj2g1n06hbrpjz6p4znk4a62g136rhn4s"))))

Git check-outs should have a

(file-name (git-file-name name version))

field to make the store file name a bit nicer (and easier to
recognise).

Toggle quote (7 lines)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (replace 'build
> + (lambda* (#:key inputs make-flags
> #:allow-other-keys)

OK, I'm going to add #:make-flags support to l-m-b-s.

Toggle quote (8 lines)
> + (setenv "CC" "gcc")
> + (apply invoke "make"
> + (string-append "KSRC="
> + (assoc-ref inputs
> "linux-module-builder")
> + "/lib/modules/build")
> + (or make-flags '())))))

If you copied this from rtl8812au-aircrack-ng-linux-module I
apologise :-) I (and Guix) prefer specifying the default up-front
like so:

(lambda* (#:key (make-flags '()) … #:allow-other-keys) …

Then you can use it without ceremony.

Toggle quote (3 lines)
> + (synopsis "Linux Driver for Realtek RTL8821CE wireless
> network adapters")

‘driver’

Toggle quote (3 lines)
> + (description "This is Realtek's RTL8821CE Linux driver
> for wireless

Invisible trailing space.

Toggle quote (2 lines)
> +network adapters.")

This ought to be a little longer. I can throw something together
if you're without inspiration.

The AUR package says ‘with firmware’, which would be problematic
if I'd actually found any. The README also mentions firmware at
the very end. Do you know what they mean? Does this package work
out of the box with Linux-Libre? Is that only for Bluetooth?

Kind regards,

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

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl6SrE4ACgkQ2Imw8BjF
STxsDA//RXQ1Z1SCr760YDfZmkXcHj0ncwgDjnUIrQrCytTfDkmwv1rJO/33YwD5
OVWHMChhAW1gX2lgC1VBY51yRxmrH0gStbvKTob/pslTJptiLfgk5+FYunghSCQq
Pq/OO2x1Ia3x02anjAKOZf0bCU8vWfNUJMh95z0VwNN7nZLL7+6QVaSP0KZyxcs7
ia1Hg69lm7Pdp7xFH70BLhCnCw6+HN1JG8hhHOCkhJC2s1tD3yM425l1IBBLt5a2
QR/7tK3nLWb5COanaoZglhfU4BzY9PSTxSpSXAmlxJHKi7Al0VY2FG6op1i8OHh2
FetE9N2fAzONCAfKFhYqQ7rq57l/WTGGggzw5MgvondvfLNRuEFn9tXMJA8Qj7KV
I3WuhaTIFw1KEY6LUil9q5UcSCaRF7qJ+V9A3Mckzv8UWOwhWwA1qzEJwIbMK+p4
X6gF0jCL9QNL+NeZCN1cFL54o29rOOJxk5Ljq/UroCMqHikjLQuevPdvMbie6R6J
2ffIGK/2fHJJqmwbFa8NppNlAoy7Zh78ec3jumTeXQ0CAujkbImixvtLZzzdGvDN
IueHPHuuoQHIk+lnh/iJcELuChI++yB8HcsiSeDNgL8anR0BRe+GiPdhIpru+py6
PxQN/XT7sbKhOloU/MgxOZGlQCft2iiiIvesKjzTMPd4AL6o0eE=
=tfGd
-----END PGP SIGNATURE-----

M
M
Michael Rohleder wrote on 12 Apr 2020 12:38
(name . Tobias Geerinckx-Rice via Guix-patches via)(address . guix-patches@gnu.org)
875ze5dm5d.fsf@rohleder.de
Hi Tobias,

Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
writes:
Toggle quote (2 lines)
> Yay! Thank her for the patch.

Will do.

Thank you for your review!
Your suggestions are in the patch appended.

Toggle quote (3 lines)
> This ought to be a little longer. I can throw something together if
> you're without inspiration.

Yes, please do.

Toggle quote (5 lines)
> The AUR package says ‘with firmware’, which would be problematic if
> I'd actually found any. The README also mentions firmware at the very
> end. Do you know what they mean? Does this package work out of the
> box with Linux-Libre? Is that only for Bluetooth?

idk what firmware they mean. This driver depends on cfg80211 which
shouldnt be a problem.
yes, this works out of the box with Linux-Libre (and not Libre) on the
laptop I have tested.
I havent tested bluetooth at all.


Kind Regards,
mike
From b87d051b0ca74550df619e3cc8ed70e8f77f6e99 Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike@rohleder.de>
Date: Sun, 12 Apr 2020 12:06:31 +0200
Subject: [PATCH] gnu: Add rtl8821ce-linux-module.

* gnu/packages/linux.scm (rtl8821ce-linux-module): New variable.
---
gnu/packages/linux.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0be50c11e0..2365d309e4 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1057,6 +1057,41 @@ and frame injection. It provides a @code{88XXau} kernel module that supports
RTL8812AU, RTL8821AU, and RTL8814AU chips.")
(license license:gpl2+))))
+(define-public rtl8821ce-linux-module
+ (let ((commit "69765eb288a8dfad3b055b906760b53e02ab1dea")
+ (revision "0"))
+ (package
+ (name "rtl8821ce-linux-module")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tomaspinho/rtl8821ce.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17jiw25k74kv5lnvgycvj2g1n06hbrpjz6p4znk4a62g136rhn4s"))))
+ (build-system linux-module-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key (make-flags '()) inputs #:allow-other-keys)
+ (setenv "CC" "gcc")
+ (invoke "make"
+ (string-append "KSRC="
+ (assoc-ref inputs "linux-module-builder")
+ "/lib/modules/build")
+ ))))
+ #:tests? #f))
+ (home-page "https://github.com/tomaspinho/rtl8821ce")
+ (synopsis "Linux driver for Realtek RTL8821CE wireless network adapters")
+ (description "This is Realtek's RTL8821CE Linux driver for wireless
+network adapters.")
+ (license license:gpl2))))
+
(define-public vhba-module
(package
(name "vhba-module")
--
2.26.0
--
There are two types of hard drives: those that have failed, and those that will.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAl6S754ACgkQfHr/vv7y
yyVZgAgAh0dmAznsYz2DKVOr/ZUTdANb8gnDeTBq0SX1Kc2AUTME0UfzAhghnsgr
qQjCFyNDDhoXuup/MqLow+yD78POdDtvg8wZZwAmPHeEm7cfg1v0C7Bi4aqd+KMF
yRMEVjMrn4EqS5zZXtKzg2i78vc79rfcXABvdYuTe0LF9+U0G+b5XiU+ccdZ5YKK
6lj9f1ABimKrJhKyrSH4o4lp7jEvDFyF/GAnzpOSmFxlcWVmIXOz9VHIcWWOOlp4
vxKuLGj0aK0RlV27EzNaUWANT8CzJrRiEpsA1maw9xCHq6F1Bkk7OtxB4wwpBrwj
OJPDg0Rtbv/34tOYiyXXzir8ohf3Lw==
=mQVM
-----END PGP SIGNATURE-----

D
D
Danny Milosavljevic wrote on 13 Apr 2020 22:19
(name . Michael Rohleder)(address . mike@rohleder.de)
20200413221924.385512ef@scratchpost.org
Hi,

the upstream README mentions having to add "pci=noaer" to the kernel command
line sometimes. Did you have to do that?

It also hints on "firmware" being necessary for "BlueTooth".
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6UyUwACgkQ5xo1VCww
uqVoLgf9G32Z2a22tCOIhVmOFgIkgXskG3lYrfccQiX+sQw9eyyjS8MOglFYXfQO
wlmrnUHbS90weablYr4k/fYjRvhaXang56AoUNxr4kVE29uGOwbSr54UOHMSHUDN
XL+XjRjUGNA8Rp9wVwscjKuMaYQN6wUUjAazNmh8M1MApY7sAGAchI7DfNgUqTrE
C/zK3JR3bZxi8xhaio09omdtgiSsXeThNpvaOh+oer0XlWoFxX7IYwGg+w0oJewx
InCRSGlMOOa8upITGtf/pc9fgoB8aPLR5qCInJ5tMdmNn/MsR6sZaQEbpLR05arj
D7UU0/O6HkybJgkz5df+mkh/dSdDvQ==
=656k
-----END PGP SIGNATURE-----


M
M
Michael Rohleder wrote on 14 Apr 2020 06:38
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87zhbesmux.fsf@rohleder.de
Danny Milosavljevic <dannym@scratchpost.org> writes:
Toggle quote (3 lines)
> the upstream README mentions having to add "pci=noaer" to the kernel command
> line sometimes. Did you have to do that?

No, I didnt, it worked w/o.

--
You can no more win a war than you can win an earthquake.
-- Jeannette Rankin
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAl6VPkYACgkQfHr/vv7y
yyU3ugf9GmIGiwcm3zIVhSB6LOfcoz58jXkmAn8u2D9y+x8GOrbCF7m/GNpj58rw
TajUAjbijGPsxnIffci+CY4UfaT0GXwEaNfMwnDVwTm3lkpCSoGZohTX4dlrOzqq
LUCknOL0MLCnRieCaPmVTlLuXe9ClHlXd3wcDY7RFig3T0n4gHCa2bCCa56HVTqU
JZUjGtCzGjulQbvah2g445tjA4Dennaxe16C9q+J0FDbRJhz92bHzo1i1mf6zXds
FzvmUaWAPss4BzsPgDhHAnFwxTyPfn3pu7uXa/woRCPnpy6aTXzBiOAhoxOhEqFv
cAzQ9tWvFVSMK9JaqFC1X4KSQuxXYA==
=GtCJ
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 8 May 2020 16:29
(name . Michael Rohleder)(address . mike@rohleder.de)
87mu6icxfo.fsf@gnu.org
Hi,

Michael Rohleder <mike@rohleder.de> skribis:

Toggle quote (11 lines)
>> The AUR package says ‘with firmware’, which would be problematic if
>> I'd actually found any. The README also mentions firmware at the very
>> end. Do you know what they mean? Does this package work out of the
>> box with Linux-Libre? Is that only for Bluetooth?
>
> idk what firmware they mean. This driver depends on cfg80211 which
> shouldnt be a problem.
> yes, this works out of the box with Linux-Libre (and not Libre) on the
> laptop I have tested.
> I havent tested bluetooth at all.

[...]

Toggle quote (7 lines)
> From b87d051b0ca74550df619e3cc8ed70e8f77f6e99 Mon Sep 17 00:00:00 2001
> From: Michael Rohleder <mike@rohleder.de>
> Date: Sun, 12 Apr 2020 12:06:31 +0200
> Subject: [PATCH] gnu: Add rtl8821ce-linux-module.
>
> * gnu/packages/linux.scm (rtl8821ce-linux-module): New variable.

Applied, thanks!

Ludo’.
Closed
?