summaryrefslogtreecommitdiffstats
path: root/rules/udev.in
blob: b0d2ae20f2fd9a0f23f30db7bfd25d2376d19eec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
menuconfig UDEV
	bool
	prompt "udev                "
	select ROOTFS_DEV
	help
	  udev provides a dynamic device directory containing only
	  the files for actually present devices. It creates or
	  removes device node files in the /dev directory, or it
	  renames network interfaces.

	  Usually udev runs as udevd(8) and receives uevents directly
	  from the kernel if a device is added or removed from the system.

	  If udev receives a device event, it matches its configured
	  rules against the available device attributes provided in
	  sysfs to identify the device. Rules that match, may provide
	  additional device information or specify a device node name
	  and multiple symlink names and instruct udev to run
	  additional programs as part of the device event handling.

	  Ensure: This udev implementation requires at least kernel
	  2.6.15 and must have sysfs, unix domain sockets and networking
	  enabled.

comment "build options  ---"
	depends on UDEV

config UDEV_ENABLE_SYSLOG
	bool "Enable syslog"
	depends on UDEV
	help
	  If enabled, udev is able to pass errors or debug information
	  to syslog. This is very useful to see what udev is doing or not doing.
	  Note: To use this feature the syslog daemon must start before udev

config UDEV_ENABLE_DEBUG
	bool "Enable debugging messages"
	depends on UDEV
	help
	  If enabled, very verbose debugging messages will be compiled
	  into the udev binaries. The actual level of debugging is specified
	  in the udev config file (refer entry "udev_log")

comment "install options  ---"
	depends on UDEV

config UDEV_TEST_UDEV
	bool "test-udev"
	depends on UDEV
	help
	  test-udev is for testing purposes only

config UDEV_UDEVD
	bool "udevd"
	depends on UDEV
	default y
	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_INFO
	bool "udevinfo"
	depends on UDEV
	help
	  udevinfo queries the udev database for device
	  information stored in the udev database. It
	  can also query the properties of a device from
	  its sysfs representation to help creating udev
	  rules that match this device.

config UDEV_START
	bool "udevstart"
	depends on UDEV
	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"
	depends on UDEV
	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"
	depends on UDEV
	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"
	depends on UDEV
	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"
	depends on UDEV
	help
	  Lets you control the currently running udev system

config UDEV_MONITOR
	bool "udevmonitor"
	depends on UDEV
	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"
	depends on UDEV
	help
	  This is a small helper script to load some kind of firmware on demand

config UDEV_USB_ID
	bool "USB device id generator"
	depends on UDEV
	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)

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 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
	depends on UDEV
	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
	depends on UDEV
	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!

config ROOTFS_ETC_INITD_UDEV
	depends on UDEV
	bool
	default y
	prompt "Install startup script      "
	help
	  The /etc/init.d/udev script lets you control the udevd daemon.

	choice
		prompt "Kind of startup script"
		default ROOTFS_ETC_INITD_UDEV_DEFAULT
		depends on ROOTFS_ETC_INITD_UDEV

		config ROOTFS_ETC_INITD_UDEV_DEFAULT
			bool
			prompt "Use generic"
		#
		# these commands are required by the generic start script
		#
			select UDEV_UDEVD
			select UDEV_TRIGGER
			select UDEV_SETTLE
			help
			  Installs a generic /etc/init.d/udev startup script.
			  See <ptxdist-install>/generic/etc/init.d/udev

		config ROOTFS_ETC_INITD_UDEV_USER
			bool
			prompt "User defined"
			help
			  This uses a user defined udev startup script. PTXdist
			  uses files projectroot/etc/init.d/udev in your local
			  project

	endchoice