* [Buildroot] [PATCH v2 1/1] package/rtl8821cu: new package
@ 2022-12-01 1:45 Christian Stewart via buildroot
2022-12-11 20:25 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Christian Stewart via buildroot @ 2022-12-01 1:45 UTC (permalink / raw)
To: buildroot; +Cc: Christian Stewart, Yann E . MORIN, Thomas Petazzoni
Adds support for USB rtl8821cu wifi cards.
Similar to rtl8821au and rtl8812au-aircrack-ng packages.
https://github.com/morrownr/8821cu-20210118
Signed-off-by: Christian Stewart <christian@paral.in>
---
v1 -> v2:
- add myself to DEVELOPERS
- bump to latest commit 615995
- fixes build failure against the odroid xu4 kernel
- simplify -Werror=date-time fix-patch
- simplify makefile patches
Signed-off-by: Christian Stewart <christian@paral.in>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
.../0001-makefile-cleanup-whitespace.patch | 122 ++++++++++++++++++
...akefile-remove-Wno-date-time-warning.patch | 30 +++++
package/rtl8821cu/Config.in | 10 ++
package/rtl8821cu/rtl8821cu.hash | 3 +
package/rtl8821cu/rtl8821cu.mk | 19 +++
7 files changed, 186 insertions(+)
create mode 100644 package/rtl8821cu/0001-makefile-cleanup-whitespace.patch
create mode 100644 package/rtl8821cu/0002-makefile-remove-Wno-date-time-warning.patch
create mode 100644 package/rtl8821cu/Config.in
create mode 100644 package/rtl8821cu/rtl8821cu.hash
create mode 100644 package/rtl8821cu/rtl8821cu.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index bfebf8163c..6d274749da 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -551,6 +551,7 @@ F: package/mosh/
F: package/nerdctl/
F: package/pkg-golang.mk
F: package/rtl8821au/
+F: package/rtl8821cu/
F: package/runc/
F: package/tini/
F: support/testing/tests/package/test_docker_compose.py
diff --git a/package/Config.in b/package/Config.in
index aef80f9ab0..f94999a84f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -584,6 +584,7 @@ endmenu
source "package/rtl8723ds/Config.in"
source "package/rtl8812au-aircrack-ng/Config.in"
source "package/rtl8821au/Config.in"
+ source "package/rtl8821cu/Config.in"
source "package/sane-backends/Config.in"
source "package/sdparm/Config.in"
source "package/sedutil/Config.in"
diff --git a/package/rtl8821cu/0001-makefile-cleanup-whitespace.patch b/package/rtl8821cu/0001-makefile-cleanup-whitespace.patch
new file mode 100644
index 0000000000..b09a0ef70f
--- /dev/null
+++ b/package/rtl8821cu/0001-makefile-cleanup-whitespace.patch
@@ -0,0 +1,122 @@
+From 839960e49d82eb3c463a8020a039cec888a95511 Mon Sep 17 00:00:00 2001
+From: Christian Stewart <christian@paral.in>
+Date: Wed, 30 Nov 2022 16:07:28 -0800
+Subject: [PATCH] makefile: cleanup whitespace
+
+Signed-off-by: Christian Stewart <christian@paral.in>
+---
+ Makefile | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index df5380d..7d79fcd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -309,8 +309,8 @@ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8188E
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8188EPwrSeq.o\
+- hal/$(RTL871X)/$(RTL871X)_xmit.o\
++ hal/$(RTL871X)/Hal8188EPwrSeq.o \
++ hal/$(RTL871X)/$(RTL871X)_xmit.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -365,8 +365,8 @@ MODULE_NAME = 8192ee
+ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8192E
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8192EPwrSeq.o\
+- hal/$(RTL871X)/$(RTL871X)_xmit.o\
++ hal/$(RTL871X)/Hal8192EPwrSeq.o \
++ hal/$(RTL871X)/$(RTL871X)_xmit.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -425,8 +425,8 @@ endif
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+ hal/$(RTL871X)/Hal8812PwrSeq.o \
+- hal/$(RTL871X)/Hal8821APwrSeq.o\
+- hal/$(RTL871X)/$(RTL871X)_xmit.o\
++ hal/$(RTL871X)/Hal8821APwrSeq.o \
++ hal/$(RTL871X)/$(RTL871X)_xmit.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -532,7 +532,7 @@ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8723B
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8723BPwrSeq.o\
++ hal/$(RTL871X)/Hal8723BPwrSeq.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -594,7 +594,7 @@ EXTRA_CFLAGS += -DCONFIG_RTL8814A
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+ hal/$(RTL871X)/Hal8814PwrSeq.o \
+- hal/$(RTL871X)/$(RTL871X)_xmit.o\
++ hal/$(RTL871X)/$(RTL871X)_xmit.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -654,7 +654,7 @@ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8703B
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8703BPwrSeq.o\
++ hal/$(RTL871X)/Hal8703BPwrSeq.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -710,7 +710,7 @@ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8723D
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8723DPwrSeq.o\
++ hal/$(RTL871X)/Hal8723DPwrSeq.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -778,7 +778,7 @@ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8188F
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8188FPwrSeq.o\
++ hal/$(RTL871X)/Hal8188FPwrSeq.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -825,7 +825,7 @@ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8188GTV
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8188GTVPwrSeq.o\
++ hal/$(RTL871X)/Hal8188GTVPwrSeq.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -903,7 +903,7 @@ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8710B
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8710BPwrSeq.o\
++ hal/$(RTL871X)/Hal8710BPwrSeq.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+@@ -950,7 +950,7 @@ endif
+ EXTRA_CFLAGS += -DCONFIG_RTL8192F
+
+ _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
+- hal/$(RTL871X)/Hal8192FPwrSeq.o\
++ hal/$(RTL871X)/Hal8192FPwrSeq.o \
+ hal/$(RTL871X)/$(RTL871X)_sreset.o
+
+ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
+--
+2.38.1
+
diff --git a/package/rtl8821cu/0002-makefile-remove-Wno-date-time-warning.patch b/package/rtl8821cu/0002-makefile-remove-Wno-date-time-warning.patch
new file mode 100644
index 0000000000..9cfef82256
--- /dev/null
+++ b/package/rtl8821cu/0002-makefile-remove-Wno-date-time-warning.patch
@@ -0,0 +1,30 @@
+From 7379f5ff5bd8c3f8d67db1345f4bb95850d24cd6 Mon Sep 17 00:00:00 2001
+From: Christian Stewart <christian@paral.in>
+Date: Wed, 30 Nov 2022 16:08:25 -0800
+Subject: [PATCH] makefile: remove Wno-date-time warning
+
+Signed-off-by: Christian Stewart <christian@paral.in>
+---
+ Makefile | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 7d79fcd..4d1de64 100644
+--- a/Makefile
++++ b/Makefile
+@@ -22,11 +22,7 @@ EXTRA_CFLAGS += -Wno-implicit-fallthrough
+ # gcc-12
+ EXTRA_CFLAGS += -Wno-address
+ EXTRA_CFLAGS += -Wframe-larger-than=1648
+-
+-GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
+-ifeq ($(GCC_VER_49),1)
+-EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
+-endif
++EXTRA_CFLAGS += -Wno-error=date-time
+
+ EXTRA_CFLAGS += -I$(src)/include
+
+--
+2.38.1
+
diff --git a/package/rtl8821cu/Config.in b/package/rtl8821cu/Config.in
new file mode 100644
index 0000000000..a5a7b9d255
--- /dev/null
+++ b/package/rtl8821cu/Config.in
@@ -0,0 +1,10 @@
+comment "rtl8821cu needs a Linux kernel to be built"
+ depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_RTL8821CU
+ bool "rtl8821cu"
+ depends on BR2_LINUX_KERNEL
+ help
+ rtl8821cu wifi driver
+
+ https://github.com/brektrou/rtl8821CU
diff --git a/package/rtl8821cu/rtl8821cu.hash b/package/rtl8821cu/rtl8821cu.hash
new file mode 100644
index 0000000000..08210ab48e
--- /dev/null
+++ b/package/rtl8821cu/rtl8821cu.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 f270453b197f8054ff74c23d17fc5f9c16d39edcb31e0b633ac35bf3912ad4e7 rtl8821cu-615995394599ab238bf282f0d3b7b9894f56873a.tar.gz
+sha256 9210367ff7e694e79743ad0c6cf4cbc844d32dba70deaba085805ed0e0515935 LICENSE
diff --git a/package/rtl8821cu/rtl8821cu.mk b/package/rtl8821cu/rtl8821cu.mk
new file mode 100644
index 0000000000..45727eee93
--- /dev/null
+++ b/package/rtl8821cu/rtl8821cu.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# rtl8821cu
+#
+################################################################################
+
+RTL8821CU_VERSION = 615995394599ab238bf282f0d3b7b9894f56873a
+RTL8821CU_SITE = $(call github,morrownr,8821cu-20210118,$(RTL8821CU_VERSION))
+RTL8821CU_LICENSE = GPL-2.0
+RTL8821CU_LICENSE_FILES = LICENSE
+
+RTL8821CU_MODULE_MAKE_OPTS = \
+ CONFIG_RTL8821CU=m \
+ KVER=$(LINUX_VERSION_PROBED) \
+ USER_EXTRA_CFLAGS="-DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN \
+ -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT"
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
--
2.38.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Buildroot] [PATCH v2 1/1] package/rtl8821cu: new package
2022-12-01 1:45 [Buildroot] [PATCH v2 1/1] package/rtl8821cu: new package Christian Stewart via buildroot
@ 2022-12-11 20:25 ` Thomas Petazzoni via buildroot
2022-12-11 20:32 ` Christian Stewart via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-11 20:25 UTC (permalink / raw)
To: Christian Stewart via buildroot; +Cc: Yann E . MORIN
Hello Christian,
On Wed, 30 Nov 2022 17:45:38 -0800
Christian Stewart via buildroot <buildroot@buildroot.org> wrote:
> Adds support for USB rtl8821cu wifi cards.
>
> Similar to rtl8821au and rtl8812au-aircrack-ng packages.
>
> https://github.com/morrownr/8821cu-20210118
>
> Signed-off-by: Christian Stewart <christian@paral.in>
legal-info is not happy:
>>> rtl8821cu 615995394599ab238bf282f0d3b7b9894f56873a Collecting legal info
ERROR: LICENSE has wrong sha256 hash:
ERROR: expected: 9210367ff7e694e79743ad0c6cf4cbc844d32dba70deaba085805ed0e0515935
ERROR: got : af54d00efc57cfce664171ac8be2a20c0f290b1b5c1a67bb2eba7b6380276c4e
ERROR: Incomplete download, or man-in-the-middle (MITM) attack
make: *** [package/rtl8821cu/rtl8821cu.mk:21: rtl8821cu-legal-info] Error 1
> .../0001-makefile-cleanup-whitespace.patch | 122 ++++++++++++++++++
> ...akefile-remove-Wno-date-time-warning.patch | 30 +++++
Did you submit these two patches "upstream" ?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v2 1/1] package/rtl8821cu: new package
2022-12-11 20:25 ` Thomas Petazzoni via buildroot
@ 2022-12-11 20:32 ` Christian Stewart via buildroot
2022-12-11 21:47 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Christian Stewart via buildroot @ 2022-12-11 20:32 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Christian Stewart, Yann E . MORIN,
Christian Stewart via buildroot
hi Thomas,
On Sun, Dec 11, 2022 at 12:25 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
> On Wed, 30 Nov 2022 17:45:38 -0800
>
> > .../0001-makefile-cleanup-whitespace.patch | 122 ++++++++++++++++++
> > ...akefile-remove-Wno-date-time-warning.patch | 30 +++++
>> Did you submit these two patches "upstream" ?
The first, yes, and it's been merged:
https://github.com/morrownr/8821cu-20210118/commit/3b594e7654ef1320ff9cac6b6472fa1b17af134b
The second, no. Since removing the compiler version check for
-Wno-date-time is not something they want, and more of a Buildroot
thing, I think the patch probably will need to stay.
Shall I resubmit or can you fixup those two little things?
Thanks & best,
Christian Stewart
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v2 1/1] package/rtl8821cu: new package
2022-12-11 20:32 ` Christian Stewart via buildroot
@ 2022-12-11 21:47 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-11 21:47 UTC (permalink / raw)
To: Christian Stewart; +Cc: Yann E . MORIN, Christian Stewart via buildroot
On Sun, 11 Dec 2022 12:32:59 -0800
Christian Stewart <christian@paral.in> wrote:
> The first, yes, and it's been merged:
>
> https://github.com/morrownr/8821cu-20210118/commit/3b594e7654ef1320ff9cac6b6472fa1b17af134b
>
> The second, no. Since removing the compiler version check for
> -Wno-date-time is not something they want, and more of a Buildroot
> thing, I think the patch probably will need to stay.
>
> Shall I resubmit or can you fixup those two little things?
If you could resubmit, with the details of the upstream status for each
patch, and the license hash fixed, it would be great. Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-11 21:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-01 1:45 [Buildroot] [PATCH v2 1/1] package/rtl8821cu: new package Christian Stewart via buildroot
2022-12-11 20:25 ` Thomas Petazzoni via buildroot
2022-12-11 20:32 ` Christian Stewart via buildroot
2022-12-11 21:47 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox