[PATCH 0/2] Add xradio wireless driver

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 0/2] Add xradio wireless driver

Sergey Matyukevich
Hi all,

This small series adds xradio wireless driver for XR819 SDIO chip
and includes this driver to orange-pi-zero board images.

Note that this series does not include firmware since I have certain doubts
regarding firmware packaging. IIUC normally xr819 firmware is extracted
from vendor's SDK. Extracted firmware can be obtained from various places
on the web, e.g. from Armbian project.

Would it be alright to point at Armbian github in firmware package ?

Regards,
Sergey
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 2/2] orangepi_zero_defconfig: add xradio wireless driver

Sergey Matyukevich
Add xradio driver to enable on-board SDIO WiFi chip XR819.

Signed-off-by: Sergey Matyukevich <[hidden email]>
---
 configs/orangepi_zero_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
index e023af448..c21ea50b5 100644
--- a/configs/orangepi_zero_defconfig
+++ b/configs/orangepi_zero_defconfig
@@ -30,6 +30,9 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
 
+# wireless driver
+BR2_PACKAGE_XR819_XRADIO=y
+
 # wireless support
 BR2_PACKAGE_IW=y
 BR2_PACKAGE_WIRELESS_TOOLS=y
--
2.11.0

_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 1/2] xr819-xradio: new package

Sergey Matyukevich
In reply to this post by Sergey Matyukevich
This patch adds xradio wireless driver for SDIO WiFi chip XR819.
The out-of-tree driver is sourced from fifteenhex's work
on github https://github.com/fifteenhex/xradio

Signed-off-by: Sergey Matyukevich <[hidden email]>
---
 package/Config.in                      |  1 +
 package/xr819-xradio/Config.in         | 10 ++++++++++
 package/xr819-xradio/xr819-xradio.hash |  2 ++
 package/xr819-xradio/xr819-xradio.mk   | 13 +++++++++++++
 4 files changed, 26 insertions(+)
 create mode 100644 package/xr819-xradio/Config.in
 create mode 100644 package/xr819-xradio/xr819-xradio.hash
 create mode 100644 package/xr819-xradio/xr819-xradio.mk

diff --git a/package/Config.in b/package/Config.in
index c997e2a30..1fb84cf3d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -504,6 +504,7 @@ endmenu
  source "package/wf111/Config.in"
  source "package/wipe/Config.in"
  source "package/xorriso/Config.in"
+ source "package/xr819-xradio/Config.in"
 endmenu
 
 menu "Interpreter languages and scripting"
diff --git a/package/xr819-xradio/Config.in b/package/xr819-xradio/Config.in
new file mode 100644
index 000000000..5539004be
--- /dev/null
+++ b/package/xr819-xradio/Config.in
@@ -0,0 +1,10 @@
+comment "xradio wireless driver needs a Linux kernel to be built"
+ depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_XR819_XRADIO
+ bool "xr819-xradio"
+ depends on BR2_LINUX_KERNEL
+ help
+  Wireless driver for SDIO WiFi chip XR819
+
+  https://github.com/fifteenhex/xradio
diff --git a/package/xr819-xradio/xr819-xradio.hash b/package/xr819-xradio/xr819-xradio.hash
new file mode 100644
index 000000000..bdb0f96cd
--- /dev/null
+++ b/package/xr819-xradio/xr819-xradio.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 5e9f59942b3880768b4812ab6db395bd1fa6d423cae9c09504baa416f064a10d xr819-xradio-014dfdd203102c5fd2370a73ec4ae3e6dd4e9ded.tar.gz
diff --git a/package/xr819-xradio/xr819-xradio.mk b/package/xr819-xradio/xr819-xradio.mk
new file mode 100644
index 000000000..dfe2ee6ed
--- /dev/null
+++ b/package/xr819-xradio/xr819-xradio.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# xr819-xradio
+#
+################################################################################
+
+XR819_XRADIO_VERSION = 014dfdd203102c5fd2370a73ec4ae3e6dd4e9ded
+XR819_XRADIO_SITE = $(call github,fifteenhex,xradio,$(XR819_XRADIO_VERSION))
+XR819_XRADIO_LICENSE = GPL-2.0
+XR819_XRADIO_LICENSE_FILES = LICENSE
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
--
2.11.0

_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 1/2] xr819-xradio: new package

Thomas Petazzoni-2
Hello,

On Sun, 18 Jun 2017 21:41:59 +0300, Sergey Matyukevich wrote:
> This patch adds xradio wireless driver for SDIO WiFi chip XR819.
> The out-of-tree driver is sourced from fifteenhex's work
> on github https://github.com/fifteenhex/xradio
>
> Signed-off-by: Sergey Matyukevich <[hidden email]>

Thanks for your contribution. I've applied, after some minor changes,
see below.

> ---
>  package/Config.in                      |  1 +
>  package/xr819-xradio/Config.in         | 10 ++++++++++
>  package/xr819-xradio/xr819-xradio.hash |  2 ++
>  package/xr819-xradio/xr819-xradio.mk   | 13 +++++++++++++
>  4 files changed, 26 insertions(+)
>  create mode 100644 package/xr819-xradio/Config.in
>  create mode 100644 package/xr819-xradio/xr819-xradio.hash
>  create mode 100644 package/xr819-xradio/xr819-xradio.mk

You forgot to add an entry to the DEVELOPERS file, so I've added one.

> diff --git a/package/xr819-xradio/Config.in b/package/xr819-xradio/Config.in
> new file mode 100644
> index 000000000..5539004be
> --- /dev/null
> +++ b/package/xr819-xradio/Config.in
> @@ -0,0 +1,10 @@
> +comment "xradio wireless driver needs a Linux kernel to be built"

The comment should mention the package name as-is, i.e:

comment "xr819-xradio needs a Linux kernel to be built.

I've fixed both issues and applied. Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 2/2] orangepi_zero_defconfig: add xradio wireless driver

Thomas Petazzoni-2
In reply to this post by Sergey Matyukevich
Hello,

On Sun, 18 Jun 2017 21:42:00 +0300, Sergey Matyukevich wrote:
> Add xradio driver to enable on-board SDIO WiFi chip XR819.
>
> Signed-off-by: Sergey Matyukevich <[hidden email]>
> ---
>  configs/orangepi_zero_defconfig | 3 +++
>  1 file changed, 3 insertions(+)

Applied to master, thanks.

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 1/2] xr819-xradio: new package

Sergey Matyukevich
In reply to this post by Thomas Petazzoni-2
> > +comment "xradio wireless driver needs a Linux kernel to be built"
>
> The comment should mention the package name as-is, i.e:
>
> comment "xr819-xradio needs a Linux kernel to be built.
>
> I've fixed both issues and applied. Thanks!


Hello Thomas,

Thanks for taking care and fixing those patch issues !

Could you please also comment on the question regarding firmware binaries
from the cover email to this patch series. For convenience
I repeat it here:

This series does not include firmware since I have certain doubts regarding
firmware packaging. IIUC normally xr819 firmware is extracted from vendor's SDK.
Extracted firmware can be obtained from various places on the web,
e.g. from Armbian project.

Would it be alright to point at Armbian github in firmware package ?

Regards,
Sergey
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 1/2] xr819-xradio: new package

Thomas Petazzoni-2
Hello,

On Thu, 22 Jun 2017 10:55:19 +0300, Sergey Matyukevich wrote:

> Thanks for taking care and fixing those patch issues !
>
> Could you please also comment on the question regarding firmware binaries
> from the cover email to this patch series. For convenience
> I repeat it here:

Thanks for repeating these here, because I missed them. Patchwork only
lists the patches, not the cover letter, so I tend to miss the cover
letter details, sorry about that :/

> This series does not include firmware since I have certain doubts regarding
> firmware packaging. IIUC normally xr819 firmware is extracted from vendor's SDK.
> Extracted firmware can be obtained from various places on the web,
> e.g. from Armbian project.
>
> Would it be alright to point at Armbian github in firmware package ?

Yes, it's fine to point to the Armbian github. The only gotcha is how
to do this without downloading the entire Github repository. I guess
you will have to do something like this:

XR819_FIRMWARE_VERSION = 8b4a4ed16f7f9d12e59ff2f9ceba3cc335374dbe
XR819_FIRMWARE_SITE = https://github.com/armbian/build/tree/$(XR819_FIRMWARE_VERSION)/bin/firmware-overlay/xr819
XR819_FIRMWARE_SOURCE = fw_xr819.bin
XR819_FIRMWARE_EXTRA_DOWNLOADS = boot_xr819.bin sdd_xr819.bin

and of course, add hashes for those files in the .hash file.

However, the bigger question is: what is the license of those firmware
files? Are users at least allowed to redistribute them?

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 1/2] xr819-xradio: new package

Sergey Matyukevich
> Yes, it's fine to point to the Armbian github. The only gotcha is how
> to do this without downloading the entire Github repository. I guess
> you will have to do something like this:
>
> XR819_FIRMWARE_VERSION = 8b4a4ed16f7f9d12e59ff2f9ceba3cc335374dbe
> XR819_FIRMWARE_SITE = https://github.com/armbian/build/tree/$(XR819_FIRMWARE_VERSION)/bin/firmware-overlay/xr819
> XR819_FIRMWARE_SOURCE = fw_xr819.bin
> XR819_FIRMWARE_EXTRA_DOWNLOADS = boot_xr819.bin sdd_xr819.bin
>
> and of course, add hashes for those files in the .hash file.
>
> However, the bigger question is: what is the license of those firmware
> files? Are users at least allowed to redistribute them?

Thanks for the answers. I will check the licensing. If it is not
clear enough about redistribution, then I will not add xr819
firmware package. In this case I will just add a note to
board/orangepi/orangepi-zero/readme.txt explaining manual
firmware installation procedure.

Regards,
Sergey
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 1/2] xr819-xradio: new package

Peter Korsgaard-2
In reply to this post by Thomas Petazzoni-2
>>>>> "Thomas" == Thomas Petazzoni <[hidden email]> writes:

Hi,

 > Yes, it's fine to point to the Armbian github. The only gotcha is how
 > to do this without downloading the entire Github repository. I guess
 > you will have to do something like this:

 > XR819_FIRMWARE_VERSION = 8b4a4ed16f7f9d12e59ff2f9ceba3cc335374dbe
 > XR819_FIRMWARE_SITE =
 > https://github.com/armbian/build/tree/$(XR819_FIRMWARE_VERSION)/bin/firmware-overlay/xr819
 > XR819_FIRMWARE_SOURCE = fw_xr819.bin
 > XR819_FIRMWARE_EXTRA_DOWNLOADS = boot_xr819.bin sdd_xr819.bin

The only problem is that these file names are not versioned, so it is
difficult to ever change them in the future.

But as they are from a vendor dump, that it perhaps not likely to ever
happen.

--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 1/2] xr819-xradio: new package

Thomas Petazzoni-2
Hello,

On Thu, 22 Jun 2017 11:47:01 +0200, Peter Korsgaard wrote:

>  > Yes, it's fine to point to the Armbian github. The only gotcha is how
>  > to do this without downloading the entire Github repository. I guess
>  > you will have to do something like this:  
>
>  > XR819_FIRMWARE_VERSION = 8b4a4ed16f7f9d12e59ff2f9ceba3cc335374dbe
>  > XR819_FIRMWARE_SITE =
>  > https://github.com/armbian/build/tree/$(XR819_FIRMWARE_VERSION)/bin/firmware-overlay/xr819
>  > XR819_FIRMWARE_SOURCE = fw_xr819.bin
>  > XR819_FIRMWARE_EXTRA_DOWNLOADS = boot_xr819.bin sdd_xr819.bin  
>
> The only problem is that these file names are not versioned, so it is
> difficult to ever change them in the future.

If the files are changed, we will change the hashes. Our download infra
will notice that the files in the dl folder have a hash that doesn't
match the one in the .hash file, and we re-download them.

So it seems to work alright, no?

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 1/2] xr819-xradio: new package

Peter Korsgaard-2
>>>>> "Thomas" == Thomas Petazzoni <[hidden email]> writes:

 >> The only problem is that these file names are not versioned, so it is
 >> difficult to ever change them in the future.

 > If the files are changed, we will change the hashes. Our download infra
 > will notice that the files in the dl folder have a hash that doesn't
 > match the one in the .hash file, and we re-download them.

 > So it seems to work alright, no?

Yes, except for sources.b.o, there we have to keep either the old or the
new variants.

But ok, the github repo will probably stick around.

--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Loading...