Testing new udev packages in Slackware-current (post-01 Jul 2007)
Introduction
With kernel 2.6.15, udev can listen directly the events given by some devices, through netlink. Sysfs provides a interface to send events, when we wrote to "uevent" file in some device directory, one event will be sent and udev can catch this event and do something.
This is the great idea, now udev can be used to handle all device node creation AND module loading. The hotplug binary is no more and all configuration can be done using only udev.rules. Udev can also rename network interfaces and handle the devices symlinks.
Packages
Slackware current already fits in all pre-reqs to use udev and leave to udev the hotplug handling. But udev is in continuous development; using 2.6.15 kernels we need to use wait_for_sysfs rules to waint until sysfs files are in place, in 2.6.18 this is only needed to some scsi events and we hope this won't be needed by any device sometime soon.
To test these new developments and to do some improvenments and bug fixes in hotplug system,we do these packages, they can be installed in Slackware current with kernel 2.6.18+, only give special care to /etc/rc.d/rc.*.new files and the un-numbered rules in /etc/udev/rules.d. Mistakes there can broke your system:
- pcmciautils-014
The udev system works really fine with 32bits pc-card devices, but have problems to load 16bits socket controllers. To do that, we provide one rc.pcmcia that tries to load the socket controllers in your machine. You can edit /etc/rc.d/rc.pcmcia to change from "probe" to your specific controller. If you have a "new" notebook you don't had problems with that.
Changes in 014-4pk
- Changed config.opts to don't use 0x800 to 0x8ff memory region. It hangs many new machines, specially Dell machines.
Changes in 014-3pk
- Added 60-pcmcia.rules, they are splitted from
old 50-udev.rules.
- Rewrote the rc.pcmcia to slackware's new "only" 2.6
reality and trying to be compatible with old hardware.
- udev-118
Some little things you need remember: put your firmware files in /lib/firmware, this is the correct location. If you need some special device earlier at boot, create a node in /lib/udev/devices, this directory is copied to /dev each boot, before udev tries to detect the hardware.
Changes in 118-1pk
- Merged changes from udev-116 package from slackware-current
- Some small build changes and use more upstream rules.
Changes in 111-7pk
- Merged udev-111 package from slackware-current
- Made one "wrapper" to modprobe, to use with pnp modules. Now you can blacklist psmouse or pcspkr and they will be blacklisted.
Changes in 111-6pk
- Merged changes from udev-109 from slackware-current
- Change the way of libvolume is compiled and put inside the package, now we use the volume_id Makefile directly. (Thanks Robby Workman!)
- Changes in 50-udev-rules, using SAFE uuids to made persistent storage by-uuid symlinks and added rules to change removable devices groups to plugdev; to use with HAL.
- Comment the aliases to psmouse, atkbd and pcspkr, is better to enable the load/unload of these modules in rc.modules
Changes in 109-1pk
- Merged persistent storage and persistent input
rules again. The file was very out-of-sync with
the mainstream rules. Now is ok.
- Changed nethelper.sh to use ATTR instead SYSFS (Thanks rworkman)
- Changed cdrom-symlinks.sh to support by-id links too. Useful when you have one of these USB DVD-ROMs.
- Removed input-devices.sh it isn't used anywhere.
- Removed all unused devices from /lib/udev/devices: fd[0-3] (these are removed from slackware package), nvidia* (thanks rworkman) and vm*. I think the new nvidia drivers can create those nvidia devices and vmware is smart enough to do the same.
Changes in 107-1pk
- Remove dasd rules (dasd are removed from
udev and now is part of s390-tools)
- Split out pcmcia rules. They are now in
pcmciatools package
- Change the rule to wait for scsi sysfs events
- Added persistent rules to input devices (very
useful).
- Some small changes and updates in rules
Changes in 104-6pk
- Fix problem in rule generated headers.
Changes in 104-5pk
- Changes in cdrom-symlinks.sh. The last release
had a deadlock issue. Sorry if you had problems
because that.
Changes in 104-4pk
- Include /etc/scsi_id.config
- Fix problems with libvolume links
- Link /lib/udev/vol_id to /sbin/vol_id, vol_id is used
by multipath, and need to be public
Changes in 104-3pk
- Remove usbfs mounting in rc.udev. usbfs is deprecated
- Added --timeout to udevsettle in rc.udev. If something
goes wrong, the system won't will wait forever. Two
minutes is the limit
- Added pcspkr to modprobe.d/blacklist. You can load/unload
the speaker editing the /etc/rc.d/rc.modules
- Remove the wait_for_sysfs rules. Only the one needed by
scsi devices is there.
Changes in 104-2pk
- Change some UDEV_RULES to UDEV_ROOT in rc.udev
- Fix chmod udev.rules in SlackBuild to 50-udev.rules
Changes in 104-1pk
- Remove debug messages in cdrom-symlinks.sh, if you use the previous udev version, is a good idea to remove /tmp/saida.
- Remove the 2.4 kernel test. 2.4 kernel time is gone (i hope)
- Changed rc.udev to respect and use udev_root. (Thanks Andreas)
Changes in 103-5pk
- Fixes in cdrom-symlinks.sh, previous version fails when one
symlink exist and leave the lockfile in /dev. Now it's fixed!
- Added the header in 75-optical-devices.rules.
- Little changes in 75-network-devices.rules header.
Changes in 103-4pk
- Disable rc.optical-symlinks. Again, we need to test the new rules!
- Removed udev.count...sh this script isn't used anymore
- Ok, we have a lot of wait_sysfs warnings in 2.6.19... but we need
these rules instead slackware-current moves -;)
- Re-added the edd_id (Thanks Robby Workman!)
- Added a /sbin/scsi_id to /lib/udev/scsi_id symlink. This is needed
to multipath.
- Fixed wrong permissions in /etc files.
Changes in 103-3pk
- Change the udev.rules to 50-udev.rules. Some rules are dependent of
the "loading" order. Put the number before the rule file made the
things a bit easier.
- Major rewrote of nethelper.sh and cdrom-symlinks.sh. Now it can
create rules with ro / and later (in rc.udev) move these rules to a
better place. cdrom-symlinks.sh are one merge of the provided sample
write-cd-links, the old cdrom-symlinks and nethelper.sh -;)
- nethelper.sh create uncommented links. People, we need to test this
rules!
- Changes in rc.udev. Now it can be used to retry failed events. With
that the rc.M is a lot simple, and doesn't needs two udev calligns,
one when coming from init 1 and other in normal startup.
- /dev/coldplug isn't used anymore.
Changes in 103-2pk
- Many updates in udev.rules file to be most like the the provided samples.
- Fixed the syntax of udev.rules to the new syntax (udev-098+).
- Start to use the write-cd-rules to... write CD rules!
Changes in 094-3pk
- Fix some small problems in udev.Slackbuild (thanks Thomas Pfaff)
- Fix two rules with problems (= when needs to be ==) (thanks Federico Manganelli)
- Fix more rules in pty creation, we change one %n to %m (thanks Ken Milmore)
- Fix MODALIAS in many places in udev.rules. The old behavior was deprecated in 094.
- Added some special rules to handle some isapnp files
- Many changes in nethelper.sh some based in net.agent in slackware's hotplug package and some suggested by Eric Hamelleers
Changes in 092-5pk
- Fix one problem in usbfs mount
Changes in 092-4pk
- Changes all SYMLINKS attributions from = to +=
- Added nethelper.sh to solve some network problems
Changes in 092-3pk
- rc.udev changed to handle better the root device (thanks Eric Hameleers)
- /etc/modprobe.d/blacklist now had the .new suffix (thanks Zalman Gershon)
- A better way to handle /proc/bus/usbmount when usbcore is a module (reported by Damjan)
- Changes in printer detection (reported by Marco Sacchetto)
Changes in 090-2pk
- copy libvolume_id.h and libvolume_id.a to his correct places (in the last update libvolume_id.a was in wrong place)
- rc.udev now uses udevsettle to wait for udev events. Works fine.
- rc.udev now mounts usbfs that is needed to detect some usb devices (anyone says scanners?)
Changes in 089-5pk
- udev can't be called in ro / again. Read about that in sysvinit comments.
- copy libvolume_id.pc and libvolume_id.a to his correct places
- some changes in comments in Slackbuild, scripts and config files
Changes in 089-3pk
- Upgraded from udev-088 to udev-089
- "force-reload" is back!
- Added a script and rules to ieee1394 devices
- Now we use udevtrigger much faster!
- udev now can be called in ro /
Changes in 088-3pk
- Upgraded from udev-086 to udev-088
- Removed "force-reload" in rc.udev
- Changed some rules in persistent link settings
- Added one rule to HAL, the rule is commented, if you want to use HAL, comment it out
- Binaries changed from root.bin to root.root
Installation
Ok, you need to be running at least slackware 11 and using kernel 2.6.18+ (slackware 11 ships kernel 2.6.17.13 and 2.6.18). If you are running an older version of slackware is a good idea upgrade to 11.0. The steps to test these packages are:
- Install/Upgrade all packages
- Move rc.udev.new to rc.udev and rc.pcmcia.new to rc.pcmcia
- Remove the /etc/udev/rules.d/cd-devices.rules and /etc/udev/rules.d/network-devices.rules.
These scripts are "upgraded" to 75-*-devices.rules, using the "numbered" schema.
- Reboot your machine
Please, DON'T just upgrade the packages. If you do that your system can become unstable. Follow the steps from 2 to 4 to get your system working OK.
Sources
All package sources, slackbuilds and files can be found here:
Final
The system is tested and working fine in five machines with many different PCI, ISA and PCMCIA cards. Probably it won't burn your machine, but i don't give to you any warranties. If burns, is your problem.
If you had any problem, feel free to send a mail to me.
Piter PUNK
piterpk AT terra dot com dot br