All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Matyukevich <geomatsi@gmail.com>
To: buildroot@buildroot.org
Cc: Sergey Matyukevich <geomatsi@gmail.com>
Subject: [Buildroot] [PATCH 3/3] package/rtl8189fs: fix big-endian builds
Date: Mon,  9 May 2022 09:07:21 +0300	[thread overview]
Message-ID: <20220509060721.2726047-4-geomatsi@gmail.com> (raw)
In-Reply-To: <20220509060721.2726047-1-geomatsi@gmail.com>

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>
---
 ...1-Makefile-remove-default-endianness.patch | 30 +++++++++++++++++++
 package/rtl8189fs/rtl8189fs.mk                |  3 +-
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 package/rtl8189fs/0001-Makefile-remove-default-endianness.patch

diff --git a/package/rtl8189fs/0001-Makefile-remove-default-endianness.patch b/package/rtl8189fs/0001-Makefile-remove-default-endianness.patch
new file mode 100644
index 0000000000..47e42415eb
--- /dev/null
+++ b/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
+
diff --git a/package/rtl8189fs/rtl8189fs.mk b/package/rtl8189fs/rtl8189fs.mk
index 6031a3072c..1c398919ba 100644
--- a/package/rtl8189fs/rtl8189fs.mk
+++ b/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)
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-05-09  6:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09  6:07 [Buildroot] [PATCH 0/3] package/rtl8189s: fixes for autobuilder failures Sergey Matyukevich
2022-05-09  6:07 ` [Buildroot] [PATCH 1/3] package/rtl8189fs: enable required kernel options Sergey Matyukevich
2022-05-28 19:17   ` Peter Korsgaard
2022-05-09  6:07 ` [Buildroot] [PATCH 2/3] package/rtl8189fs: bump revision Sergey Matyukevich
2022-05-28 19:17   ` Peter Korsgaard
2022-05-09  6:07 ` Sergey Matyukevich [this message]
2022-05-13 21:08   ` [Buildroot] [PATCH 3/3] package/rtl8189fs: fix big-endian builds Arnout Vandecappelle
2022-05-28 19:19   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220509060721.2726047-4-geomatsi@gmail.com \
    --to=geomatsi@gmail.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.