Bläddra i källkod

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.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Peter Korsgaard 11 månader sedan
förälder
incheckning
46d9fdff48
2 ändrade filer med 15 tillägg och 2 borttagningar
  1. 7 1
      package/eudev/Config.in
  2. 8 1
      package/eudev/eudev.mk

+ 7 - 1
package/eudev/Config.in

@@ -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

+ 8 - 1
package/eudev/eudev.mk

@@ -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