瀏覽代碼

package/rtl8189fs: fix big-endian builds

Fix rtl8189fs builds for big-endian platforms. For this purpose remove
default little-endian configuration option from rtl8189fs Makefile.
Configure proper endianness using USER_EXTRA_CFLAGS instead.

Fixes:
- http://autobuild.buildroot.net/results/51e95561103e40ae94f38b9bb944bdfcd4ab50ed/
- http://autobuild.buildroot.net/results/8ac7921926ab48aeb95dc4ea20f3c9970094c71d/
- http://autobuild.buildroot.net/results/7f0bdd03c41bcc9e567fe722ed271e5dcf210f44/

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sergey Matyukevich 3 年之前
父節點
當前提交
1d6abde27c
共有 2 個文件被更改,包括 32 次插入1 次删除
  1. 30 0
      package/rtl8189fs/0001-Makefile-remove-default-endianness.patch
  2. 2 1
      package/rtl8189fs/rtl8189fs.mk

+ 30 - 0
package/rtl8189fs/0001-Makefile-remove-default-endianness.patch

@@ -0,0 +1,30 @@
+From 480d9da302885d9e8b3d1f9c68def569e3c8a8c0 Mon Sep 17 00:00:00 2001
+From: Sergey Matyukevich <geomatsi@gmail.com>
+Date: Mon, 9 May 2022 00:17:21 +0300
+Subject: [PATCH] Makefile: remove default endianness
+
+There is no way to remove configuration options from EXTRA_CFLAGS
+without editing Makefile. So default LE configuration can not be
+conveniently replaced by BE. Remove default endianness from the
+Makefile to enable its configuration via USER_EXTRA_CFLAGS.
+
+Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index dfca305..fde4e6b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,6 @@ endif
+ 
+ EXTRA_CFLAGS += -I$(src)/include
+ 
+-EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
+ EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
+ 
+ EXTRA_LDFLAGS += --strip-debug
+-- 
+2.35.1
+

+ 2 - 1
package/rtl8189fs/rtl8189fs.mk

@@ -11,7 +11,8 @@ RTL8189FS_LICENSE = GPL-2.0
 RTL8189FS_MODULE_MAKE_OPTS = \
 	CONFIG_RTL8189FS=m \
 	KVER=$(LINUX_VERSION_PROBED) \
-	KSRC=$(LINUX_DIR)
+	KSRC=$(LINUX_DIR) \
+	USER_EXTRA_CFLAGS="-DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN"
 
 define RTL8189FS_LINUX_CONFIG_FIXUPS
 	$(call KCONFIG_ENABLE_OPT,CONFIG_WIRELESS)