chiark / gitweb /
bring std(in|out|err) fd's in a sane state
[elogind.git] / README
1
2 udev - a userspace device manager
3
4 For more information on the design, and structure of this project, see the
5 files in the docs/ directory.
6
7 To use:
8
9 - You must be running a 2.6 version of the Linux kernel.
10
11 - Your 2.6 kernel must have had CONFIG_HOTPLUG enabled when it was built.
12
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
16
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.
20
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
26
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
30   the same device.
31
32 - Build the project:
33         make
34
35   Note:
36       There are a number of different flags that you can use when building
37       udev.  They are as follows:
38         prefix
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.
43         USE_KLIBC
44                 if set to 'true', udev is built and linked against the
45                 included version of klibc.  Default value is 'false'.
46         USE_LOG
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.)
52         USE_SELINUX
53                 if set to 'true', udev will be built with SELinux support
54                 enabled.  This is disabled by default.
55         DEBUG
56                 if set to 'true', debugging messages will be sent to the syslog
57                 as udev is run.  Default value is 'false'.
58         KERNEL_DIR
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.
63
64       So, if you want to build udev using klibc with debugging messages, you
65       would do:
66         make USE_KLIBC=true DEBUG=true
67
68       udev will follow the setting of the debug level in udev.conf. Adapt this
69       value to see the debug in syslog.
70
71 - Install the project:
72         make install
73
74   This will put the udev binaries in /sbin, create the and /etc/udev
75   directories, and place the udev configuration files in /etc/udev/.  You
76   will probably want to edit the *.rules files to create custom naming
77   rules.  More info on how the config files are set up are contained in
78   comments in the files, and is located in the documentation.
79
80 - Add and remove devices from the system and marvel as nodes are created
81   and removed in /dev based on the device types.
82
83 - If you later get sick of it, uninstall it:
84         make uninstall
85
86 If nothing seems to happen, make sure your build worked properly by
87 running the udev-test.pl script as root in the test/ subdirectory of the
88 udev source tree. Running udevstart should populate an empty /dev
89 directory. You may test, if a node is recreated after running udevstart.
90
91 Development and documentation help is very much appreciated, see the TODO
92 file for a list of things left to be done.
93
94 Any comment/questions/concerns please let me and the other udev developers
95 know by sending a message to the linux-hotplug-devel mailing list at:
96         linux-hotplug-devel@lists.sourceforge.net
97
98 greg k-h
99 greg@kroah.com
100