diff mbox series

Kconfig: Fix warning for MONGOOSE choice symbol selection

Message ID 20250114101401.75974-1-michael.adler@siemens.com
State Accepted
Headers show
Series Kconfig: Fix warning for MONGOOSE choice symbol selection | expand

Commit Message

Michael Adler Jan. 14, 2025, 10:14 a.m. UTC
The choice symbol MONGOOSE (defined at mongoose/Kconfig:18) is selected
by the following symbols, but select/imply has no effect on choice
symbols:

- WEBSERVER (defined at mongoose/Kconfig:5)

Signed-off-by: Michael Adler <michael.adler@siemens.com>
Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 mongoose/Kconfig | 1 -
 1 file changed, 1 deletion(-)

Comments

Stefano Babic Jan. 14, 2025, 3:11 p.m. UTC | #1
Hi Michael,

On 1/14/25 11:14, 'Michael Adler' via swupdate wrote:
> The choice symbol MONGOOSE (defined at mongoose/Kconfig:18) is selected
> by the following symbols, but select/imply has no effect on choice
> symbols:
>
> - WEBSERVER (defined at mongoose/Kconfig:5)
>

Right, however this is a preparation in case a second implementation of
the Webserver will be introduced. Mongoose was added to SWUpdate from
the early beginning, but it has also a custom creation by generating a
single C file. If this has a very low footprint, it requires efforts by
updating to a newer Mongoose's version.

https://github.com/sbabic/swupdate/blob/master/doc/source/improvement_proposals.rst#internal-webserver

I have added as TODO a second Webserver implementation. I haven't see
any interest so far, and the Webserver must alllow zero-streaming of a
SWU, what is not guaranteed by most implementation because they are
thought for server. Civetweb could be an alternative (it was originally
a fork from Mongoose).

So we can remove the symbol today and let add again later if a new
implementation will be integrated. But I would like to listen to some
other opinions - if nobody raises a hand, I will merge this patch.

Best regards,
Stefano

> Signed-off-by: Michael Adler <michael.adler@siemens.com>
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>   mongoose/Kconfig | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/mongoose/Kconfig b/mongoose/Kconfig
> index 6408aacb..a1e1afe3 100644
> --- a/mongoose/Kconfig
> +++ b/mongoose/Kconfig
> @@ -4,7 +4,6 @@
>
>   menuconfig WEBSERVER
>   	bool "Web Server"
> -	select MONGOOSE
>   	help
>   	  Enable update from remote using a web server on the target.
>
Michael Adler Jan. 14, 2025, 4:11 p.m. UTC | #2
Hi Stefano,

> So we can remove the symbol today and let add again later if a new
> implementation will be integrated.

My point is a different one: the "select" statement is ignored by Kconfig
(semantically). If you have multiple web servers (e.g., MONGOOSE, FOO) and you
put "select FOO" instead, then MONGOOSE is still the web server selected by
Kconfig if you activate the WEBSERVER menu. I figured this out by
experimenting with Kconfig from the Zephyr project (a single Python file),
which produces a warning for our Kconfig file.

Off-topic: Ultimately, I think it would be beneficial to replace our (very) old and
modified Kconfig with the one from Zephyr. This would remove around 15-20k
lines of code from the SWUpdate project, at the expense of requiring Python as
a build-time dependency. I'm curious to hear if you would be open to such a
change.

Kind regards,
Michael
Stefano Babic March 9, 2025, 2:13 p.m. UTC | #3
On 1/14/25 17:11, 'Michael Adler' via swupdate wrote:
> Hi Stefano,
>
>> So we can remove the symbol today and let add again later if a new
>> implementation will be integrated.
>
> My point is a different one: the "select" statement is ignored by Kconfig
> (semantically). If you have multiple web servers (e.g., MONGOOSE, FOO) and you
> put "select FOO" instead, then MONGOOSE is still the web server selected by
> Kconfig if you activate the WEBSERVER menu. I figured this out by
> experimenting with Kconfig from the Zephyr project (a single Python file),
> which produces a warning for our Kconfig file.

I applied it.

>
> Off-topic: Ultimately, I think it would be beneficial to replace our (very) old and
> modified Kconfig with the one from Zephyr. This would remove around 15-20k
> lines of code from the SWUpdate project, at the expense of requiring Python as
> a build-time dependency. I'm curious to hear if you would be open to such a
> change.
>

As you see, it is WIP, Daniel did the work, but I get build errors whhen
I build out-of-tree, like OE is doing.

Stefano
diff mbox series

Patch

diff --git a/mongoose/Kconfig b/mongoose/Kconfig
index 6408aacb..a1e1afe3 100644
--- a/mongoose/Kconfig
+++ b/mongoose/Kconfig
@@ -4,7 +4,6 @@ 
 
 menuconfig WEBSERVER
 	bool "Web Server"
-	select MONGOOSE
 	help
 	  Enable update from remote using a web server on the target.