6.61. Udev-188 (Extracted from systemd-188)

The Udev package contains programs for dynamic creation of device nodes. The development of udev has been merged with systemd, but most of systemd is incompatible with LFS. Here we build and install just the needed udev files.

Approximate build time: 0.1 SBU
Required disk space: 17.4 MB

6.61.1. Installation of Udev

[Note]

Note

This package is a little different from other packages. The initial package that is extracted is systemd-188.tar.xz even though the application we are installing is udev. After changing to the systemd directory, follow the instructions below.

The udev-lfs tarball contains LFS-specific files used to build Udev. Unpack it into the systemd source directory:

tar -xvf ../udev-lfs-188-3.tar.bz2

Compile the package:

make -f udev-lfs-188/Makefile.lfs

Install the package:

make -f udev-lfs-188/Makefile.lfs install

Finally set up the persistent network udev rules. This task will be explained in detail in Section 7.2.1, “Creating stable names for network interfaces”. Note that the /sys and /proc filesystems must be mounted in the chroot environment as explained at the beginning of this chapter for the following script to work.

bash udev-lfs-188/init-net-rules.sh

6.61.2. Contents of Udev

Installed programs: accelerometer, ata_id, cdrom_id, collect, mtd_probe, scsi_id, v4l_id, udevadm, and udevd
Installed libraries: libudev.so
Installed directories: /etc/udev, /lib/udev, /lib/firmware, /usr/share/doc/udev

Short Descriptions

ata_id

Provides Udev with a unique string and additional information (uuid, label) for an ATA drive

cdrom_id

Provides Udev with the capabilities of a CD-ROM or DVD-ROM drive

collect

Given an ID for the current uevent and a list of IDs (for all target uevents), registers the current ID and indicates whether all target IDs have been registered

scsi_id

Provides Udev with a unique SCSI identifier based on the data returned from sending a SCSI INQUIRY command to the specified device

udevadm

Generic udev administration tool: controls the udevd daemon, provides info from the Udev database, monitors uevents, waits for uevents to finish, tests Udev configuration, and triggers uevents for a given device

udevd

A daemon that listens for uevents on the netlink socket, creates devices and runs the configured external programs in response to these uevents

libudev

A library interface to udev device information

/etc/udev

Contains Udev configuration files, device permissions, and rules for device naming