summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules/udev.in30
-rw-r--r--rules/udev.make15
2 files changed, 44 insertions, 1 deletions
diff --git a/rules/udev.in b/rules/udev.in
index 6fdece1ae..1fa327e25 100644
--- a/rules/udev.in
+++ b/rules/udev.in
@@ -73,6 +73,36 @@ config UDEV_FW_HELPER
comment "runtime options ---"
depends on UDEV
+config ROOTFS_ETC_UDEV_CONF
+ depends on UDEV
+ bool
+ default y
+ prompt "Install udev.conf"
+ help
+ Installs /etc/udev/udev.conf from a selectable source
+
+ choice
+ prompt "Kind of udev.conf"
+ default ROOTFS_ETC_UDEV_CONF_DEFAULT
+ depends on ROOTFS_ETC_UDEV_CONF
+
+ config ROOTFS_ETC_UDEV_CONF_DEFAULT
+ bool
+ prompt "Use generic"
+ help
+ Installs a generic /etc/udev/udev.conf file.
+ See <ptxdist-install>/generic/etc/udev/udev.conf
+
+ config ROOTFS_ETC_UDEV_CONF_USER
+ bool
+ prompt "User defined"
+ help
+ This uses a user defined udev.conf file. PTXdist
+ uses files projectroot/etc/udev/udev.conf in your
+ local project
+
+ endchoice
+
config ROOTFS_ETC_INITD_UDEV
depends on UDEV
bool
diff --git a/rules/udev.make b/rules/udev.make
index 76097c2ab..f4a1fe1b3 100644
--- a/rules/udev.make
+++ b/rules/udev.make
@@ -110,10 +110,23 @@ $(STATEDIR)/udev.targetinstall: $(udev_targetinstall_deps_default)
@$(call install_fixup, udev,DEPENDS,)
@$(call install_fixup, udev,DESCRIPTION,missing)
+#
+# Install a configuration on demand only
+#
+ifdef PTXCONF_ROOTFS_ETC_UDEV_CONF
+ifdef PTXCONF_ROOTFS_ETC_UDEV_CONF_DEFAULT
+# use generic
@$(call install_copy, udev, 0, 0, 0755, \
$(PTXDIST_TOPDIR)/generic/etc/udev/udev.conf, \
/etc/udev/udev.conf, n)
-
+endif
+ifdef PTXCONF_ROOTFS_ETC_UDEV_CONF_USER
+# user defined
+ @$(call install_copy, udev, 0, 0, 0755, \
+ $(PTXDIST_WORKSPACE)/projectroot/etc/udev/udev.conf, \
+ /etc/udev/udev.conf, n)
+endif
+endif
#
# Install the startup script on request only
#