package/esp-hosted-ng: add package
PATCH v2 1/1 package/esp-hosted-ng: add package
This patch adds esp-hosted-ng package that allows to build Linux Kernel Driver for Espressif Esp32-* SoCs, that once programmed with the corresponding firmware behave like a normal Wi-Fi module. Both SDIO and SPI busses are supported and selectable.
---V1->V2:
* bump to version 2023-07-11 to support latest Linux versions and ESP32-C6
--- DEVELOPERS | 1 + package/Config.in | 1 + package/esp-hosted-ng/Config.in | 29 ++++++++++++++++++++++++ package/esp-hosted-ng/esp-hosted-ng.hash | 3 +++ package/esp-hosted-ng/esp-hosted-ng.mk | 29 ++++++++++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 package/esp-hosted-ng/Config.in create mode 100644 package/esp-hosted-ng/esp-hosted-ng.hash create mode 100644 package/esp-hosted-ng/esp-hosted-ng.mk
DEVELOPERS +1 -0
@@ -1169,6 +1169,7 @@ F: package/at/ F: package/binutils/ F: package/cryptsetup/ F: package/erlang-jiffy/ +F: package/esp-hosted-ng/ F: package/gcc/ F: package/harfbuzz/ F: package/libfuse3/
package/Config.in +1 -0
@@ -495,6 +495,7 @@ endmenu source "package/edid-decode/Config.in" source "package/edk2-non-osi/Config.in" source "package/edk2-platforms/Config.in" + source "package/esp-hosted-ng/Config.in" source "package/eudev/Config.in" source "package/ev3dev-linux-drivers/Config.in" source "package/evemu/Config.in"
package/esp-hosted-ng/Config.in new file +29 -0
@@ -0,0 +1,29 @@ +comment "esp-hosted needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_ESP_HOSTED_NG + bool "esp-hosted-ng" + depends on BR2_LINUX_KERNEL + help + This package builds and installs the Linux kernel driver for + the Esp32-* Linux Wi-Fi driver. It supports both SDIO and SPI + busses that is selectable. It is compatible with recent Linux + kernels (>= 5.4). + +if BR2_PACKAGE_ESP_HOSTED_NG + +choice + prompt "esp-hosted-ng bus" + default BR2_PACKAGE_ESP_HOSTED_NG_SDIO + help + Select which bus type esp is attached to + +config BR2_PACKAGE_ESP_HOSTED_NG_SDIO + bool "SDIO" + +config BR2_PACKAGE_ESP_HOSTED_NG_SPI + bool "SPI" + +endchoice + +endif
package/esp-hosted-ng/esp-hosted-ng.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 3310845b2324bda5774b91bcdd3f47621126f4a0011a0f61e31b0ad4a44db2f5 esp-hosted-ng-11e90f185a5a9922343e73e44032816a0e3ddedb.tar.gz +sha256 ed57d96d27be775b22f9571d3724ef84e0d0b8f24b805ec7f87a32189de19a9c LICENSE
package/esp-hosted-ng/esp-hosted-ng.mk new file +29 -0
@@ -0,0 +1,29 @@ +################################################################################ +# +# esp-hosted-ng +# +################################################################################ + +ESP_HOSTED_NG_VERSION = 11e90f185a5a9922343e73e44032816a0e3ddedb +ESP_HOSTED_NG_SITE = $(call github,espressif,esp-hosted,$(ESP_HOSTED_NG_VERSION)) +ESP_HOSTED_NG_DEPENDENCIES = linux +ESP_HOSTED_NG_LICENSE = GPL-2.0 +ESP_HOSTED_NG_LICENSE_FILE = LICENSE +ESP_HOSTED_NG_MODULE_SUBDIRS = esp_hosted_ng/host + +define ESP_HOSTED_NG_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_NET) + $(call KCONFIG_ENABLE_OPT,CONFIG_WIRELESS) + $(call KCONFIG_ENABLE_OPT,CONFIG_CFG80211) + $(call KCONFIG_ENABLE_OPT,CONFIG_MAC80211) + $(call KCONFIG_ENABLE_OPT,CONFIG_BT) +endef + +ifeq ($(BR2_PACKAGE_ESP_HOSTED_NG_SPI),y) +ESP_HOSTED_NG_MODULE_MAKE_OPTS = target=spi +else +ESP_HOSTED_NG_MODULE_MAKE_OPTS = target=sdio +endif + +$(eval $(kernel-module)) +$(eval $(generic-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 10 lines · On Tue, 11 Jul 2023 23:55:02 +0200 Giulio Benetti…
This patch adds esp-hosted-ng package that allows to build Linux Kernel Driver for Espressif Esp32-* SoCs, that once programmed with the corresponding firmware behave like a normal Wi-Fi module. Both SDIO and SPI busses are supported and selectable.
Cc Jesse Taube <[email protected]>Signed-off-by Giulio Benetti <[email protected]>---
V1->V2:
* bump to version 2023-07-11 to support latest Linux versions and ESP32-C6
Quoted 10 lines
--- DEVELOPERS | 1 + package/Config.in | 1 + package/esp-hosted-ng/Config.in | 29 ++++++++++++++++++++++++ package/esp-hosted-ng/esp-hosted-ng.hash | 3 +++ package/esp-hosted-ng/esp-hosted-ng.mk | 29 ++++++++++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 package/esp-hosted-ng/Config.in create mode 100644 package/esp-hosted-ng/esp-hosted-ng.hash create mode 100644 package/esp-hosted-ng/esp-hosted-ng.mk
I don't understand why it was named esp-hosted-ng, the upstream Github repo is just esp-hosted. Yes, recent versions are "ng", but we normally don't name our packages according to the versions, except in some very specific cases (libgtk3, qt5, qt6, etc.). So I renamed everything to esp-hosted (hoping I didn't mess up anything in the process) and applied. It built fine against a vexpress_defconfig ARM32 Linux 6.1 kernel.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
Quoted 26 lines
Il giorno 31 lug 2023, alle ore 23:26, Thomas Petazzoni <[email protected]> ha scritto:
On Tue, 11 Jul 2023 23:55:02 +0200
Quoted 17 lines · Giulio Benetti
This patch adds esp-hosted-ng package that allows to build Linux Kernel Driver for Espressif Esp32-* SoCs, that once programmed with the corresponding firmware behave like a normal Wi-Fi module. Both SDIO and SPI busses are supported and selectable.
Cc Jesse Taube <[email protected]>Signed-off-by Giulio Benetti <[email protected]>---
V1->V2:
* bump to version 2023-07-11 to support latest Linux versions and ESP32-C6
---DEVELOPERS | 1 + package/Config.in | 1 + package/esp-hosted-ng/Config.in | 29 ++++++++++++++++++++++++ package/esp-hosted-ng/esp-hosted-ng.hash | 3 +++ package/esp-hosted-ng/esp-hosted-ng.mk | 29 ++++++++++++++++++++++++ 5 files changed, 63 insertions(+)Quoted 3 lines
create mode 100644 package/esp-hosted-ng/Config.in create mode 100644 package/esp-hosted-ng/esp-hosted-ng.hash create mode 100644
package/esp-hosted-ng/esp-hosted-ng.mk
Quoted 7 lines
I don't understand why it was named esp-hosted-ng, the upstream Github repo is just esp-hosted. Yes, recent versions are "ng", but we normally don't name our packages according to the versions, except in some very specific cases (libgtk3, qt5, qt6, etc.). So I renamed everything to esp-hosted (hoping I didn't mess up anything in the process) and applied. It built fine against a
vexpress_defconfigARM32 Linux 6.1 kernel.
The reason is that they keep two completely different firmware and Linux drivers depending on the sdio implementation and some months ago they kept NG(802.11 direct IF) and FG(802.3+protobuf apis to setup 802.11 stuff) as branches, but yes they changed it. Anyway possibly one could use(even if it makes few sense) the FG. But then we only need to download exactly esp-hosted and that’s it.
I think I’ve been biased from the past git handling with 2 branches. In case someone is interested we can add 2 Config.in choices between FG and NG. Very unlikely but… who knows.
FG is more MCU oriented(even if it supports Linux as 802.3+protobuf) while NG is very more Linux oriented since it has 802.11 IF.
Thank you for taking care of this patch.
There should be a new release in some time to add other SoCs to NG so I will bump it and I’m designing a Linux embedded board with an ESP32 on it for this use.
Best regards
Giulio
Quoted 8 lines
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot