summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2008-08-26 07:24:08 +0000
committerWolfram Sang <w.sang@pengutronix.de>2008-08-26 07:24:08 +0000
commitbf52ae6c46f62408bc7dc72129b95791844816c7 (patch)
tree838fd021204a663cd4cc9a44bef7729caf0fdf59 /rules
parent4044f1bb80cc4de5eb90bae2dcdd6eefba487f8b (diff)
downloadptxdist-bf52ae6c46f62408bc7dc72129b95791844816c7.tar.gz
ptxdist-bf52ae6c46f62408bc7dc72129b95791844816c7.tar.xz
* make udev work again
we still need to decide if we want to reenable having rules in projectroot git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@8781 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules')
-rw-r--r--rules/udev.in177
-rw-r--r--rules/udev.make142
2 files changed, 90 insertions, 229 deletions
diff --git a/rules/udev.in b/rules/udev.in
index d893dc1f4..9baf5f169 100644
--- a/rules/udev.in
+++ b/rules/udev.in
@@ -81,7 +81,7 @@ menu "extras "
bool
prompt "firmware"
help
- FIXME
+ This is a small helper script to load some kind of firmware on demand
config UDEV_EXTRA_FLOPPY
bool
@@ -115,9 +115,11 @@ menu "extras "
config UDEV_EXTRA_USB_ID
bool
- prompt "usb"
+ prompt "usb_id"
help
- FIXME
+ This is a helper to generate unique information about some kind of
+ USB device. This is required to ensure the same hotplugged device to
+ appear always at the same device node (via link)
config UDEV_EXTRA_VOLUME_ID
bool
@@ -129,20 +131,6 @@ endmenu
menu "install options "
- config UDEV_INSTALL_UDEVD
- bool
- prompt "install udevd"
- help
- udevd listens to kernel uevents and passes the incoming events to udev.
- It ensures the right event order and takes care, that events for child
- devices are delayed until the parent has finished the device handling.
-
- config UDEV_INSTALL_UDEVADM
- bool
- prompt "install udevadm"
- help
- FIXME
-
config UDEV_INSTALL_TEST_UDEV
bool
prompt "install test-udev"
@@ -164,7 +152,6 @@ menu "install options "
config UDEV_INSTALL_ETC_INITD_UDEV_DEFAULT
bool
prompt "Use generic"
- select UDEV_INSTALL_UDEVD
help
Installs a generic /etc/init.d/udev startup script.
See <ptxdist-install>/generic/etc/init.d/udev
@@ -188,122 +175,46 @@ menu "install options "
be something like "S00_udev". An empty string means that no link
is created.
-endmenu
+ config ROOTFS_ETC_UDEV_CONF
+ 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 file projectroot/etc/udev/udev.conf in your
+ local project.
+ Note: If you locate the *.rules path to another
+ location than /etc/udev/rules.d, you must install any
+ udev rules by your own.
+
+ endchoice
+
+ config ROOTFS_UDEV_DEFAULT_RULES
+ bool
+ prompt "Install default udev rules"
+ help
+ This will install the generic udev rules files from the udev package
+ under /lib/udev/rules.d/
-#config UDEV_START
-# bool "udevstart"
-# help
-# Populates initial device directory. udevstart scans the kernel exported
-# device information available in sysfs for devices which require a device
-# node to operate and creates the node using the specified udev rules.
-# udevstart is used to create the initial device directory after system
-# bootup.
-#
-#config UDEV_TEST
-# bool "udevtest"
-# help
-# udevtest simulates a udev run for the given device and prints out the
-# name of the node udev would have created, or the name of the network
-# interface, that would have been renamend.
-#
-#config UDEV_TRIGGER
-# bool "udevtrigger"
-# default y
-# help
-# Trigger kernel device uevents to replay missing events at system
-# coldplug. Its part of the udev mechanism to startup
-#
-#config UDEV_SETTLE
-# bool "udevsettle"
-# default y
-# help
-# Waits watching the udev event queue and exits if all current events
-# are handled. Its part of the udev mechanism to startup
-#
-#config UDEV_CONTROL
-# bool "udevcontrol"
-# help
-# Lets you control the currently running udev system
-#
-#config UDEV_MONITOR
-# bool "udevmonitor"
-# help
-# udevmonitor listens to the kernel uevents and events send out by a
-# udev rule and prints the devpath of the event to the console. It can
-# be used analyze to the event timing by comparing the timestamps of
-# the kernel uevent with the udev event.
-#
-#config UDEV_FW_HELPER
-# bool "firmware helper"
-# help
-# This is a small helper script to load some kind of firmware on demand
-#
-#config UDEV_USB_ID
-# bool "USB device id generator"
-# help
-# This is a helper to generate unique information about some kind of
-# USB device. This is required to ensure the same hotplugged device to
-# appear always at the same device node (via link)
-#
-#menu "runtime options "
-#
-#config ROOTFS_ETC_UDEV_CONF
-# 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 file projectroot/etc/udev/udev.conf in your
-# local project.
-# Note: If you locate the *.rules path to another
-# location than /etc/udev/rules.d, you must install any
-# udev rules by your own.
-#
-# endchoice
-#
-#config ROOTFS_ETC_UDEV_DEFAULT_RULES
-# bool
-# prompt "Install default udev rules"
-# help
-# This will install the generic udev rules file under
-# /etc/udev/rules.d/udev.rules. Currently this file
-# is very basic.
-#
-#config ROOTFS_ETC_UDEV_USER_RULES
-# bool
-# prompt "Install user defined rules"
-# help
-# This will install all user defined udev *.rules files from the active
-# project. PTXdist expects the files in projectroot/etc/udev/rules.d
-# and will install them into /etc/udev/rules.d on the target.
-# Note: PTXdist only comes with very basic generic udev rules. All devices
-# are owned by root only. If you need special permission control you must
-# add some udev rules to create device nodes with correct permissions.
-# There are some rule files in the udev packet. Refer
-# "build-target/udev-???/etc/udev/rules.d" to check if they meet your
-# requirements.
-# Pay attention: Do not use the same filenames for your self defined
-# rules if you also selected the default rules! The default rule file
-# will win this race!
-#
+ endmenu
endif
diff --git a/rules/udev.make b/rules/udev.make
index 16a9ca5b9..bb01d2cd8 100644
--- a/rules/udev.make
+++ b/rules/udev.make
@@ -164,34 +164,24 @@ $(STATEDIR)/udev.targetinstall:
# binaries
#
-ifdef PTXCONF_UDEV_INSTALL_UDEVD
@$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevd, \
/sbin/udevd)
-endif
-ifdef PTXCONF_UDEV_INSTALL_UDEVADM
@$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevadm, \
/sbin/udevadm)
-endif
ifdef PTXCONF_UDEV_INSTALL_TEST_UDEV
@$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/test-udev, \
/sbin/test-udev)
endif
#
- # on-board configuration: this part is mandatory and was made
- # by the upstream maintainers in a way that it can be exchanged
- # by distro packets without interfering with local changes
+ # default rules
#
+ifdef PTXCONF_ROOTFS_UDEV_DEFAULT_RULES
cd $(UDEV_DIR)/rules/rules.d; \
for file in *; do \
$(call install_copy, udev, 0, 0, 0644, $(UDEV_DIR)/rules/rules.d/$$file, /lib/udev/rules.d/$$file, n); \
done
-
-ifdef PTXCONF_UDEV_EXTRA_SCSI_ID
- @$(call install_copy, udev, 0, 0, 0644, \
- $(UDEV_DIR)/extras/scsi_id/scsi_id.config, \
- /etc/scsi_id.config, n)
endif
#
@@ -218,91 +208,51 @@ endif
endif
-##
-## 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, 0644, \
-# $(PTXDIST_TOPDIR)/generic/etc/udev/udev.conf, \
-# /etc/udev/udev.conf, n)
-# @$(call install_copy, udev, 0, 0, 0644, \
-# $(PTXDIST_TOPDIR)/generic/etc/udev/permissions.rules, \
-# /etc/udev/permissions.rules, n)
-#endif
-#ifdef PTXCONF_ROOTFS_ETC_UDEV_CONF_USER
-## user defined
-# @$(call install_copy, udev, 0, 0, 0644, \
-# $(PTXDIST_WORKSPACE)/projectroot/etc/udev/udev.conf, \
-# /etc/udev/udev.conf, n)
-# @$(call install_copy, udev, 0, 0, 0644, \
-# $(PTXDIST_WORKSPACE)/projectroot/etc/udev/permissions.rules, \
-# /etc/udev/permissions.rules, n)
-#endif
-#endif
-##
-## install all user defined rule files
-##
-#ifdef PTXCONF_ROOTFS_ETC_UDEV_USER_RULES
-## create the rules directory as currently stated in the generic config
-## FIXME: if the user defines a different directory in his own udev.conf
-## this will fail!
-##
-# @$(call install_copy, udev, 0, 0, 0755, \
-# /etc/udev/rules.d)
-## copy *all* *.rules files into targets rule directory
-##
-# @cd $(PTXDIST_WORKSPACE)/projectroot/etc/udev/rules.d; \
-# for i in *.rules; do \
-# $(call install_copy, udev, 0, 0, 0644, $$i, \
-# /etc/udev/rules.d/$$i,n); \
-# done;
-#endif
-#ifdef PTXCONF_ROOTFS_ETC_UDEV_DEFAULT_RULES
-# @$(call install_copy, udev, 0, 0, 0644, \
-# $(PTXDIST_TOPDIR)/generic/etc/udev/rules.d/udev.rules, \
-# /etc/udev/rules.d/udev.rules, n)
-#endif
-#ifdef PTXCONF_UDEV_INFO
-# @$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevinfo, \
-# /sbin/udevinfo)
-#endif
-#ifdef PTXCONF_UDEV_START
-# @$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevstart, \
-# /sbin/udevstart)
-#endif
-#ifdef PTXCONF_UDEV_TEST
-# @$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevtest, \
-# /sbin/udevtest)
-#endif
-#ifdef PTXCONF_UDEV_TRIGGER
-# @$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevtrigger, \
-# /sbin/udevtrigger)
-#endif
-#ifdef PTXCONF_UDEV_SETTLE
-# @$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevsettle, \
-# /sbin/udevsettle)
-#endif
-#ifdef PTXCONF_UDEV_CONTROL
-# @$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevcontrol, \
-# /sbin/udevcontrol)
-#endif
-#ifdef PTXCONF_UDEV_MONITOR
-# @$(call install_copy, udev, 0, 0, 0755, $(UDEV_DIR)/udevmonitor, \
-# /sbin/udevmonitor)
-#endif
-#ifdef PTXCONF_UDEV_USB_ID
-# @$(call install_copy, udev, 0, 0, 0755, \
-# $(UDEV_DIR)/extras/usb_id/usb_id, \
-# /sbin/usbid)
-#endif
-#ifdef PTXCONF_UDEV_FW_HELPER
-# @$(call install_copy, udev, 0, 0, 0755, \
-# $(UDEV_DIR)/extras/firmware/firmware.sh, \
-# /sbin/firmware.sh,n)
-#endif
#
+# 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, 0644, \
+ $(PTXDIST_TOPDIR)/generic/etc/udev/udev.conf, \
+ /etc/udev/udev.conf, n)
+ @$(call install_copy, udev, 0, 0, 0644, \
+ $(PTXDIST_TOPDIR)/generic/etc/udev/permissions.rules, \
+ /etc/udev/permissions.rules, n)
+endif
+ifdef PTXCONF_ROOTFS_ETC_UDEV_CONF_USER
+# user defined
+ @$(call install_copy, udev, 0, 0, 0644, \
+ $(PTXDIST_WORKSPACE)/projectroot/etc/udev/udev.conf, \
+ /etc/udev/udev.conf, n)
+ @$(call install_copy, udev, 0, 0, 0644, \
+ $(PTXDIST_WORKSPACE)/projectroot/etc/udev/permissions.rules, \
+ /etc/udev/permissions.rules, n)
+endif
+endif
+
+ #
+ # utilities from extra/
+ #
+
+ifdef PTXCONF_UDEV_EXTRA_USB_ID
+ @$(call install_copy, udev, 0, 0, 0755, \
+ $(UDEV_DIR)/extras/usb_id/usb_id, \
+ /lib/udev/usbid)
+endif
+ifdef PTXCONF_UDEV_EXTRA_FIRMWARE
+ @$(call install_copy, udev, 0, 0, 0755, \
+ $(UDEV_DIR)/extras/firmware/firmware.sh, \
+ /lib/udev/firmware.sh,n)
+endif
+
+ifdef PTXCONF_UDEV_EXTRA_SCSI_ID
+ @$(call install_copy, udev, 0, 0, 0644, \
+ $(UDEV_DIR)/extras/scsi_id/scsi_id.config, \
+ /etc/scsi_id.config, n)
+endif
+
@$(call install_finish, udev)
@$(call touch)