Skip to contentSkip to conversation

DEVELOPERS: add Giulio Benetti to rtl8192eu package

PATCH Applied Giulio Benetti 3 participants 7 messages Nov 29, 2022 – Dec 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 DEVELOPERS: add Giulio Benetti to rtl8192eu package

---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
index c8a052dcec..eecb4bab82 100644
@@ -1153,6 +1153,7 @@ F:	package/qt5/
 F:	package/rockchip-mali/
 F:	package/rtl8188eu/
 F:	package/rtl8189es/
+F:	package/rtl8192eu/
 F:	package/rtl8723bu/
 F:	package/rtl8723ds/
 F:	package/rtl8812au-aircrack-ng/
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/rtl8192eu: fix build failure on Big Endian architectures

Add local patch that allows to override CONFIG_LITTLE_ENDIAN in case we're building for Big Endian architectures. Then let's undefine CONFIG_LITTLE_ENDIAN and define endianness according to $(BR2_ENDIAN).

Fixes:
http://autobuild.buildroot.net/results/13a/13a809570423ead33628663033db4c3c4001a79b/

---
 ...TRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch | 40 +++++++++++++++++++
 package/rtl8192eu/rtl8192eu.mk                |  9 ++++-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 package/rtl8192eu/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
package/rtl8192eu/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch new file +40 -0
new file mode 100644
index 0000000000..2f6ecfb210
@@ -0,0 +1,40 @@
+From f51cbcbeafd8d60e9b8f35b7ca62b6c941d72e3b Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+Date: Wed, 28 Sep 2022 21:17:17 +0200
+Subject: [PATCH] Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the
+ end of EXTRA_FLAGS assignment
+
+At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
+since it's assigned at the beginning of the Makefile. For example it's not
+possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
+allow to build these modules for big endian architectures. So let's move
+the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
+EXTRA_CFLAGS assignment.
+
+[Upstream status: https://github.com/clnhub/rtl8192eu-linux/pull/65]
+Signed-off-by: Giulio Benetti <[email protected]>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 32a1898..b67a5a4 100755
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,3 @@
+-EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
+ EXTRA_CFLAGS += -O1
+ #EXTRA_CFLAGS += -O3
+ #EXTRA_CFLAGS += -Wall
+@@ -2329,6 +2328,8 @@ ifneq ($(USER_MODULE_NAME),)
+ MODULE_NAME := $(USER_MODULE_NAME)
+ endif
+ 
++EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
++
+ ifneq ($(KERNELRELEASE),)
+ 
+ ########### this part for *.mk ############################
+-- 
+2.34.1
+
package/rtl8192eu/rtl8192eu.mk +8 -1
index 0e8ffea5cb..589cb7f59e 100644
@@ -7,9 +7,16 @@
 RTL8192EU_VERSION = 1e15b6d451731bc4d3ffd587194dc4bd0f286ac0
 RTL8192EU_SITE = $(call github,clnhub,rtl8192eu-linux,$(RTL8192EU_VERSION))
 RTL8192EU_LICENSE = GPL-2.0
+
+# Undefine the hardcoded CONFIG_LITTLE_ENDIAN
+RTL8192EU_USER_EXTRA_CLAGS = -UCONFIG_LITTLE_ENDIAN
+# Set endianness
+RTL8192EU_USER_EXTRA_CLAGS += -DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN
+RTL8192EU_USER_EXTRA_CLAGS += -Wno-error
+
 RTL8192EU_MODULE_MAKE_OPTS = \
 	CONFIG_RTL8192EU=m \
-	USER_EXTRA_CFLAGS="-Wno-error"
+	USER_EXTRA_CFLAGS="$(RTL8192EU_USER_EXTRA_CLAGS)"
 
 define RTL8192EU_LINUX_CONFIG_FIXUPS
 	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/rtl8192eu: fix build failure on Big Endian architectures

Quoted 65 lines · Giulio Benetti

Add local patch that allows to override CONFIG_LITTLE_ENDIAN in case we're building for Big Endian architectures. Then let's undefine CONFIG_LITTLE_ENDIAN and define endianness according to $(BR2_ENDIAN).

Fixes:
http://autobuild.buildroot.net/results/13a/13a809570423ead33628663033db4c3c4001a79b/

---
  ...TRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch | 40 +++++++++++++++++++
  package/rtl8192eu/rtl8192eu.mk                |  9 ++++-
  2 files changed, 48 insertions(+), 1 deletion(-)

create mode 100644 package/rtl8192eu/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch

package/rtl8192eu/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch new file +40 -0
new file mode 100644
index 0000000000..2f6ecfb210
@@ -0,0 +1,40 @@
+From f51cbcbeafd8d60e9b8f35b7ca62b6c941d72e3b Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+Date: Wed, 28 Sep 2022 21:17:17 +0200
+Subject: [PATCH] Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the
+ end of EXTRA_FLAGS assignment
+
+At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
+since it's assigned at the beginning of the Makefile. For example it's not
+possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
+allow to build these modules for big endian architectures. So let's move
+the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
+EXTRA_CFLAGS assignment.
+
+[Upstream status: https://github.com/clnhub/rtl8192eu-linux/pull/65]
+Signed-off-by: Giulio Benetti <[email protected]>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 32a1898..b67a5a4 100755
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,3 @@
+-EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
+ EXTRA_CFLAGS += -O1
+ #EXTRA_CFLAGS += -O3
+ #EXTRA_CFLAGS += -Wall
+@@ -2329,6 +2328,8 @@ ifneq ($(USER_MODULE_NAME),)
+ MODULE_NAME := $(USER_MODULE_NAME)
+ endif
+
++EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
++
+ ifneq ($(KERNELRELEASE),)
+
+ ########### this part for *.mk ############################
+--
+2.34.1
+
package/rtl8192eu/rtl8192eu.mk +0 -0
index 0e8ffea5cb..589cb7f59e 100644

package/rtl8192eu/rtl8192eu.mk line 12

Quoted 6 lines
package/rtl8192eu/rtl8192eu.mk +3 -0
@@ -7,9 +7,16 @@
  RTL8192EU_VERSION = 1e15b6d451731bc4d3ffd587194dc4bd0f286ac0
  RTL8192EU_SITE = $(call github,clnhub,rtl8192eu-linux,$(RTL8192EU_VERSION))
  RTL8192EU_LICENSE = GPL-2.0
+
+# Undefine the hardcoded CONFIG_LITTLE_ENDIAN
+RTL8192EU_USER_EXTRA_CLAGS = -UCONFIG_LITTLE_ENDIAN

It is not actually hardcoded. The only thing that is hardcoded is
CONFIG_PLATFORM_I386_PC=y, which triggers the following fragment in the Makefile:

ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT

SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ INSTALL_PREFIX :=
STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging endif

Clearly, all of this is rubbish in Buildroot context. So what we should do is to set

RTL8192EU_MODULE_MAKE_OPTS = ... CONFIG_PLATFORM_I386_PC=n

At that point, we can set all the appropriate config options we like, which would be the -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT in USER_EXTRA_CFLAGS.

Regards,
Arnout

package/rtl8192eu/rtl8192eu.mk line 22

Quoted 11 lines
package/rtl8192eu/rtl8192eu.mk +5 -1
+# Set endianness
+RTL8192EU_USER_EXTRA_CLAGS += -DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN
+RTL8192EU_USER_EXTRA_CLAGS += -Wno-error
+
  RTL8192EU_MODULE_MAKE_OPTS = \
  	CONFIG_RTL8192EU=m \
-	USER_EXTRA_CFLAGS="-Wno-error"
+	USER_EXTRA_CFLAGS="$(RTL8192EU_USER_EXTRA_CLAGS)"
 
  define RTL8192EU_LINUX_CONFIG_FIXUPS
  	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Re: [Buildroot] [PATCH 2/2] package/rtl8192eu: fix build failure on Big Endian architectures

Hi Arnout,

Quoted 91 lines

Il giorno 29 nov 2022, alle ore 23:16, Arnout Vandecappelle <[email protected]> ha scritto:



Quoted 63 lines · Giulio Benetti

Add local patch that allows to override CONFIG_LITTLE_ENDIAN in case we're building for Big Endian architectures. Then let's undefine CONFIG_LITTLE_ENDIAN and define endianness according to $(BR2_ENDIAN). Fixes:
http://autobuild.buildroot.net/results/13a/13a809570423ead33628663033db4c3c4001a79b/

---
 ...TRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch | 40 +++++++++++++++++++
 package/rtl8192eu/rtl8192eu.mk                |  9 ++++-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 package/rtl8192eu/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
package/rtl8192eu/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch new file +40 -0
new file mode 100644
index 0000000000..2f6ecfb210
@@ -0,0 +1,40 @@
+From f51cbcbeafd8d60e9b8f35b7ca62b6c941d72e3b Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+Date: Wed, 28 Sep 2022 21:17:17 +0200
+Subject: [PATCH] Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the
+ end of EXTRA_FLAGS assignment
+
+At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
+since it's assigned at the beginning of the Makefile. For example it's not
+possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
+allow to build these modules for big endian architectures. So let's move
+the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
+EXTRA_CFLAGS assignment.
+
+[Upstream status: https://github.com/clnhub/rtl8192eu-linux/pull/65]
+Signed-off-by: Giulio Benetti <[email protected]>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 32a1898..b67a5a4 100755
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,3 @@
+-EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
+ EXTRA_CFLAGS += -O1
+ #EXTRA_CFLAGS += -O3
+ #EXTRA_CFLAGS += -Wall
+@@ -2329,6 +2328,8 @@ ifneq ($(USER_MODULE_NAME),)
+ MODULE_NAME := $(USER_MODULE_NAME)
+ endif
+
++EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
++
+ ifneq ($(KERNELRELEASE),)
+
+ ########### this part for *.mk ############################
+--
+2.34.1
+
package/rtl8192eu/rtl8192eu.mk +0 -0
index 0e8ffea5cb..589cb7f59e 100644

package/rtl8192eu/rtl8192eu.mk line 12

Quoted 6 lines
package/rtl8192eu/rtl8192eu.mk +3 -0
@@ -7,9 +7,16 @@
 RTL8192EU_VERSION = 1e15b6d451731bc4d3ffd587194dc4bd0f286ac0
 RTL8192EU_SITE = $(call github,clnhub,rtl8192eu-linux,$(RTL8192EU_VERSION))
 RTL8192EU_LICENSE = GPL-2.0
+
+# Undefine the hardcoded CONFIG_LITTLE_ENDIAN
+RTL8192EU_USER_EXTRA_CLAGS = -UCONFIG_LITTLE_ENDIAN

It is not actually hardcoded. The only thing that is hardcoded is CONFIG_PLATFORM_I386_PC=y, which triggers the following fragment in the Makefile:

ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT

SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ INSTALL_PREFIX :=
STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging endif

Quoted 5 lines

Clearly, all of this is rubbish in Buildroot context. So what we should do is to set

RTL8192EU_MODULE_MAKE_OPTS = ... CONFIG_PLATFORM_I386_PC=n

At that point, we can set all the appropriate config options we like, which would be the -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT in USER_EXTRA_CFLAGS.

Yes, this is another approach, but there is only a patch with my proposed solution applied [1] so maybe for consistency we could keep it the same, what about it?

Thanks for reviewing
Giulio

[1]: https://github.com/buildroot/buildroot/commit/354f9387f33b5fab023cb98e52d84d58624f0ecf

Quoted 5 lines

Regards,
Arnout

Quoted 14 lines

package/rtl8192eu/rtl8192eu.mk line 22

Quoted 10 lines
package/rtl8192eu/rtl8192eu.mk +5 -1
+# Set endianness
+RTL8192EU_USER_EXTRA_CLAGS += -DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN
+RTL8192EU_USER_EXTRA_CLAGS += -Wno-error
+
 RTL8192EU_MODULE_MAKE_OPTS = \
     CONFIG_RTL8192EU=m \
-    USER_EXTRA_CFLAGS="-Wno-error"
+    USER_EXTRA_CFLAGS="$(RTL8192EU_USER_EXTRA_CLAGS)"
   define RTL8192EU_LINUX_CONFIG_FIXUPS
     $(call KCONFIG_ENABLE_OPT,CONFIG_NET)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

Re: [Buildroot] [PATCH 2/2] package/rtl8192eu: fix build failure on Big Endian architectures

Quoted 8 lines · On Tue, 29 Nov 2022 23:25:29 +0100 Giulio Benetti…
Quoted 5 lines

Clearly, all of this is rubbish in Buildroot context. So what we should do is to set

RTL8192EU_MODULE_MAKE_OPTS = ... CONFIG_PLATFORM_I386_PC=n

At that point, we can set all the appropriate config options we like, which would be the -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT in USER_EXTRA_CFLAGS.

Yes, this is another approach, but there is only a patch with my proposed solution applied [1] so maybe for consistency we could keep it the same, what about it?

Well, Arnout has a point that having CONFIG_PLATFORM_I386_PC=y is not really good. So perhaps 354f9387f33b5fab023cb98e52d84d58624f0ecf also needs to be changed like Arnout suggested?

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH 2/2] package/rtl8192eu: fix build failure on Big Endian architectures

Hello Thomas, Arnout, All,

Quoted 7 lines · Thomas Petazzoni via buildroot
Quoted 4 lines · On Tue, 29 Nov 2022 23:25:29 +0100 Giulio Benetti…
Quoted 4 lines

Clearly, all of this is rubbish in Buildroot context. So what we should do is to set

RTL8192EU_MODULE_MAKE_OPTS = ... CONFIG_PLATFORM_I386_PC=n

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

At that point, we can set all the appropriate config options we like, which would be the -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT in USER_EXTRA_CFLAGS.

Yes, this is another approach, but there is only a patch with my proposed solution applied [1] so maybe for consistency we could keep it the same, what about it?

Well, Arnout has a point that having CONFIG_PLATFORM_I386_PC=y is not really good.

Yes, I've rechecked the Makefile and Arnout had a very good idea that gives us the total control and I've sent a V2 patch for this:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Quoted 2 lines

So perhaps 354f9387f33b5fab023cb98e52d84d58624f0ecf also needs to be changed like Arnout suggested?

Yes, I've sent one for this too:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

If new bugs like this arise I will use that approach now on.

Thank you both!
Best regards

Signature · 6 lines
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw
In reply to Giulio Benetti
Quoted 1 line · Giulio Benetti

Applied to master, thanks.

Regards,
Arnout

Quoted 9 lines
---
  DEVELOPERS | 1 +
  1 file changed, 1 insertion(+)
DEVELOPERS +0 -0
index c8a052dcec..eecb4bab82 100644

DEVELOPERS F: package/qt5/ · line 1159

Quoted 7 lines
DEVELOPERS +1 -0
@@ -1153,6 +1153,7 @@ F:	package/qt5/
  F:	package/rockchip-mali/
  F:	package/rtl8188eu/
  F:	package/rtl8189es/
+F:	package/rtl8192eu/
  F:	package/rtl8723bu/
  F:	package/rtl8723ds/
  F:	package/rtl8812au-aircrack-ng/

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot