chiark / gitweb /
fe56095686f7c1e906cdf7e9b81abd88be152bf5
[elogind.git] / README
1 udev - userspace device management
2
3 For more information see the files in the docs/ directory.
4
5 Important Note:
6   Integrating udev in the system is a whole lot of work, has complex dependencies
7   and differs a lot from distro to distro. All reasonable distros depend on udev
8   these days and the system will not work without it.
9
10   The upstream udev project does not support or recomend to replace a distro's udev
11   installation with the upstream version. The installation of a unmodified upstream
12   version may render your system unusable! There is no "default" setup or a set
13   of "default" rules provided by the upstream udev version.
14
15 Requirements:
16   - 2.6.x version of the Linux kernel. See the RELEASE-NOTES file in the
17     udev tree and the Documentation/Changes in the kernel source tree for
18     the actual dependency.
19
20   - The kernel must have sysfs and unix domain socket enabled.
21     (unix domain sockets (CONFIG_UNIX) as a loadable kernel module may work,
22      but it is completely silly, don't complain if anything goes wrong.)
23
24   - The proc filesystem must be mounted on /proc.
25
26   - The sysfs filesystem must be mounted at /sys. No other location
27     will be supported by udev.
28
29
30 Operation:
31   Udev creates and removes device nodes in /dev, based on events the kernel
32   sends out on device discovery or removal.
33
34   - Directly after mouting the real root filesystem, wherever that
35     happens, in initramfs or with a directly mounted root, /dev should get
36     a tmpfs filesystem mounted, which is populated from scratch by udev.
37     Created nodes or changed permissions don't survive a reboot.
38
39   - The content of /lib/udev/devices directory should be copied over to the
40     tmpfs mounted /dev, to provide the required nodes to initialize udev.
41
42   - The udevd daemon must be started to receive netlink events from the kernel
43     driver core.
44
45   - From kernel version 2.6.15 on, the hotplug helper /sbin/hotplug should
46     be disabled with an init script before the boot scripts are run and
47     kernel modules are loaded.
48
49   - All kernel events are matched against a set of specified rules in
50     /etc/udev/rules.d/ which make it possible to hook into the event
51     processing to load required kernel modules and setup devices. For all
52     devices the kernel requests a device node, udev will create one with
53     the default name or the one specified by a matching udev rules.
54
55
56 Compile Options:
57   prefix
58         Set this to the default root that you want to use. Only override
59         this if you really know what you are doing, even then, you probably
60         don't do the right thing.
61   DESTDIR
62         Prefix for install target, used for package building.
63   USE_LOG
64         If set to 'true', udev is able to pass errors or debug information
65         to syslog. This is very useful to see what udev is doing or not doing.
66         It is enabled by default, don't expect any useful answer, if you
67         need to hunt a bug, but you can't enable syslog.
68   DEBUG
69         If set to 'true', very verbose debugging messages will be compiled
70         into the udev binaries. The actual level of debugging is specified
71         in the udev config file.
72   STRIPCMD
73         If udev is compiled for packaging an empty string can be passed
74         to disable the stripping of the binaries.
75   USE_SELINUX
76         If set to 'true', udev will be built with SELinux support
77         enabled.  This is disabled by default.
78   USE_KLIBC
79         If set to 'true', udev is built and linked against klibc.
80         Default value is 'false'. KLCC specifies the klibc compiler
81         wrapper, usually located at /usr/bin/klcc.
82   EXTRAS
83         If set, will build the "extra" helper programs as specified
84         as listed (see below for an example).
85
86 If you want to build the udev helper programs:
87   make EXTRAS="extras/cdrom_id extras/scsi_id extras/volume_id"
88
89
90 Installation:
91   - The install target intalls the udev binaries in the default locations,
92     All at boot time reqired binaries will be installed in /sbin.
93
94   - The default location for scripts and binaries that are called from
95     rules is /lib/udev. Other packages who install udev rules, should use
96     that diretory too.
97
98   - It is recommended to use the /lib/udev/devices directory to place
99     device nodes and symlinks in, which are copied to /dev at every boot.
100     That way, nodes for broken subsystems or devices which can't be
101     detected automatically by the kernel, will always be available.
102
103   - Copies of the rules files for all major distros are in the etc/udev
104     directory (you may look there how others distros are doing it).
105
106   - The persistent disk links in /dev/disk are the de facto standard
107     on Linux and should be installed with every default udev installation.
108     The devfs naming scheme rules are not recommended and not supported.
109
110 Please direct any comment/question/concern to the linux-hotplug-devel mailing list at:
111   linux-hotplug-devel@lists.sourceforge.net
112