All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/esp-hosted-ng: add package
@ 2023-07-11 21:55 Giulio Benetti
  2023-07-31 21:26 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Giulio Benetti @ 2023-07-11 21:55 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Jesse Taube, Thomas Petazzoni

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

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))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH v2] package/esp-hosted-ng: add package
  2023-07-11 21:55 [Buildroot] [PATCH v2] package/esp-hosted-ng: add package Giulio Benetti
@ 2023-07-31 21:26 ` Thomas Petazzoni via buildroot
  2023-07-31 21:44   ` Giulio Benetti
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-31 21:26 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Jesse Taube, buildroot

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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH v2] package/esp-hosted-ng: add package
  2023-07-31 21:26 ` Thomas Petazzoni via buildroot
@ 2023-07-31 21:44   ` Giulio Benetti
  0 siblings, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2023-07-31 21:44 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Jesse Taube, buildroot

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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-31 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 21:55 [Buildroot] [PATCH v2] package/esp-hosted-ng: add package Giulio Benetti
2023-07-31 21:26 ` Thomas Petazzoni via buildroot
2023-07-31 21:44   ` Giulio Benetti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.