%general-entities; ]> Udev-&udev-version; Udev <para>The Udev package contains programs for dynamic creation of device nodes.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem><seg>0.1 SBU</seg><seg>3.8 MB</seg></seglistitem> </segmentedlist> <segmentedlist> <segtitle>&dependencies;</segtitle> <seglistitem><seg>Coreutils and Make</seg></seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Udev Create some devices that Udev cannot handle due to them being required very early in the boot process: ln -sv /proc/self/fd /lib/udev/devices/fd ln -sv /proc/self/fd/0 /lib/udev/devices/stdin ln -sv /proc/self/fd/1 /lib/udev/devices/stdout ln -sv /proc/self/fd/2 /lib/udev/devices/stderr ln -sv /proc/kcore /lib/udev/devices/core Compile the package: make \ EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id extras/firmware extras/floppy extras/scsi_id extras/usb_id extras/volume_id" The meaning of the make option: EXTRAS=... This builds several helper binaries that can aid in writing custom Udev rules. To test the results, issue: make test. Install the package: make DESTDIR=/ \ EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id extras/firmware extras/floppy extras/scsi_id extras/usb_id extras/volume_id" \ install The meaning of the make option: DESTDIR=/ This prevents the Udev build process from killing any udevd processes that may be running on the host system. Udev's configuration is far from ideal by default, so install the configuration files here: cp -v ../&udev-config-file; /etc/udev/rules.d/25-lfs.rules Alter Udev's configuration file so that Udev can automatically load kernel modules. sed -i 147,150d /etc/udev/rules.d/25-lfs.rules cat >> /etc/udev/rules.d/25-lfs.rules << EOF # Rules to allow hotplugging of devices with modular drivers ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \ RUN+="/sbin/modprobe $modalias" ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ RUN+="/sbin/modprobe sd_mod" EOF Install the documentation that explains how to create Udev rules: install -m644 -D -v docs/writing_udev_rules/index.html /usr/share/doc/udev-&udev-version;/index.html Run the udevstart program to create our full complement of device nodes. /sbin/udevstart Contents of Udev Installed programs Installed directory udevcontrol, udevd, udevinfo, udevmonitor, and udevtest /etc/udev Short Descriptions udevcontrol Configures a number of options for the running udevd daemon, such as the log level. udevcontrol udevd A daemon that reorders hotplug events before submitting them to udev, thus avoiding various race conditions udevd udevinfo Allows users to query the udev database for information on any device currently present on the system; it also provides a way to query any device in the sysfs tree to help create udev rules udevinfo udevmonitor Prints the event received from the kernel and the event which udev sends out after rule processing udevmonitor udevtest Simulates a udev run for the given device, and prints out the name of the node the real udev would have created or (not in LFS) the name of the renamed network interface udevtest /etc/udev Contains udev configuation files, device permissions, and rules for device naming /etc/udev