cleanup
[mudev.git] / README
blobc1a2782caf56be5ae9fc1dbafe0568a99edbb78b
1 This is a busybox-ized udevd/libudev set from eudev. API version 0 only, namely
2 it does not contain the hw database calls (yet?). Why?: systemd version is an
3 insane kludge (a glance at this project will suffice to convince you), recent
4 eudev relies on perl5 (which is the wrong trajectory).
6 It requires busybox blkid and modprobe in PATH of the udevd daemon. You can use
7 a blkid from anywhere until it does not break the braindead output parser. You
8 can use any modbrobe you like too, but you need to be carefull for your
9 modprobe database updates while many modprobes are running.
11 To build:
12   - a C compilation toolchain (default is gcc 4.7.x based)
13   - run ./make shell script. You will want the following make command to
14     achieve "standard" path configuration:
15     ./make --prefix=/usr --eprefix=/ --sysconfdir=/etc
17 To install, you have to copy manually the following files below fake_root.
19 The pkg-config files are generated based on the information passed on the make
20 command line since some of this information is hardcoded in the code.
22 The make command line is friendly to alternative/cross toolchains.
24 Original eudev readme follows.
26 ----------------------------------------
28 This is the systemd-ectomized version of udev. Most features from the upstream
29 are backported, though we do not guarantee 100% API compatibility. The
30 development tree can be found at https://bitbucket.org/braindamaged/udev
32 Original udev readme follows.
34 ----------------------------------------
36 udev - Linux userspace device management
38 Integrating udev in the system has complex dependencies and may differ from
39 distribution to distribution. A system may not be able to boot up or work
40 reliably without a properly installed udev version. The upstream udev project
41 does not recommend replacing a distro's udev installation with the upstream
42 version.
44 The upstream udev project's set of default rules may require a most recent
45 kernel release to work properly.
47 Tools and rules shipped by udev are not public API and may change at any time.
48 Never call any private tool in /usr/lib/udev from any external application; it
49 might just go away in the next release. Access to udev information is only offered
50 by udevadm and libudev. Tools and rules in /usr/lib/udev and the entire contents
51 of the /run/udev directory are private to udev and do change whenever needed.
53 Requirements:
54   - Version 2.6.34 of the Linux kernel with sysfs, procfs, signalfd, inotify,
55     unix domain sockets, networking and hotplug enabled
57   - Some architectures might need a later kernel, that supports accept4(),
58     or need to backport the accept4() syscall wiring in the kernel.
60   - These options are required:
61       CONFIG_DEVTMPFS=y
62       CONFIG_HOTPLUG=y
63       CONFIG_INOTIFY_USER=y
64       CONFIG_NET=y
65       CONFIG_PROC_FS=y
66       CONFIG_SIGNALFD=y
67       CONFIG_SYSFS=y
68       CONFIG_SYSFS_DEPRECATED*=n
69       CONFIG_UEVENT_HELPER_PATH=""
71   - These options might be needed:
72       CONFIG_BLK_DEV_BSG=y (SCSI devices)
73       CONFIG_TMPFS_POSIX_ACL=y (user ACLs for device nodes)
75   - The /dev directory needs the 'devtmpfs' filesystem mounted.
76     Udev only manages the permissions and ownership of the
77     kernel-provided device nodes, and possibly creates additional symlinks.
79   - Udev requires /run to be writable, which is usually done by mounting a
80     'tmpfs' filesystem.
82   - This version of udev does not work properly with the CONFIG_SYSFS_DEPRECATED*
83     option enabled.
85   - The deprecated hotplug helper /sbin/hotplug should be disabled in the
86     kernel configuration, it is not needed today, and may render the system
87     unusable because the kernel may create too many processes in parallel
88     so that the system runs out-of-memory.
90   - The proc filesystem must be mounted on /proc, and the sysfs filesystem must
91     be mounted at /sys. No other locations are supported by a standard
92     udev installation.
94   - The default rules set requires the following group names resolvable at udev startup:
95       disk, cdrom, floppy, tape, audio, video, lp, tty, dialout, and kmem.
96     Especially in LDAP setups, it is required that getgrnam() be able to resolve
97     these group names with only the rootfs mounted and while no network is
98     available.
100   - Some udev extras have external dependencies like:
101       libglib2, usbutils, pciutils, and gperf.
102     All these extras can be disabled with configure options.
104 Setup:
105   - The udev daemon should be started to handle device events sent by the kernel.
106     During bootup, the events for already existing devices can be replayed, so
107     that they are configured by udev. The systemd service files contain the
108     needed commands to start the udev daemon and the coldplug sequence.
110   - Restarting the daemon never applies any rules to existing devices.
112   - New/changed rule files are picked up automatically; there is usually no
113     daemon restart or signal needed.
115 Operation:
116   - Based on events the kernel sends out on device creation/removal, udev
117     creates/removes device nodes and symlinks in the /dev directory.
119   - All kernel events are matched against a set of specified rules, which
120     possibly hook into the event processing and load required kernel
121     modules to set up devices. For all devices, the kernel exports a major/minor
122     number; if needed, udev creates a device node with the default kernel
123     device name. If specified, udev applies permissions/ownership to the device
124     node, creates additional symlinks pointing to the node, and executes
125     programs to handle the device.
127   - The events udev handles, and the information udev merges into its device
128     database, can be accessed with libudev:
129       http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/
130       http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/
132 For more details about udev and udev rules, see the udev man pages:
133       http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/
135 Please direct any comment/question to the linux-hotplug mailing list at:
136   linux-hotplug@vger.kernel.org