Message ID | 20230711215502.3638293-1-giulio.benetti@benettiengineering.com |
---|---|
State | Accepted |
Headers | show |
Series | [v2] package/esp-hosted-ng: add package | expand |
On Tue, 11 Jul 2023 23:55:02 +0200 Giulio Benetti <giulio.benetti@benettiengineering.com> wrote: > 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 <jesse.taube@benettiengineering.com> > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> > --- > 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 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
Hi Thomas, > Il giorno 31 lug 2023, alle ore 23:26, Thomas Petazzoni <thomas.petazzoni@bootlin.com> ha scritto: > > On Tue, 11 Jul 2023 23:55:02 +0200 > Giulio Benetti <giulio.benetti@benettiengineering.com> wrote: > >> 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 <jesse.taube@benettiengineering.com> >> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> >> --- >> 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 > > 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. 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 > > Thanks! > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com
diff --git a/DEVELOPERS b/DEVELOPERS index bf5cad0b04..f281d72b69 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -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/ diff --git a/package/Config.in b/package/Config.in index 80c0840592..3ae62c7212 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" diff --git a/package/esp-hosted-ng/Config.in b/package/esp-hosted-ng/Config.in new file mode 100644 index 0000000000..60f153d4dc --- /dev/null +++ b/package/esp-hosted-ng/Config.in @@ -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 diff --git a/package/esp-hosted-ng/esp-hosted-ng.hash b/package/esp-hosted-ng/esp-hosted-ng.hash new file mode 100644 index 0000000000..7412cb849e --- /dev/null +++ b/package/esp-hosted-ng/esp-hosted-ng.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 3310845b2324bda5774b91bcdd3f47621126f4a0011a0f61e31b0ad4a44db2f5 esp-hosted-ng-11e90f185a5a9922343e73e44032816a0e3ddedb.tar.gz +sha256 ed57d96d27be775b22f9571d3724ef84e0d0b8f24b805ec7f87a32189de19a9c LICENSE diff --git a/package/esp-hosted-ng/esp-hosted-ng.mk b/package/esp-hosted-ng/esp-hosted-ng.mk new file mode 100644 index 0000000000..7040693e8c --- /dev/null +++ b/package/esp-hosted-ng/esp-hosted-ng.mk @@ -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))
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 <jesse.taube@benettiengineering.com> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> --- 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