2 udev - a userspace device manager
4 For more information on the design, and structure of this project, see the
5 files in the docs/ directory.
9 - You must be running a 2.6 version of the Linux kernel.
11 - Your 2.6 kernel must have had CONFIG_HOTPLUG enabled when it was built.
13 - Make sure sysfs is mounted at /sys. No other location is supported.
14 You can mount it by running:
15 mount -t sysfs none /sys
17 - Make sure you integrate udev with your hotplug setup. There is a copy of
18 the rules files for all major distros in the etc/udev folder. You may look
19 there how others are doing it.
21 - Make sure you integrate with the kernel hotplug events. Later versions of
22 udev are able to listen directly to a netlink socket, older versions used
23 udevsend to feed the udev daemon with the kernel event. The most basic
24 setup to run udev is to let the kernel for the udev binary directly:
25 echo "/sbin/udev" > /proc/sys/kernel/hotplug
27 While this may work in some setups, it is not recommended to do. A recent
28 kernel and udev version is able to operate with the event serializing daemon
29 udevd, that makes sure, that no "remove" event will beat a "add" event for
36 There are a number of different flags that you can use when building
37 udev. They are as follows:
39 set this to the default root that you want udev to be
40 installed into. This works just like the 'configure --prefix'
41 script does. Default value is ''. Only override this if you
42 really know what you are doing.
44 if set to 'true', udev is built and linked against the
45 included version of klibc. Default value is 'false'.
47 if set to 'true', udev will emit messages to the syslog when
48 it creates or removes device nodes. This is helpful to see
49 what udev is doing. This is enabled by default. Note, if you
50 are building udev against klibc it is recommended that you
51 disable this option (due to klibc's syslog implementation.)
53 if set to 'true', udev will be built with SELinux support
54 enabled. This is disabled by default.
56 if set to 'true', debugging messages will be sent to the syslog
57 as udev is run. Default value is 'false'.
59 If this is not set it will default to /lib/modules/`uname -r`/build
60 This is used if USE_KLIBC=true to find the kernel include
61 directory that klibc needs to build against. This must be set
62 if you are not building udev while running a 2.6 kernel.
64 if set, will build the "extra" helper programs as specified
65 as listed (see below for an example.)
67 So, if you want to build udev using klibc with debugging messages, you
69 make USE_KLIBC=true DEBUG=true
71 If you want to build the udev helper program cdrom_id and scsi_id you
73 make EXTRAS="extras/cdrom_id extras/scsi_id"
75 udev will follow the setting of the debug level in udev.conf. Adapt this
76 value to see the debug in syslog.
78 - Install the project:
81 This will put the udev binaries in /sbin, create the and /etc/udev
82 directories, and place the udev configuration files in /etc/udev/. You
83 will probably want to edit the *.rules files to create custom naming
84 rules. More info on how the config files are set up are contained in
85 comments in the files, and is located in the documentation.
87 - Add and remove devices from the system and marvel as nodes are created
88 and removed in /dev based on the device types.
90 - If you later get sick of it, uninstall it:
93 If nothing seems to happen, make sure your build worked properly by
94 running the udev-test.pl script as root in the test/ subdirectory of the
95 udev source tree. Running udevstart should populate an empty /dev
96 directory. You may test, if a node is recreated after running udevstart.
98 Development and documentation help is very much appreciated, see the TODO
99 file for a list of things left to be done.
101 Any comment/questions/concerns please let me and the other udev developers
102 know by sending a message to the linux-hotplug-devel mailing list at:
103 linux-hotplug-devel@lists.sourceforge.net