Skip to contentSkip to conversation

orange-pi-zero: misc updates

PATCH Superseded Sergey Matyukevich 3 participants 9 messages Nov 6, 2017 – Nov 7, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 orange-pi-zero: misc updates

Hi all,

This is the second iteration of the patchset which aimes at enabling WiFi on orange-pi-zero board right out-of-the-box. The first approach suggested to pull xr819 WiFi chip firmware from armbian repositories.

Meanwhile it turned out that Armbian project created a separate github repository to keep firmware binary blobs for all their supported boards. Reviewers (Peter Korsgaard and Yann E. Morin) suggested to use new Armbian firmware repository and organize access to firmware files in a similar way to what linux-firmware does.

Regards,
Sergey

Sergey Matyukevich (3):
armbian-firmware: new package
orange-pi-zero: add xr819 firmware
DEVELOPERS: add myself to several packages

 DEVELOPERS                                     |    7 +++
 configs/orangepi_zero_defconfig                |    5 +-
 package/Config.in                              |    1
 package/armbian-firmware/Config.in             |   21 +++++++++
 package/armbian-firmware/armbian-firmware.hash |    2
 package/armbian-firmware/armbian-firmware.mk   |   53 +++++++++++++++++++++++++
 6 files changed, 88 insertions(+), 1 deletion(-)
#1 lore raw

PATCH v2 1/3 armbian-firmware: new package

This package enables access to firmware blobs from Armbian firmware
repository: https://github.com/armbian/firmware

That repository contains multiple firmware blobs grouped by vendor. For the sake of convenience each group can be independently selected using Kconfig options. This commit enables the following options:
- firmware blobs for XR819 SDIO WiFi chip
- firmware blobs for AP6212 WiFi/BT combo

Armbian firmware repository does not include any specific licenses. Most part of those firmware blobs belongs to various Android/Linux SDK packages provided by board vendors. As a result, this package makes use of the following conservative approach for all the selected firmware binaries:
FIRMWARE_LICENSE = PROPRIETARY
FIRMWARE_REDISTRIBUTE = NO

---
 DEVELOPERS                                     |  1 +
 package/Config.in                              |  1 +
 package/armbian-firmware/Config.in             | 21 ++++++++++
 package/armbian-firmware/armbian-firmware.hash |  2 +
 package/armbian-firmware/armbian-firmware.mk   | 53 ++++++++++++++++++++++++++
 5 files changed, 78 insertions(+)
 create mode 100644 package/armbian-firmware/Config.in
 create mode 100644 package/armbian-firmware/armbian-firmware.hash
 create mode 100644 package/armbian-firmware/armbian-firmware.mk
DEVELOPERS +1 -0
index c651bf26fa..d27d55f73d 100644
@@ -1432,6 +1432,7 @@ F:	package/mpir/
 
 N:	Sergey Matyukevich <[email protected]>
 F:	package/xr819-xradio/
+F:	package/armbian-firmware/
 
 N:	Sergio Prado <[email protected]>
 F:	package/libgdiplus/
package/Config.in +1 -0
index fe5ccc434e..23526b4124 100644
@@ -369,6 +369,7 @@ menu "Firmware"
 	source "package/wilc1000-firmware/Config.in"
 	source "package/wilink-bt-firmware/Config.in"
 	source "package/zd1211-firmware/Config.in"
+	source "package/armbian-firmware/Config.in"
 endmenu
 	source "package/a10disp/Config.in"
 	source "package/acpica/Config.in"
package/armbian-firmware/Config.in new file +21 -0
new file mode 100644
index 0000000000..766c291697
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_ARMBIAN_FIRMWARE
+	bool "armbian-firmware"
+	help
+	  This package enables access to various firmware
+	  blobs from Armbian firmware repository.
+
+	  https://github.com/armbian/firmware
+
+if BR2_PACKAGE_ARMBIAN_FIRMWARE
+
+config BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819
+	bool "XR819 WiFi"
+	help
+	  Firmware files for XR819 WiFi SDIO chip.
+
+config BR2_PACKAGE_ARMBIAN_FIRMWARE_AP6212
+	bool "AP6212 WiFi/BT"
+	help
+	  Firmware files for AP6212 WiFi/BT combo chip.
+
+endif
package/armbian-firmware/armbian-firmware.hash new file +2 -0
new file mode 100644
index 0000000000..0f3858dedf
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 876958ce6ba8a4a01a424f2b4455208b7a989eaba96015649c774340553f0c35 armbian-firmware-455d6b6701178dafe7fd0168eb4a4ef78a8d24a3.tar.gz
package/armbian-firmware/armbian-firmware.mk new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.11.0
#2 lore raw

PATCH v2 1/3 armbian-firmware: new package

Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sergey" == Sergey Matyukevich <[email protected]> writes:

This package enables access to firmware blobs from Armbian firmware
repository: https://github.com/armbian/firmware

That repository contains multiple firmware blobs grouped by vendor. For the sake of convenience each group can be independently selected using Kconfig options. This commit enables the following options:
- firmware blobs for XR819 SDIO WiFi chip
- firmware blobs for AP6212 WiFi/BT combo

Armbian firmware repository does not include any specific licenses. Most part of those firmware blobs belongs to various Android/Linux SDK packages provided by board vendors. As a result, this package makes use of the following conservative approach for all the selected firmware binaries:
FIRMWARE_LICENSE = PROPRIETARY
FIRMWARE_REDISTRIBUTE = NO

Quoted 1 line

Committed to next, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v2 2/3 orange-pi-zero: add xr819 firmware

In reply to Sergey Matyukevich

Make WiFi work out of the box on orange-pi-zero:
- add xr819 firmware to image
- add mdev for module autoloading

---
 DEVELOPERS                      | 2 ++
 configs/orangepi_zero_defconfig | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
DEVELOPERS +2 -0
index d27d55f73d..45e228286a 100644
@@ -1433,6 +1433,8 @@ F:	package/mpir/
 N:	Sergey Matyukevich <[email protected]>
 F:	package/xr819-xradio/
 F:	package/armbian-firmware/
+F:	board/orangepi/orangepi-zero
+F:	configs/orangepi_zero_defconfig
 
 N:	Sergio Prado <[email protected]>
 F:	package/libgdiplus/
configs/orangepi_zero_defconfig +4 -1
index bd3862cb14..142b648fa8 100644
@@ -2,6 +2,7 @@ BR2_arm=y
 BR2_cortex_a7=y
 BR2_ARM_FPU_VFPV4=y
 BR2_GLOBAL_PATCH_DIR="board/orangepi/orangepi-zero/patches"
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
 BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Zero"
 BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Zero"
@@ -30,8 +31,10 @@ BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
 
-# wireless driver
+# wireless driver and firmware
 BR2_PACKAGE_XR819_XRADIO=y
+BR2_PACKAGE_ARMBIAN_FIRMWARE=y
+BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819=y
 
 # wireless support
 BR2_PACKAGE_IW=y
Signature · 1 line
2.11.0
#4 lore raw

PATCH v2 2/3 orange-pi-zero: add xr819 firmware

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sergey" == Sergey Matyukevich <[email protected]> writes:

Make WiFi work out of the box on orange-pi-zero:
- add xr819 firmware to image
- add mdev for module autoloading

Committed to next, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH v2 3/3 DEVELOPERS: add myself to several packages

In reply to Sergey Matyukevich
---
 DEVELOPERS | 4 ++++
 1 file changed, 4 insertions(+)
DEVELOPERS +4 -0
index 45e228286a..1ea1b469b8 100644
@@ -1434,7 +1434,11 @@ N:	Sergey Matyukevich <[email protected]>
 F:	package/xr819-xradio/
 F:	package/armbian-firmware/
 F:	board/orangepi/orangepi-zero
+F:	board/orangepi/orangepi-one
+F:	board/linksprite/pcduino
+F:	configs/orangepi_one_defconfig
 F:	configs/orangepi_zero_defconfig
+F:	configs/linksprite_pcduino_defconfig
 
 N:	Sergio Prado <[email protected]>
 F:	package/libgdiplus/
Signature · 1 line
2.11.0
#7 lore raw

PATCH v2 1/1 orange-pi-zero: misc updates

In reply to Sergey Matyukevich
Quoted 11 lines · Sergey Matyukevich

Hi all,

This is the second iteration of the patchset which aimes at enabling WiFi on orange-pi-zero board right out-of-the-box. The first approach suggested to pull xr819 WiFi chip firmware from armbian repositories.

Meanwhile it turned out that Armbian project created a separate github repository to keep firmware binary blobs for all their supported boards. Reviewers (Peter Korsgaard and Yann E. Morin) suggested to use new Armbian firmware repository and organize access to firmware files in a similar way to what linux-firmware does.

It would be good if you update or write some readme on board dir, about how to test wifi

thanks!

Signature · 4 lines
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#8 lore raw

PATCH v2 1/1 orange-pi-zero: misc updates

Quoted 2 lines

It would be good if you update or write some readme on board dir, about how to test wifi

Well, when all the ingridients are enabled (wireless core drivers, xradio driver, xr819 firmware, and mdev), all the needed kernel modules are autoloaded on boot and wlan0 interface becomes available. That was the purpose of the patchset: to enable WiFi right after boot w/o any additional efforts like loading modules manually or looking for firmware and uploading it to the board.

All you need to do after boot is to start wpa_supplicant with proper config, or perform scan or any other operations using iw tool. However I don't think it makes sense to describe WiFi STA/AP setup in the board readme.txt. There are plenty of good sources for that, e.g. wireless.wiki.kernel.org.

Regards,
Sergey