[PATCH 1/1] Kconfig: Add HAVE_LIBSYSTEMD

22 views
Skip to first unread message

James Hilliard

unread,
Jul 4, 2021, 8:26:55 PM7/4/21
to swup...@googlegroups.com, James Hilliard
Allow passing through the environment if libsystemd is available
for the build target.

Defaults to yes because we do not do any library checking for now.

Signed-off-by: James Hilliard <james.h...@gmail.com>
---
Kconfig | 8 ++++++++
Makefile.deps | 8 ++++++++
2 files changed, 16 insertions(+)

diff --git a/Kconfig b/Kconfig
index ece4537..7660602 100644
--- a/Kconfig
+++ b/Kconfig
@@ -77,6 +77,10 @@ config HAVE_LIBSSL
bool
option env="HAVE_LIBSSL"

+config HAVE_LIBSYSTEMD
+ bool
+ option env="HAVE_LIBSYSTEMD"
+
config HAVE_LIBCRYPTO
bool
option env="HAVE_LIBCRYPTO"
@@ -120,11 +124,15 @@ config CURL_SSL
config SYSTEMD
bool "enable systemd support"
depends on HAVE_LINUX
+ depends on HAVE_LIBSYSTEMD
default n
help
Enable support for systemd's start-up completion
notification and socket-based activation features.

+comment "systemd support needs libsystemd"
+ depends on !HAVE_LIBSYSTEMD && HAVE_LINUX
+
config DEFAULT_CONFIG_FILE
string "File with default settings"
default "/etc/swupdate.cfg"
diff --git a/Makefile.deps b/Makefile.deps
index 13ff29d..0f38ae0 100644
--- a/Makefile.deps
+++ b/Makefile.deps
@@ -66,6 +66,14 @@ ifeq ($(HAVE_LIBSSL),)
export HAVE_LIBSSL = y
endif

+ifeq ($(HAVE_LIBSYSTEMD),)
+ifeq ($(HAVE_LINUX),y)
+export HAVE_LIBSYSTEMD = y
+else
+export HAVE_LIBSYSTEMD = n
+endif
+endif
+
ifeq ($(HAVE_LIBCRYPTO),)
export HAVE_LIBCRYPTO = y
endif
--
2.32.0

Stefano Babic

unread,
Jul 5, 2021, 3:24:31 AM7/5/21
to James Hilliard, swup...@googlegroups.com
Hi James,
Why do we need the else branch here as we do not need for all other
HAVE_ configs ? Can we drop the "else" at all ?

Best regards,
Stefano Babic


> +
> ifeq ($(HAVE_LIBCRYPTO),)
> export HAVE_LIBCRYPTO = y
> endif
>


--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

James Hilliard

unread,
Jul 5, 2021, 3:29:10 AM7/5/21
to Stefano Babic, swupdate
I assumed this is needed to ensure it's actually disabled properly on non-linux
systems, however I just copied this from the libmtd version here:
https://github.com/sbabic/swupdate/blob/2021.04/Makefile.deps#L33-L39

Stefano Babic

unread,
Jul 5, 2021, 3:37:15 AM7/5/21
to James Hilliard, Stefano Babic, swupdate
Using HAVE_LINUX is correct.

> however I just copied this from the libmtd version here:
> https://github.com/sbabic/swupdate/blob/2021.04/Makefile.deps#L33-L39

I have found myself this, too, and I am wondering. IMHO it is not
necessary and it can be drop as well.

James Hilliard

unread,
Jul 5, 2021, 3:41:29 AM7/5/21
to Stefano Babic, swupdate
Best to just do that as a followup for both?

Stefano Babic

unread,
Jul 5, 2021, 6:29:04 AM7/5/21
to James Hilliard, Stefano Babic, swupdate
Yes, this can be a followup, no problem.

Best regards,
Stefano
Reply all
Reply to author
Forward
0 new messages