Skip to contentSkip to conversation

rtl8821au: new package

PATCH Superseded Christian Stewart 3 participants 7 messages Jul 23, 2015 – Jul 27, 2015

v6 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 rtl8821au: new package

Adding a kernel module based USB wifi driver. There is no official version of this driver that works properly on ARM and with newer USB WiFi cards. This driver version builds module 8821au and is based on a kernel module release from ASUS with various fixes integrated in.

---

I've switched to use ulli-kroll's branch of rtl8821au. While it's based on an older vendor version, it has binary firmware and around ~1800 commits of work to improve the driver. I think this work is probably more valuable than the vendor's updates.

 package/Config.in                                  |  1 +
 package/rtl8821au/0001-disable-default-debug.patch | 24 ++++++++++++++++++++++
 package/rtl8821au/Config.in                        | 10 +++++++++
 package/rtl8821au/rtl8821au.hash                   |  1 +
 package/rtl8821au/rtl8821au.mk                     | 21 +++++++++++++++++++
 5 files changed, 57 insertions(+)
 create mode 100644 package/rtl8821au/0001-disable-default-debug.patch
 create mode 100644 package/rtl8821au/Config.in
 create mode 100644 package/rtl8821au/rtl8821au.hash
 create mode 100644 package/rtl8821au/rtl8821au.mk
package/Config.in +1 -0
index cfa7512..070ec6a 100644
@@ -404,6 +404,7 @@ endif
 	source "package/read-edid/Config.in"
 	source "package/rng-tools/Config.in"
 	source "package/rpi-userland/Config.in"
+	source "package/rtl8821au/Config.in"
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/setserial/Config.in"
package/rtl8821au/0001-disable-default-debug.patch new file +24 -0
new file mode 100644
index 0000000..de6fc62
@@ -0,0 +1,24 @@
+Comment out the hardcoded debug defines. If extra debug is needed, we can add it
+as a define in the make flags.
+
+Signed-off-by: Christian Stewart <[email protected]>
+
+diff --git a/include/autoconf.h b/include/autoconf.h
+--- a/include/autoconf.h
++++ b/include/autoconf.h
+@@ -130,12 +130,12 @@
+ /*
+  * Debug Related Config
+  */
+-#define DBG	1
++//#define DBG	1
+ 
+-#define CONFIG_DEBUG /* DBG_871X, etc... */
++//#define CONFIG_DEBUG /* DBG_871X, etc... */
+ //#define CONFIG_DEBUG_RTL871X /* RT_TRACE, RT_PRINT_DATA, _func_enter_, _func_exit_ */
+ 
+-#define CONFIG_PROC_DEBUG
++//#define CONFIG_PROC_DEBUG
+ 
+ 
+ //#define DBG_TX
package/rtl8821au/Config.in new file +10 -0
new file mode 100644
index 0000000..9827ad5
@@ -0,0 +1,10 @@
+comment "rtl8821au needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_RTL8821AU
+	bool "rtl8821au"
+	depends on BR2_LINUX_KERNEL
+	help
+	  rtl8821au wifi driver
+
+	  https://github.com/paralin/rtl8821au
package/rtl8821au/rtl8821au.hash new file +1 -0
new file mode 100644
index 0000000..d54d3c3
@@ -0,0 +1 @@
+sha256 93beaf608880ecbca03bbeb8251b91d16e17724b36158b0571d1cebb7b4e5914  rtl8821au-f58e4a7fb27551bdbb4aee9db6086dd6ad996c8d.tar.gz
package/rtl8821au/rtl8821au.mk new file +21 -0
new file mode 100644
index 0000000..42f4cdd
@@ -0,0 +1,21 @@
+################################################################################
+#
+# rtl8821au
+#
+################################################################################
+
+RTL8821AU_VERSION = f58e4a7fb27551bdbb4aee9db6086dd6ad996c8d
+RTL8821AU_SITE = $(call github,ulli-kroll,rtl8821au,$(RTL8821AU_VERSION))
+RTL8821AU_CFLAGS_ENDIAN = -DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN
+
+RTL8821AU_MODULE_MAKE_OPTS = \
+	CONFIG_RTL8812AU_8821AU=m \
+	KVER=$(LINUX_VERSION_PROBED) \
+	USER_EXTRA_CFLAGS=$(RTL8821AU_CFLAGS_ENDIAN)
+
+define RTL8821AU_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/firmware/* $(TARGET_DIR)/lib/firmware/rtlwifi/
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
Signature · 1 line
2.1.4
#1 lore raw

PATCH v6 1/1 rtl8821au: new package

Hi all,

Note : I'm new on the list, so I had insert this tread by hand !

I'm the one working on the RTL8821AU driver.

Quoted 4 lines · Christian Stewart

Adding a kernel module based USB wifi driver. There is no official version of this driver that works properly on ARM and with newer USB WiFi cards. This driver version builds module 8821au and is based on a kernel module release from ASUS with various fixes integrated in.

This message will be commited please change.

The I think the difference between the version from ASUS and mine based the one Edimax are in the handling of the LED.
Maybe there are more ...

Quoted 5 lines

I've switched to use ulli-kroll's branch of rtl8821au. While it's based on an older vendor version, it has binary firmware and around ~1800 commits of work to improve the driver. I think this work is probably more valuable than the vendor's updates.

-> git send-email --compose
Will add some message an intreductory message

package/rtl8821au/0001-disable-default-debug.patch

Quoted 2 lines
package/rtl8821au/0001-disable-default-debug.patch new file +0 -0

I do add some kind of "disable debug message"
This will take some time, I'm currently working in the code.

package/rtl8821au/0001-disable-default-debug.patch

Quoted 7 lines
package/rtl8821au/0001-disable-default-debug.patch new file +7 -0
+config BR2_PACKAGE_RTL8821AU
+     bool "rtl8821au"
+     depends on BR2_LINUX_KERNEL
+     help
+       rtl8821au wifi driver
+
+       https://github.com/paralin/rtl8821au

Please fix this URL !

Maybe add some line "out of tree driver"
And the USB3 issue I found inthe HW as you can read in Readme.md

Greetings from Cologne
Hans Ulli Kroll

#2 lore raw

PATCH v6 1/1 rtl8821au: new package

Hey Hans,

It's not unusual in Buildroot to have long commit messages when a package is first added.

I've addressed your concerns and respun the patch.

Christian

Quoted 44 lines · Hans Ulli Kroll

Hi all,

Note : I'm new on the list, so I had insert this tread by hand !

I'm the one working on the RTL8821AU driver.

Quoted 4 lines · Christian Stewart

Adding a kernel module based USB wifi driver. There is no official version of this driver that works properly on ARM and with newer USB WiFi cards. This driver version builds module 8821au and is based on a kernel module release from ASUS with various fixes integrated in.

This message will be commited please change.

The I think the difference between the version from ASUS and mine based the one Edimax are in the handling of the LED.
Maybe there are more ...

Quoted 5 lines

I've switched to use ulli-kroll's branch of rtl8821au. While it's based on an older vendor version, it has binary firmware and around ~1800 commits of work to improve the driver. I think this work is probably more valuable than the vendor's updates.

-> git send-email --compose
Will add some message an intreductory message

package/rtl8821au/0001-disable-default-debug.patch

Quoted 2 lines
package/rtl8821au/0001-disable-default-debug.patch new file +0 -0

I do add some kind of "disable debug message"
This will take some time, I'm currently working in the code.

package/rtl8821au/0001-disable-default-debug.patch

Quoted 7 lines
package/rtl8821au/0001-disable-default-debug.patch new file +7 -0
+config BR2_PACKAGE_RTL8821AU
+     bool "rtl8821au"
+     depends on BR2_LINUX_KERNEL
+     help
+       rtl8821au wifi driver
+
+       https://github.com/paralin/rtl8821au

Please fix this URL !

Quoted 7 lines

Maybe add some line "out of tree driver"
And the USB3 issue I found inthe HW as you can read in Readme.md

Greetings from Cologne
Hans Ulli Kroll

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150724/be17f1a8/attachment.html>

#3 lore raw

PATCH v6 1/1 rtl8821au: new package

In reply to Hans Ulli Kroll

Ulli, all,

On 2015-07-24 15:50 +0200, Hans Ulli Kroll spake thusly:

Quoted 1 line

Note : I'm new on the list, so I had insert this tread by hand !

Welcome! :-)

Quoted 1 line

I'm the one working on the RTL8821AU driver.

Yeah, great! I saw that Christian and I did some work on the same module, but based on diffferent code-dump by different vendors. It would be great if you two could synchronise your work on this, to avoid duplication and to get the best driver possible, with a ultimate goal of submitting it for inclusion in the mainline. ;-)

Quoted 7 lines · Christian Stewart
Quoted 4 lines

Adding a kernel module based USB wifi driver. There is no official version of this driver that works properly on ARM and with newer USB WiFi cards. This driver version builds module 8821au and is based on a kernel module release from ASUS with various fixes integrated in.

This message will be commited please change.

No, that's OK to get some details when adding a new package.

Quoted 3 lines

The I think the difference between the version from ASUS and mine based the one Edimax are in the handling of the LED.
Maybe there are more ...

Well, if that's the only difference, we can consider that to be a minor issue that can be resolvdd by back-/forward-porting it from one code base to the other.

Quoted 8 lines
Quoted 5 lines

I've switched to use ulli-kroll's branch of rtl8821au. While it's based on an older vendor version, it has binary firmware and around ~1800 commits of work to improve the driver. I think this work is probably more valuable than the vendor's updates.

-> git send-email --compose
Will add some message an intreductory message

That's OK the way Christian did: that part isindeed not part of the commit message, as it lise below the '---' line, so git wil ignore it when the patch is applied.

Quoted 5 lines

package/rtl8821au/0001-disable-default-debug.patch

Quoted 2 lines
package/rtl8821au/0001-disable-default-debug.patch new file +0 -0

I do add some kind of "disable debug message"
This will take some time, I'm currently working in the code.

Great! :-)

Quoted 11 lines

package/rtl8821au/0001-disable-default-debug.patch

Quoted 7 lines
package/rtl8821au/0001-disable-default-debug.patch new file +7 -0
+config BR2_PACKAGE_RTL8821AU
+     bool "rtl8821au"
+     depends on BR2_LINUX_KERNEL
+     help
+       rtl8821au wifi driver
+
+       https://github.com/paralin/rtl8821au

Please fix this URL !

Maybe add some line "out of tree driver"

Well, if it were an in-tree module, we would not have a package for it, as it would come with the Linux source tree. So, this is obviously an out-of-tree module. ;-)

Quoted 2 lines

And the USB3 issue I found inthe HW as you can read in Readme.md

I see that Christian added that in the new commit log and help text.

Thanks! :-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH v6 1/1 rtl8821au: new package

Quoted 7 lines · Yann E. MORIN

Ulli, all,

On 2015-07-24 15:50 +0200, Hans Ulli Kroll spake thusly:

Quoted 1 line

Note : I'm new on the list, so I had insert this tread by hand !

Welcome! :-)

Thanks

Quoted 8 lines
Quoted 3 lines

The I think the difference between the version from ASUS and mine based the one Edimax are in the handling of the LED.
Maybe there are more ...

Well, if that's the only difference, we can consider that to be a minor issue that can be resolvdd by back-/forward-porting it from one code base to the other.

This ways only a quick look at some code I'm working (at this time) on. As I said there is maybe more.

Quoted 8 lines
Quoted 5 lines

package/rtl8821au/0001-disable-default-debug.patch

Quoted 2 lines
package/rtl8821au/0001-disable-default-debug.patch new file +0 -0

I do add some kind of "disable debug message"
This will take some time, I'm currently working in the code.

Great! :-)

So, now the driver is *allways* build with debug info, see CONFIG_RTLWIFI_DEBUG
but you *must* enable this while loading the driver i.e.

insmod rtl8821au debug=5

To be very verbose, default is debug=0 for no debug output.

For the code itself :
I've done *a lot* functions renames and other things.
I use the rtl8821ae driver as some kind of pattern and the rtl8192cu driver for the USB part.

Ulli

#5 lore raw

PATCH v6 1/1 rtl8821au: new package

Ulli,

On Sun, Jul 26, 2015 at 12:59 PM Hans Ulli Kroll <[email protected]> wrote:

[snip]

So, now the driver is *allways* build with debug info, see

Quoted 7 lines

CONFIG_RTLWIFI_DEBUG
but you *must* enable this while loading the driver i.e.

insmod rtl8821au debug=5

To be very verbose, default is debug=0 for no debug output.

That's a bit odd. When loading the driver as-is from your repository without any arguments, I get a very verbose amount of logging to the kernel logs. Are you sure this is the case? With the patch in the merged repository most of the debugging is disabled through header define comments.

Quoted 5 lines

For the code itself :
I've done *a lot* functions renames and other things.
I use the rtl8821ae driver as some kind of pattern and the rtl8192cu driver for the USB part.

Great!

~ Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150726/2fa19724/attachment.html>

#6 lore raw

PATCH v6 1/1 rtl8821au: new package

On Sun, 26 Jul 2015, Christian Stewart wrote:
Hi,

I've done a quick test during my coffee break ...

Quoted 6 lines

That's a bit odd. When loading the driver as-is from your repository without any arguments, I get a very verbose amount of logging to the kernel logs. Are you sure this is the case? With the patch in the merged repository most of the debugging is disabled through header define comments.

I missed some old dev_info() in rtl8821au/.
Now changed.
Pushed.

Ulli