* [Buildroot] [PATCH v2 1/3] armbian-firmware: new package
2017-11-06 10:16 [Buildroot] [PATCH v2] orange-pi-zero: misc updates Sergey Matyukevich
@ 2017-11-06 10:16 ` Sergey Matyukevich
2017-11-07 9:04 ` Peter Korsgaard
2017-11-06 10:16 ` [Buildroot] [PATCH v2 2/3] orange-pi-zero: add xr819 firmware Sergey Matyukevich
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Sergey Matyukevich @ 2017-11-06 10:16 UTC (permalink / raw)
To: buildroot
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
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
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
diff --git a/DEVELOPERS b/DEVELOPERS
index c651bf26fa..d27d55f73d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1432,6 +1432,7 @@ F: package/mpir/
N: Sergey Matyukevich <geomatsi@gmail.com>
F: package/xr819-xradio/
+F: package/armbian-firmware/
N: Sergio Prado <sergio.prado@e-labworks.com>
F: package/libgdiplus/
diff --git a/package/Config.in b/package/Config.in
index fe5ccc434e..23526b4124 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/armbian-firmware/Config.in b/package/armbian-firmware/Config.in
new file mode 100644
index 0000000000..766c291697
--- /dev/null
+++ b/package/armbian-firmware/Config.in
@@ -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
diff --git a/package/armbian-firmware/armbian-firmware.hash b/package/armbian-firmware/armbian-firmware.hash
new file mode 100644
index 0000000000..0f3858dedf
--- /dev/null
+++ b/package/armbian-firmware/armbian-firmware.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 876958ce6ba8a4a01a424f2b4455208b7a989eaba96015649c774340553f0c35 armbian-firmware-455d6b6701178dafe7fd0168eb4a4ef78a8d24a3.tar.gz
diff --git a/package/armbian-firmware/armbian-firmware.mk b/package/armbian-firmware/armbian-firmware.mk
new file mode 100644
index 0000000000..b31f4a12c7
--- /dev/null
+++ b/package/armbian-firmware/armbian-firmware.mk
@@ -0,0 +1,53 @@
+################################################################################
+#
+# armbian-firmware
+#
+################################################################################
+
+ARMBIAN_FIRMWARE_VERSION = 455d6b6701178dafe7fd0168eb4a4ef78a8d24a3
+ARMBIAN_FIRMWARE_SITE = https://github.com/armbian/firmware
+ARMBIAN_FIRMWARE_SITE_METHOD = git
+
+# XR819 WiFi firmware
+ifeq ($(BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819),y)
+ARMBIAN_FIRMWARE_FILES += \
+ xr819/boot_xr819.bin \
+ xr819/fw_xr819.bin \
+ xr819/sdd_xr819.bin
+endif
+
+# AP6212 WiFi/BT combo firmware
+ifeq ($(BR2_PACKAGE_ARMBIAN_FIRMWARE_AP6212),y)
+ARMBIAN_FIRMWARE_DIRS += ap6212
+endif
+
+ifneq ($(ARMBIAN_FIRMWARE_FILES),)
+define ARMBIAN_FIRMWARE_INSTALL_FILES
+ cd $(@D) ; \
+ $(TAR) c $(sort $(ARMBIAN_FIRMWARE_FILES)) | \
+ $(TAR) x -C $(TARGET_DIR)/lib/firmware
+endef
+endif
+
+ifneq ($(ARMBIAN_FIRMWARE_DIRS),)
+# We need to rm-rf the destination directory to avoid copying
+# into it in itself, should we re-install the package.
+define ARMBIAN_FIRMWARE_INSTALL_DIRS
+ $(foreach d,$(ARMBIAN_FIRMWARE_DIRS), \
+ rm -rf $(TARGET_DIR)/lib/firmware/$(d); \
+ cp -a $(@D)/$(d) $(TARGET_DIR)/lib/firmware/$(d)$(sep))
+endef
+endif
+
+ifneq ($(ARMBIAN_FIRMWARE_FILES)$(ARMBIAN_FIRMWARE_DIRS),)
+ARMBIAN_FIRMWARE_LICENSE = PROPRIETARY
+ARMBIAN_FIRMWARE_REDISTRIBUTE = NO
+endif
+
+define ARMBIAN_FIRMWARE_INSTALL_TARGET_CMDS
+ mkdir -p $(TARGET_DIR)/lib/firmware
+ $(ARMBIAN_FIRMWARE_INSTALL_FILES)
+ $(ARMBIAN_FIRMWARE_INSTALL_DIRS)
+endef
+
+$(eval $(generic-package))
--
2.11.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2 1/3] armbian-firmware: new package
2017-11-06 10:16 ` [Buildroot] [PATCH v2 1/3] armbian-firmware: new package Sergey Matyukevich
@ 2017-11-07 9:04 ` Peter Korsgaard
0 siblings, 0 replies; 9+ messages in thread
From: Peter Korsgaard @ 2017-11-07 9:04 UTC (permalink / raw)
To: buildroot
>>>>> "Sergey" == Sergey Matyukevich <geomatsi@gmail.com> 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
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2 2/3] orange-pi-zero: add xr819 firmware
2017-11-06 10:16 [Buildroot] [PATCH v2] orange-pi-zero: misc updates Sergey Matyukevich
2017-11-06 10:16 ` [Buildroot] [PATCH v2 1/3] armbian-firmware: new package Sergey Matyukevich
@ 2017-11-06 10:16 ` Sergey Matyukevich
2017-11-07 9:04 ` Peter Korsgaard
2017-11-06 10:16 ` [Buildroot] [PATCH v2 3/3] DEVELOPERS: add myself to several packages Sergey Matyukevich
2017-11-06 10:33 ` [Buildroot] [PATCH v2] orange-pi-zero: misc updates Jagan Teki
3 siblings, 1 reply; 9+ messages in thread
From: Sergey Matyukevich @ 2017-11-06 10:16 UTC (permalink / raw)
To: buildroot
Make WiFi work out of the box on orange-pi-zero:
- add xr819 firmware to image
- add mdev for module autoloading
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
DEVELOPERS | 2 ++
configs/orangepi_zero_defconfig | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/DEVELOPERS b/DEVELOPERS
index d27d55f73d..45e228286a 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1433,6 +1433,8 @@ F: package/mpir/
N: Sergey Matyukevich <geomatsi@gmail.com>
F: package/xr819-xradio/
F: package/armbian-firmware/
+F: board/orangepi/orangepi-zero
+F: configs/orangepi_zero_defconfig
N: Sergio Prado <sergio.prado@e-labworks.com>
F: package/libgdiplus/
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
index bd3862cb14..142b648fa8 100644
--- a/configs/orangepi_zero_defconfig
+++ b/configs/orangepi_zero_defconfig
@@ -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
--
2.11.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2 3/3] DEVELOPERS: add myself to several packages
2017-11-06 10:16 [Buildroot] [PATCH v2] orange-pi-zero: misc updates Sergey Matyukevich
2017-11-06 10:16 ` [Buildroot] [PATCH v2 1/3] armbian-firmware: new package Sergey Matyukevich
2017-11-06 10:16 ` [Buildroot] [PATCH v2 2/3] orange-pi-zero: add xr819 firmware Sergey Matyukevich
@ 2017-11-06 10:16 ` Sergey Matyukevich
2017-11-07 9:04 ` Peter Korsgaard
2017-11-06 10:33 ` [Buildroot] [PATCH v2] orange-pi-zero: misc updates Jagan Teki
3 siblings, 1 reply; 9+ messages in thread
From: Sergey Matyukevich @ 2017-11-06 10:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
DEVELOPERS | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/DEVELOPERS b/DEVELOPERS
index 45e228286a..1ea1b469b8 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1434,7 +1434,11 @@ N: Sergey Matyukevich <geomatsi@gmail.com>
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 <sergio.prado@e-labworks.com>
F: package/libgdiplus/
--
2.11.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2] orange-pi-zero: misc updates
2017-11-06 10:16 [Buildroot] [PATCH v2] orange-pi-zero: misc updates Sergey Matyukevich
` (2 preceding siblings ...)
2017-11-06 10:16 ` [Buildroot] [PATCH v2 3/3] DEVELOPERS: add myself to several packages Sergey Matyukevich
@ 2017-11-06 10:33 ` Jagan Teki
2017-11-06 11:10 ` Sergey Matyukevich
3 siblings, 1 reply; 9+ messages in thread
From: Jagan Teki @ 2017-11-06 10:33 UTC (permalink / raw)
To: buildroot
On Mon, Nov 6, 2017 at 3:46 PM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> 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!
--
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2] orange-pi-zero: misc updates
2017-11-06 10:33 ` [Buildroot] [PATCH v2] orange-pi-zero: misc updates Jagan Teki
@ 2017-11-06 11:10 ` Sergey Matyukevich
0 siblings, 0 replies; 9+ messages in thread
From: Sergey Matyukevich @ 2017-11-06 11:10 UTC (permalink / raw)
To: buildroot
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread