Skip to contentSkip to conversation

package/eudev: correct !static comment

PATCH In review Peter Korsgaard 2 participants 3 messages Aug 20, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/eudev: correct !static comment

eudev itself includes dlfcn.h, so even without kmod it cannot be built statically:

grep -rs dlfcn build/eudev-3.2.14/src
eudev-3.2.14/src/shared/util.c:#include <dlfcn.h>

---
 package/eudev/Config.in | 2 +-
 system/Config.in        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/eudev/Config.in +1 -1
index 6e7bbe4648..669a8a15ae 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_EUDEV
 	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_USE_MMU # uses fork()
 	depends on BR2_USE_WCHAR # needs C99 compiler
-	depends on !BR2_STATIC_LIBS # kmod
+	depends on !BR2_STATIC_LIBS # dlfcn.h
 	select BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_UDEV_GENTOO_SCRIPTS if BR2_INIT_OPENRC
 	select BR2_PACKAGE_UTIL_LINUX
system/Config.in +1 -1
index bc0c6eb6bc..244e4af531 100644
@@ -254,7 +254,7 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
 config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	bool "Dynamic using devtmpfs + eudev"
 	depends on BR2_USE_WCHAR # eudev
-	depends on !BR2_STATIC_LIBS
+	depends on !BR2_STATIC_LIBS # eudev
 	depends on BR2_USE_MMU # eudev
 	select BR2_PACKAGE_EUDEV
 
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/eudev: make kmod support optional

Eudev can be built without kmod support, E.G. for setups not using a modular kernel - So support that.

Make the option default y for backwards compatibility.

---
 package/eudev/Config.in | 8 +++++++-
 package/eudev/eudev.mk  | 9 ++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)
package/eudev/Config.in +7 -1
index 669a8a15ae..65cfc1d2de 100644
@@ -9,7 +9,6 @@ config BR2_PACKAGE_EUDEV
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBS
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
-	select BR2_PACKAGE_KMOD
 	help
 	  eudev is a fork of systemd-udev with the goal of obtaining
 	  better compatibility with existing software such as OpenRC and
@@ -23,6 +22,13 @@ if BR2_PACKAGE_EUDEV
 config BR2_PACKAGE_PROVIDES_UDEV
 	default "eudev"
 
+config BR2_PACKAGE_EUDEV_MODULE_LOADING
+	bool "enable kernel module loading"
+	default y
+	select BR2_PACKAGE_KMOD
+	help
+	  Enable kernel module loading support
+
 config BR2_PACKAGE_EUDEV_RULES_GEN
 	bool "enable rules generator"
 	help
package/eudev/eudev.mk +8 -1
index 33cc638291..8318bc1ed4 100644
@@ -19,13 +19,20 @@ EUDEV_CONF_OPTS = \
 	--enable-blkid
 
 # eudev requires only the util-linux libraries at build time
-EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux-libs kmod
+EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux-libs
 EUDEV_PROVIDES = udev
 
 ifeq ($(BR2_ROOTFS_MERGED_USR),)
 EUDEV_CONF_OPTS += --with-rootlibdir=/lib --enable-split-usr
 endif
 
+ifeq ($(BR2_PACKAGE_EUDEV_MODULE_LOADING),y)
+EUDEV_CONF_OPTS += --enable-kmod
+EUDEV_DEPENDENCIES += kmod
+else
+EUDEV_CONF_OPTS += --disable-kmod
+endif
+
 ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
 EUDEV_CONF_OPTS += --enable-rule-generator
 else
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Peter Korsgaard
Quoted 11 lines · On Tue, 20 Aug 2024 11:35:57 +0200 Peter Korsgaard <[email protected]> wrote:

eudev itself includes dlfcn.h, so even without kmod it cannot be built statically:

grep -rs dlfcn build/eudev-3.2.14/src
eudev-3.2.14/src/shared/util.c:#include <dlfcn.h>

---
 package/eudev/Config.in | 2 +-
 system/Config.in        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Both applied to next, 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