unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57269: [rtl8812au-aircrack-ng-linux-module] Missing Source for hal/rtl8812a/hal8812a_fw.c (and probably other files ending in fw.c)
@ 2022-08-18  1:12 Jacob K via Bug reports for GNU Guix
  2022-08-18 14:23 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  0 siblings, 1 reply; 5+ messages in thread
From: Jacob K via Bug reports for GNU Guix @ 2022-08-18  1:12 UTC (permalink / raw)
  To: 57269

Files such as hal8812a_fw.c [1] have large arrays that seem to be binary
firmware encoded in text. My understanding is that source code is not
available, so I believe the files are nonfree software, and should, in
the short-term at least, be removed from Guix. Long term it would be
good to get the source code (via reverse engineering or asking Realtek),
but I imagine that would take a significant amount of time and effort (I
do have a Realtek USB Wi-Fi card, maybe not with this exact firmware
though.).

[1] web copy at
https://raw.githubusercontent.com/aircrack-ng/rtl8812au/6c1b4a333b067eaddc9b8b34927019b41b99bc36/hal/rtl8812a/hal8812a_fw.c





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#57269: [rtl8812au-aircrack-ng-linux-module] Missing Source for hal/rtl8812a/hal8812a_fw.c (and probably other files ending in fw.c)
  2022-08-18  1:12 bug#57269: [rtl8812au-aircrack-ng-linux-module] Missing Source for hal/rtl8812a/hal8812a_fw.c (and probably other files ending in fw.c) Jacob K via Bug reports for GNU Guix
@ 2022-08-18 14:23 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2022-08-18 15:04   ` Jack Hill
  2022-08-19 20:23   ` Maxim Cournoyer
  0 siblings, 2 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2022-08-18 14:23 UTC (permalink / raw)
  To: Jacob K; +Cc: 57269


[-- Attachment #1.1: Type: text/plain, Size: 1090 bytes --]

Hi Jacob,

Jacob K via Bug reports for GNU Guix 写道:
> Files such as hal8812a_fw.c [1] have large arrays that seem to 
> be binary
> firmware encoded in text. My understanding is that source code 
> is not
> available, so I believe the files are nonfree software,

Even if free source code exists, we should still remove the blobs 
and build our own.  (Yes, we actually do this for other firmware 
:-)

> the short-term at least, be removed from Guix. Long term it 
> would be
> good to get the source code (via reverse engineering or asking 
> Realtek),
> but I imagine that would take a significant amount of time and 
> effort (I
> do have a Realtek USB Wi-Fi card, maybe not with this exact 
> firmware
> though.).

Unfortunately all correct.  Another blow to wireless networking 
with Guix.  Attached is a patch removing the 
rtl8821ce-linux-module and rtl8812au-aircrack-ng-linux-module 
packages.

I didn't apply it yet.  Since this case, unlike some others, 
appears to be straightforward, I don't intend to wait long.

Kind regards,

T G-R


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Remove-Realtek-WiFi-drivers-with-firmware-blobs.patch --]
[-- Type: text/x-patch, Size: 5183 bytes --]

From a4650f7dbad4458d3bc907a96a45a334d1d2a086 Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Sun, 14 Aug 2022 02:00:00 +0200
Subject: [PATCH 01/12] gnu: Remove Realtek WiFi drivers with firmware blobs.

rtl8821ce-linux-module contains, e.g., halhwimg8821c_fw.c and
hal8821c_fw.c.  rtl8812au-aircrack-ng-linux-module has, e.g.,
hal8814a_fw.c, hal8812a_fw.c, and hal8821a_fw.c.  Each of these
examples contains non-free firmware blobs disguised as C arrays.

* gnu/packages/linux.scm (rtl8821ce-linux-module)
(rtl8812au-aircrack-ng-linux-module): Remove variables.

Reported by Jacob K <jacobk@disroot.org>
---
 gnu/packages/linux.scm              | 75 -----------------------------
 gnu/system/examples/bare-bones.tmpl |  1 +
 2 files changed, 1 insertion(+), 75 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index fb8b4fa5a8..2c1a38b5c4 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1373,81 +1373,6 @@ (define-public lkrg
 detection of security vulnerability exploits against the kernel.")
     (license license:gpl2)))
 
-(define-public rtl8821ce-linux-module
-  (let ((commit "be733dc86781c68571650b395dd0fa6b53c0a039")
-        (revision "6"))
-    (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")
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32
-           "00sd7s0582b9jcpfgy0fw6418dwg700mfyizkfr22jf2x140iy70"))))
-      (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))                  ; no test suite
-      (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 rtl8812au-aircrack-ng-linux-module
-  (let ((commit "6d0d9fb56d4d918012a5c7a030b9233cad039cdd")
-        (revision "8"))
-    (package
-      (inherit rtl8821ce-linux-module)
-      (name "rtl8812au-aircrack-ng-linux-module")
-      (version (git-version "5.6.4.2" revision commit))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url "https://github.com/aircrack-ng/rtl8812au")
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32 "012asiy43ik13kl9p97sscdsqq5jihq73s4ws3g5wqqczqcgrsvc"))
-         (modules '((guix build utils)))
-         (snippet
-          #~(begin
-              ;; Remove bundled tarballs, APKs, word lists, speadsheets,
-              ;; and other unnecessary unlicenced things.
-              (for-each delete-file-recursively (list "android"
-                                                      "docs"
-                                                      "tools"))))))
-      (supported-systems '("x86_64-linux" "i686-linux"))
-      (home-page "https://github.com/aircrack-ng/rtl8812au")
-      (synopsis "Linux driver for Realtek USB wireless network adapters")
-      (description
-       "This is Realtek's rtl8812au Linux driver for USB 802.11n wireless
-network adapters, modified by the aircrack-ng project to support monitor mode
-and frame injection.  It provides a @code{88XXau} kernel module that supports
-RTL8812AU, RTL8821AU, and RTL8814AU chips.")
-      (license license:gpl2+))))
-
 (define-public vhba-module
   (package
     (name "vhba-module")
diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
index 387e4b12ba..ecac4bb3d1 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -19,6 +19,7 @@
   (file-systems (cons (file-system
                         (device (file-system-label "my-root"))
                         (mount-point "/")
+			(options "atime,lol,ro,shared,shared")
                         (type "ext4"))
                       %base-file-systems))
 
-- 
2.37.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#57269: [rtl8812au-aircrack-ng-linux-module] Missing Source for hal/rtl8812a/hal8812a_fw.c (and probably other files ending in fw.c)
  2022-08-18 14:23 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2022-08-18 15:04   ` Jack Hill
  2022-08-19 20:23   ` Maxim Cournoyer
  1 sibling, 0 replies; 5+ messages in thread
From: Jack Hill @ 2022-08-18 15:04 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Jacob K, 57269

Tobias,

On Thu, 18 Aug 2022, Tobias Geerinckx-Rice via Bug reports for GNU Guix wrote:

> Attached is a patch removing the rtl8821ce-linux-module and 
> rtl8812au-aircrack-ng-linux-module packages.

> diff --git a/gnu/system/examples/bare-bones.tmpl 
> b/gnu/system/examples/bare-bones.tmpl
> index 387e4b12ba..ecac4bb3d1 100644
> --- a/gnu/system/examples/bare-bones.tmpl
> +++ b/gnu/system/examples/bare-bones.tmpl
> @@ -19,6 +19,7 @@
>    (file-systems (cons (file-system
>                          (device (file-system-label "my-root"))
>                          (mount-point "/")
> +                       (options "atime,lol,ro,shared,shared")

Looks like you have an extraneous change here.

Best,
Jack




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#57269: [rtl8812au-aircrack-ng-linux-module] Missing Source for hal/rtl8812a/hal8812a_fw.c (and probably other files ending in fw.c)
  2022-08-18 14:23 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2022-08-18 15:04   ` Jack Hill
@ 2022-08-19 20:23   ` Maxim Cournoyer
  2022-08-27 15:47     ` Maxim Cournoyer
  1 sibling, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2022-08-19 20:23 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Jacob K, 57269

Hi,

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> Hi Jacob,
>
> Jacob K via Bug reports for GNU Guix 写道:
>> Files such as hal8812a_fw.c [1] have large arrays that seem to be
>> binary
>> firmware encoded in text. My understanding is that source code is
>> not
>> available, so I believe the files are nonfree software,
>
> Even if free source code exists, we should still remove the blobs and
> build our own.  (Yes, we actually do this for other firmware :-)
>
>> the short-term at least, be removed from Guix. Long term it would be
>> good to get the source code (via reverse engineering or asking
>> Realtek),
>> but I imagine that would take a significant amount of time and
>> effort (I
>> do have a Realtek USB Wi-Fi card, maybe not with this exact firmware
>> though.).
>
> Unfortunately all correct.  Another blow to wireless networking with
> Guix.  Attached is a patch removing the rtl8821ce-linux-module and
> rtl8812au-aircrack-ng-linux-module packages.

Ouch.  There goes the tiny WiFi dongle I liked on my x200 :-).  Can we
report this upstream, so that it's at least documented and opens the
door for an eventual resolution?

> I didn't apply it yet.  Since this case, unlike some others, appears
> to be straightforward, I don't intend to wait long.

Fine by me (without the lol part).

Maxim




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#57269: [rtl8812au-aircrack-ng-linux-module] Missing Source for hal/rtl8812a/hal8812a_fw.c (and probably other files ending in fw.c)
  2022-08-19 20:23   ` Maxim Cournoyer
@ 2022-08-27 15:47     ` Maxim Cournoyer
  0 siblings, 0 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2022-08-27 15:47 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Jacob K, 57269-done

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hi,
>
> Tobias Geerinckx-Rice <me@tobias.gr> writes:
>
>> Hi Jacob,
>>
>> Jacob K via Bug reports for GNU Guix 写道:
>>> Files such as hal8812a_fw.c [1] have large arrays that seem to be
>>> binary
>>> firmware encoded in text. My understanding is that source code is
>>> not
>>> available, so I believe the files are nonfree software,
>>
>> Even if free source code exists, we should still remove the blobs and
>> build our own.  (Yes, we actually do this for other firmware :-)
>>
>>> the short-term at least, be removed from Guix. Long term it would be
>>> good to get the source code (via reverse engineering or asking
>>> Realtek),
>>> but I imagine that would take a significant amount of time and
>>> effort (I
>>> do have a Realtek USB Wi-Fi card, maybe not with this exact firmware
>>> though.).
>>
>> Unfortunately all correct.  Another blow to wireless networking with
>> Guix.  Attached is a patch removing the rtl8821ce-linux-module and
>> rtl8812au-aircrack-ng-linux-module packages.

Closing, as the drivers were removed in Tobias's commit
b8f2eb286ec52c97048e23d326d94ae5772797e8.

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-27 15:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18  1:12 bug#57269: [rtl8812au-aircrack-ng-linux-module] Missing Source for hal/rtl8812a/hal8812a_fw.c (and probably other files ending in fw.c) Jacob K via Bug reports for GNU Guix
2022-08-18 14:23 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-08-18 15:04   ` Jack Hill
2022-08-19 20:23   ` Maxim Cournoyer
2022-08-27 15:47     ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).