Udev changes (was Re: ALSA modules and restore volumes)

Matthew Burgess matthew at linuxfromscratch.org
Wed Oct 26 23:48:28 PDT 2005


Forwarding from blfs-dev, where an ALSA related thread went just a 
little off-topic for BLFS :)

Thanks Alexander, I'll try to get these changes in a.s.a.p.

Matthew Burgess wrote:

> I'll have to bite the bullet and see to getting all the module 
> hotplugging related bugs sorted out

This means just the following steps:

1) Upgrade udev to 071 to resolve the udev_run_hotplugd installation bug

2) Add these two rules to LFS default rules file:

ENV{UDEVD_EVENT}=="1", RUN+="/sbin/udev_run_hotplugd"
RUN+="/sbin/udev_run_devd"

3) Change instructions to:

make EXTRAS=extras/run_directory/
make EXTRAS=extras/run_directory/ install
cp ../udev-config-5.rules /etc/udev/rules.d/25-lfs.rules
install -m644 -D docs/writing_udev_rules/index.html \
         /usr/share/doc/udev-071/index.html

After that ends up in the book, we can try eliminating the hotplug
package gradually. E.g., for a start, build the firmware helper in
EXTRAS and use it instead of hotplug's firmware.agent.

Some cleanup of the current rules file is also needed. E.g., I would
change the following rules:

KERNEL=="dm-*", GROUP="disk",   MODE="0640"
KERNEL=="card*", NAME="dri/card%n", GROUP="video"

to

KERNEL=="dm-*", NAME=""
KERNEL=="card*", NAME=""

in order for udev to completely ignore the corresponding devices. Rationale:

dm: /dev/dm-* is not the proper name for such devices. Both "dmsetup"
and lvm2-related programs make the corresponding devices automatically
and with proper names, without udev and associated races.

card*: the X server makes those devices anyway without any help from
udev. I don't want udev to step on its back (aka race with permissions)
and recreate the devices.

-- 
Alexander E. Patrakov



More information about the lfs-dev mailing list