%general-entities; ]> udev &systemd-version;
&systemd-url;
Udev from Systemd-&systemd-version; Udev <para>The Udev package contains programs for dynamic creation of device nodes.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> <seg>&udev-fin-sbu;</seg> <seg>&udev-fin-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Udev Udev is part of the systemd-&systemd-version; package. Use the systemd-&systemd-version;.tar.xz file as the source tarball. Remove two unneeded groups, render and sgx, from the default udev rules: sed -i -e 's/GROUP="render"/GROUP="video"/' \ -e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in Remove one udev rule requiring a full Systemd installation: sed '/systemd-sysctl/s/^/#/' -i rules.d/99-systemd.rules.in Prepare Udev for compilation: mkdir -p build cd build meson setup \ --prefix=/usr \ --buildtype=release \ -Dmode=release \ -Ddev-kvm-mode=0660 \ -Dlink-udev-shared=false \ .. The meaning of the meson options: --buildtype=release This switch overrides the default buildtype (debug), which produces unoptimized binaries. -Dmode=release Disable some features considered experimental by upstream. -Ddev-kvm-mode=0660 The default udev rule would allow all users to access /dev/kvm. The editors consider it dangerous. This option overrides it. -Dlink-udev-shared=false This option prevents udev from linking to the internal systemd shared library, libsystemd-shared. This library is designed to be shared by many Systemd components and it's too overkill for a udev-only installation. Only build the components needed for udev: ninja udevadm systemd-hwdb \ $(grep -o -E "^build (src/libudev|src/udev|rules.d|hwdb.d)[^:]*" \ build.ninja | awk '{ print $2 }') \ $(realpath libudev.so --relative-to .) Remove one udev rule file requiring a full Systemd installation: rm rules.d/90-vconsole.rules Install the package: install -vm755 -d {/usr/lib,/etc}/udev/{hwdb,rules}.d install -vm755 -d /usr/{lib,share}/pkgconfig install -vm755 udevadm /usr/bin/ install -vm755 systemd-hwdb /usr/bin/udev-hwdb ln -sv ../bin/udevadm /usr/sbin/udevd cp -av libudev.so{,*[0-9]} /usr/lib/ install -vm644 ../src/libudev/libudev.h /usr/include/ install -vm644 src/libudev/*.pc /usr/lib/pkgconfig/ install -vm644 src/udev/*.pc /usr/share/pkgconfig/ install -vm644 ../src/udev/udev.conf /etc/udev/ install -vm644 rules.d/* ../rules.d/{*.rules,README} /usr/lib/udev/rules.d/ install -vm644 hwdb.d/* ../hwdb.d/{*.hwdb,README} /usr/lib/udev/hwdb.d/ install -vm755 $(find src/udev -type f | grep -F -v ".") /usr/lib/udev Install some custom rules and support files useful in an LFS environment: tar -xvf ../../&udev-lfs-version;.tar.xz make -f &udev-lfs-version;/Makefile.lfs install Install the man pages: tar -xf ../../systemd-man-pages-253.tar.xz --strip-components=1 \ -C /usr/share/man --wildcards '*/udev*' '*/libudev*' \ '*/systemd-'{hwdb,udevd.service}.8 sed 's/systemd\(\\\?-\)/udev-/' /usr/share/man/man8/systemd-hwdb.8 \ > /usr/share/man/man8/udev-hwdb.8 sed 's|lib.*udevd|sbin/udevd|' \ /usr/share/man/man8/systemd-udevd.service.8 \ > /usr/share/man/man8/udevd.8 rm /usr/share/man/man8/systemd-*.8 Configuring Udev Udev configuring /etc/udev/hwdb.bin Information about hardware devices is maintained in the /etc/udev/hwdb.d and /usr/lib/udev/hwdb.d directories. Udev needs that information to be compiled into a binary database /etc/udev/hwdb.bin. Create the initial database: udev-hwdb update This command needs to be run each time the hardware information is updated. Contents of Udev Installed programs Installed libraries Installed directories udevadm, udevd (symlink to udevadm), and udev-hwdb libudev.so /etc/udev and /usr/lib/udev Short Descriptions 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 udevadm udevd A daemon that listens for uevents on the netlink socket, creates devices and runs the configured external programs in response to these uevents udevd udev-hwdb Updates or queries the hardware database. udev-hwdb libudev A library interface to udev device information libudev /etc/udev Contains Udev configuration files, device permissions, and rules for device naming /etc/udev