Skip to contentSkip to conversation

orangepi-zero: misc updates

PATCH Superseded Sergey Matyukevich 3 participants 11 messages Nov 4, 2017 – Nov 5, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover orangepi-zero: misc updates

Hi all,

This patchset contains updates mostly aimed at better support of orange-pi-zero board, including enabling WiFi and bumping kernel version. Besides, I added myself to DEVELOPERS to track activity around several allwinner boards.

Regards,
Sergey

Sergey Matyukevich (5):
xr819-firmware: new package
orange-pi-zero: add xr819 firmware
orange-pi-zero: bump kernel version package/xr819-xradio: update to the latest version
DEVELOPERS: add myself to several packages

 DEVELOPERS                                 |    7 +++++++
 configs/orangepi_zero_defconfig            |    8 +++++---
 package/Config.in                          |    1 +
 package/xr819-firmware/Config.in           |    4 ++++
 package/xr819-firmware/xr819-firmware.hash |    5 +++++
 package/xr819-firmware/xr819-firmware.mk   |   25 +++++++++++++++++++++++++
 package/xr819-xradio/xr819-xradio.hash     |    2 +-
 package/xr819-xradio/xr819-xradio.mk       |    2 +-
 8 files changed, 49 insertions(+), 5 deletions(-)
#1 lore raw

PATCH 1/5 xr819-firmware: new package

Add firmware for XR819 SDIO WiFi chip.

---
 DEVELOPERS                                 |  1 +
 package/Config.in                          |  1 +
 package/xr819-firmware/Config.in           |  4 ++++
 package/xr819-firmware/xr819-firmware.hash |  5 +++++
 package/xr819-firmware/xr819-firmware.mk   | 25 +++++++++++++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 package/xr819-firmware/Config.in
 create mode 100644 package/xr819-firmware/xr819-firmware.hash
 create mode 100644 package/xr819-firmware/xr819-firmware.mk
DEVELOPERS +1 -0
index c651bf26fa..ab2d0a36b9 100644
@@ -1432,6 +1432,7 @@ F:	package/mpir/
 
 N:	Sergey Matyukevich <[email protected]>
 F:	package/xr819-xradio/
+F:	package/xr819-firmware/
 
 N:	Sergio Prado <[email protected]>
 F:	package/libgdiplus/
package/Config.in +1 -0
index fe5ccc434e..7b7a85a574 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/xr819-firmware/Config.in"
 endmenu
 	source "package/a10disp/Config.in"
 	source "package/acpica/Config.in"
package/xr819-firmware/Config.in new file +4 -0
new file mode 100644
index 0000000000..d1be7f8554
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_XR819_FIRMWARE
+	bool "xr819-firmware"
+	help
+	  Firmware for XR819 SDIO WiFi chip
package/xr819-firmware/xr819-firmware.hash new file +5 -0
new file mode 100644
index 0000000000..91a2a80a91
@@ -0,0 +1,5 @@
+# Locally computed
+sha256 6583350b3eb12f70fc6d6081426717bd0019b55c6558ffe820c1548f0702bb8c boot_xr819.bin
+sha256 4954ceb85807959c42e82c432109455bd9eabe95971402299a16d77ddd7d79f5 fw_xr819.bin
+sha256 84d3fb3ca8e5d25a0c113a5063bccbeb5b53da230a0afa236b5b625f37db5161 sdd_xr819.bin
+
package/xr819-firmware/xr819-firmware.mk new file +25 -0
new file mode 100644
index 0000000000..a14719f6fa
@@ -0,0 +1,25 @@
+################################################################################
+#
+# xr819-firmware
+#
+################################################################################
+
+XR819_FIRMWARE_VERSION = v2017.07
+XR819_FIRMWARE_SITE =  https://github.com/armbian/build/raw/$(XR819_FIRMWARE_VERSION)/packages/extras/firmware/xr819
+XR819_FIRMWARE_SOURCE = fw_xr819.bin
+XR819_FIRMWARE_EXTRA_DOWNLOADS = boot_xr819.bin sdd_xr819.bin
+XR819_FIRMWARE_LICENSE = PROPRIETARY
+
+define XR819_FIRMWARE_EXTRACT_CMDS
+	mkdir -p $(@D)/xr819
+	cp $(DL_DIR)/fw_xr819.bin $(@D)/xr819/
+	cp $(DL_DIR)/sdd_xr819.bin $(@D)/xr819/
+	cp $(DL_DIR)/boot_xr819.bin $(@D)/xr819/
+endef
+
+define XR819_FIRMWARE_INSTALL_TARGET_CMDS
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/lib/firmware/xr819
+	cp $(@D)/xr819/* $(TARGET_DIR)/lib/firmware/xr819/
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.11.0
#2 lore raw

PATCH 1/5 xr819-firmware: new package

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Add firmware for XR819 SDIO WiFi chip.

Thanks. I had a quick look at doing so myself some time ago, but never got around to finishing it.

package/xr819-firmware/xr819-firmware.mk line 11

Quoted 13 lines

+++ b/package/xr819-firmware/xr819-firmware.mk

package/xr819-firmware/xr819-firmware.mk new file +11 -0
@@ -0,0 +1,25 @@
+################################################################################
+#
+# xr819-firmware
+#
+################################################################################
+
+XR819_FIRMWARE_VERSION = v2017.07
+XR819_FIRMWARE_SITE =  https://github.com/armbian/build/raw/$(XR819_FIRMWARE_VERSION)/packages/extras/firmware/xr819
+XR819_FIRMWARE_SOURCE = fw_xr819.bin
+XR819_FIRMWARE_EXTRA_DOWNLOADS = boot_xr819.bin sdd_xr819.bin
+XR819_FIRMWARE_LICENSE = PROPRIETARY

These firmware blobs are quite icky. If I understand correctly, the firmware comes from some kind of (android?) disk image. Given that, I'm not sure we are really allowed to redistribute them so we should set XR819_FIRMWARE_REDISTRIBUTE = NO

The fact that the filenames are not versioned is also a pain, as we cannot really handle any future version bumps without breaking older releases.

I agree that cloning the huge armbian build repo for these small files isn't really nice, but I had a look at the armbian github and I see they have recently moved the firmware blobs to a separate repo:

https://github.com/armbian/firmware

Which is only around ~9MB, so I suggest we download that with git similar to linux-firmware, then at least we have a git revision.

Care to rework the package to be such an "armbian-firmware" package instead? For now it is fine to just have a single sub option to install the xr819 files.

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

PATCH 1/5 xr819-firmware: new package

Hello Peter,

Quoted 32 lines
Quoted 1 line

Add firmware for XR819 SDIO WiFi chip.

Thanks. I had a quick look at doing so myself some time ago, but never got around to finishing it.

package/xr819-firmware/xr819-firmware.mk line 11

Quoted 13 lines

+++ b/package/xr819-firmware/xr819-firmware.mk

package/xr819-firmware/xr819-firmware.mk new file +11 -0
@@ -0,0 +1,25 @@
+################################################################################
+#
+# xr819-firmware
+#
+################################################################################
+
+XR819_FIRMWARE_VERSION = v2017.07
+XR819_FIRMWARE_SITE =  https://github.com/armbian/build/raw/$(XR819_FIRMWARE_VERSION)/packages/extras/firmware/xr819
+XR819_FIRMWARE_SOURCE = fw_xr819.bin
+XR819_FIRMWARE_EXTRA_DOWNLOADS = boot_xr819.bin sdd_xr819.bin
+XR819_FIRMWARE_LICENSE = PROPRIETARY

These firmware blobs are quite icky. If I understand correctly, the firmware comes from some kind of (android?) disk image. Given that, I'm not sure we are really allowed to redistribute them so we should set XR819_FIRMWARE_REDISTRIBUTE = NO

The fact that the filenames are not versioned is also a pain, as we cannot really handle any future version bumps without breaking older releases.

I agree that cloning the huge armbian build repo for these small files isn't really nice, but I had a look at the armbian github and I see they have recently moved the firmware blobs to a separate repo:

Quoted 8 lines

https://github.com/armbian/firmware

Which is only around ~9MB, so I suggest we download that with git similar to linux-firmware, then at least we have a git revision.

Care to rework the package to be such an "armbian-firmware" package instead? For now it is fine to just have a single sub option to install the xr819 files.

Thanks for review ! I didn't notice they moved all the blobs into a separate git repository. I assume you mean the same approach as in the package linux-firmware.mk: adding separate Kconfig options for each group of firmware files.

I will rework xr819 firmware packaging approach and then resubmit the whole patchset. For the time being I plan to add xr819 and ap6212 sub-options to handle orange-pi-zero and upcoming orange-pi-zero-plus2 boards.

Regards,
Sergey

#4 lore raw

PATCH 1/5 xr819-firmware: new package

Sergey, All,

On 2017-11-05 18:39 +0300, Sergey Matyukevich spake thusly:

Quoted 36 lines
Quoted 36 lines
Quoted 1 line

Add firmware for XR819 SDIO WiFi chip.

Thanks. I had a quick look at doing so myself some time ago, but never got around to finishing it.

package/xr819-firmware/xr819-firmware.mk line 11

Quoted 13 lines

+++ b/package/xr819-firmware/xr819-firmware.mk

package/xr819-firmware/xr819-firmware.mk new file +11 -0
@@ -0,0 +1,25 @@
+################################################################################
+#
+# xr819-firmware
+#
+################################################################################
+
+XR819_FIRMWARE_VERSION = v2017.07
+XR819_FIRMWARE_SITE =  https://github.com/armbian/build/raw/$(XR819_FIRMWARE_VERSION)/packages/extras/firmware/xr819
+XR819_FIRMWARE_SOURCE = fw_xr819.bin
+XR819_FIRMWARE_EXTRA_DOWNLOADS = boot_xr819.bin sdd_xr819.bin
+XR819_FIRMWARE_LICENSE = PROPRIETARY

These firmware blobs are quite icky. If I understand correctly, the firmware comes from some kind of (android?) disk image. Given that, I'm not sure we are really allowed to redistribute them so we should set XR819_FIRMWARE_REDISTRIBUTE = NO

The fact that the filenames are not versioned is also a pain, as we cannot really handle any future version bumps without breaking older releases.

I agree that cloning the huge armbian build repo for these small files isn't really nice, but I had a look at the armbian github and I see they have recently moved the firmware blobs to a separate repo:

https://github.com/armbian/firmware

Which is only around ~9MB, so I suggest we download that with git similar to linux-firmware, then at least we have a git revision.

Quoted 8 lines
Quoted 3 lines

Care to rework the package to be such an "armbian-firmware" package instead? For now it is fine to just have a single sub option to install the xr819 files.

Thanks for review ! I didn't notice they moved all the blobs into a separate git repository. I assume you mean the same approach as in the package linux-firmware.mk: adding separate Kconfig options for each group of firmware files.

Basically, yes.

Quoted 3 lines

I will rework xr819 firmware packaging approach and then resubmit the whole patchset. For the time being I plan to add xr819 and ap6212 sub-options to handle orange-pi-zero and upcoming orange-pi-zero-plus2 boards.

Yes, just start with just the options you require. If anyone is later interested to add more, they can send further patches to add those.

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.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 2/5 orange-pi-zero: add xr819 firmware

In reply to Sergey Matyukevich

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

---
 DEVELOPERS                      | 2 ++
 configs/orangepi_zero_defconfig | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
DEVELOPERS +2 -0
index ab2d0a36b9..a2e0fa0107 100644
@@ -1433,6 +1433,8 @@ F:	package/mpir/
 N:	Sergey Matyukevich <[email protected]>
 F:	package/xr819-xradio/
 F:	package/xr819-firmware/
+F:	board/orangepi/orangepi-zero
+F:	configs/orangepi_zero_defconfig
 
 N:	Sergio Prado <[email protected]>
 F:	package/libgdiplus/
configs/orangepi_zero_defconfig +3 -1
index c96d9720ee..03e1d9c34e 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_11=y
 BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Zero"
 BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Zero"
@@ -30,8 +31,9 @@ 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_XR819_FIRMWARE=y
 
 # wireless support
 BR2_PACKAGE_IW=y
Signature · 1 line
2.11.0
#6 lore raw

PATCH 3/5 orange-pi-zero: bump kernel version

In reply to Sergey Matyukevich

Bump kernel and kernel headers to 4.13.

---
 configs/orangepi_zero_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configs/orangepi_zero_defconfig +2 -2
index 03e1d9c34e..6eccfda96f 100644
@@ -3,14 +3,14 @@ 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_11=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"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/orangepi-zero/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/orangepi/orangepi-zero/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13"
 BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-orangepi-zero"
Signature · 1 line
2.11.0
#8 lore raw

PATCH 4/5 package/xr819-xradio: update to the latest version

In reply to Sergey Matyukevich

Bump kernel module git revision to make it work with Linux v4.13.

---
 package/xr819-xradio/xr819-xradio.hash | 2 +-
 package/xr819-xradio/xr819-xradio.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/xr819-xradio/xr819-xradio.hash +1 -1
index bdb0f96cd5..75e3c496bd 100644
@@ -1,2 +1,2 @@
 # Locally computed
-sha256 5e9f59942b3880768b4812ab6db395bd1fa6d423cae9c09504baa416f064a10d xr819-xradio-014dfdd203102c5fd2370a73ec4ae3e6dd4e9ded.tar.gz
+sha256 91095bd2d49d54c5e26919dc0c767be56eb0a2430c133d0bacdc814e97a5df4c xr819-xradio-c03a053a9e731d56c89c0c09627e886db2a0e04e.tar.gz
package/xr819-xradio/xr819-xradio.mk +1 -1
index dfe2ee6ed1..429c665dea 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-XR819_XRADIO_VERSION = 014dfdd203102c5fd2370a73ec4ae3e6dd4e9ded
+XR819_XRADIO_VERSION = c03a053a9e731d56c89c0c09627e886db2a0e04e
 XR819_XRADIO_SITE = $(call github,fifteenhex,xradio,$(XR819_XRADIO_VERSION))
 XR819_XRADIO_LICENSE = GPL-2.0
 XR819_XRADIO_LICENSE_FILES = LICENSE
Signature · 1 line
2.11.0
#9 lore raw

PATCH 4/5 package/xr819-xradio: update to the latest version

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Bump kernel module git revision to make it work with Linux v4.13.

This should have come before patch 3/5 to not break the build. Committed, thanks.

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

PATCH 5/5 DEVELOPERS: add myself to several packages

In reply to Sergey Matyukevich
---
 DEVELOPERS | 4 ++++
 1 file changed, 4 insertions(+)
DEVELOPERS +4 -0
index a2e0fa0107..cd9cfebabc 100644
@@ -1434,7 +1434,11 @@ N:	Sergey Matyukevich <[email protected]>
 F:	package/xr819-xradio/
 F:	package/xr819-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