The Udev package contains programs for dynamic creation of device nodes.
The udev-config tarball contains LFS-specific files used to configure Udev. Unpack it into the Udev source directory:
tar xf ../udev-config-6.2.tar.bz2
Create some devices and directories that Udev cannot handle due to them being required very early in the boot process:
install -dv /lib/{firmware,udev/devices/{pts,shm}} mknod -m0666 /lib/udev/devices/null c 1 3 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/path_id \ extras/scsi_id extras/usb_id extras/volume_id"
The meaning of the make option:
This builds several helper binaries that can aid in writing custom Udev rules.
To test the results, issue: make test.
Note that the Udev testsuite will produce numerous messages in the host system's logs. These are harmless and can be ignored.
Install the package:
make DESTDIR=/ \ EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \ extras/firmware extras/floppy extras/path_id \ extras/scsi_id extras/usb_id extras/volume_id" install
The meaning of the make parameter:
This prevents the Udev build process from killing any udevd processes that may be running on the host system.
Udev has to be configured in order to work properly, as it does not install any configuration files by default. Install the LFS-specific configuration files:
cp -v udev-config-6.2/[0-9]* /etc/udev/rules.d/
Install the documentation that explains how to create Udev rules:
install -m644 -D -v docs/writing_udev_rules/index.html \ /usr/share/doc/udev-096/index.html