README revision 64be143742a487e826068e906d1bfb180acdb0ae
d657c51f14601d0235434ffb78cf6ac0f27cc83cLennart Poetteringudev - userspace device management
220a21d38f675eb835f5758e3d23e896573aa5eaLennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart PoetteringFor more information see the files in the docs/ directory.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart PoetteringImportant Note:
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering Integrating udev in the system has complex dependencies and differs from distro
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering to distro. All major distros depend on udev these days and the system may not
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering work without a properly installed version. The upstream udev project does not
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering recommend to replace a distro's udev installation with the upstream version.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart PoetteringRequirements:
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering - Version 2.6.20 of the Linux kernel for reliable operation of this release of
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering udev. The kernel must not use the CONFIG_SYSFS_DEPRECATED* option.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering - The kernel must have sysfs, unix domain sockets and networking enabled.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering Unix domain sockets (CONFIG_UNIX) as a loadable kernel module is not
d1f9edafe7b832c507931640f32069d001916b0eLennart Poettering supported.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering - The proc filesystem must be mounted on /proc/, the sysfs filesystem must
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering be mounted at /sys/. No other locations are supported by udev.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart PoetteringOperation:
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering Udev creates and removes device nodes in /dev/, based on events the kernel
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering sends out on device discovery or removal.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering - Very early in the boot process, the /dev/ directory should get a 'tmpfs'
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering filesystem mounted, which is populated from scratch by udev. Created nodes
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering or changed permissions will not survive a reboot, which is intentional.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering - The content of /lib/udev/devices/ directory which contains the nodes,
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering symlinks and directories, which are always expected to be in /dev, should
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering be copied over to the tmpfs mounted /dev, to provide the required nodes
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering to initialize udev and continue booting.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering - The old hotplug helper /sbin/hotplug should be disabled on bootup, before
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering actions like loading kernel modules are taken, which may cause a lot of
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering events.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering - The udevd daemon must be started on bootup to receive netlink uevents
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering from the kernel driver core.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering - All kernel events are matched against a set of specified rules in
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering /lib/udev/rules.d/ which make it possible to hook into the event
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering processing to load required kernel modules and setup devices. For all
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering devices the kernel exports a major/minor number, udev will create a
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering device node with the default kernel name, or the one specified by a
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering matching udev rule.
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart PoetteringPlease direct any comment/question/concern to the linux-hotplug mailing list at:
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering linux-hotplug@vger.kernel.org
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering
b5b4c94a67d90891a0225af0e08cf45dbc329377Lennart Poettering