Gentoo Archives: gentoo-desktop

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-desktop@l.g.o
Subject: [gentoo-desktop] Re: Kernel_2.6/devfsd/SCSI/USB/Digital Camera problem
Date: Sun, 17 Oct 2004 07:33:17
Message-Id: pan.2004.10.17.07.33.09.64991@cox.net
In Reply to: Re: [gentoo-desktop] Kernel_2.6/devfsd/SCSI/USB/Digital Camera problem by Luke-Jr
1 Luke-Jr posted <200410170339.07781.luke-jr@×××××××.org>, excerpted below,
2 on Sun, 17 Oct 2004 03:39:04 +0000:
3
4 > On Sunday 17 October 2004 3:34 am, Collins Richey wrote:
5 >> I can't explain the behavior for devfs, but you should be able to cure
6 >> the problem by moving over to udev. You can add a udev paramter to
7 >> insure that the camera always mounts as some specific device, example
8 >> /dev/sda?. udev does not use the complex
9 >> /dev/scsi/host4/bus0/target0/lun0/part? nomenclature.
10 >
11 > I actually like having the /dev/scsi/host4/bus0/target0/lun0/part stuff.
12 > In certain circumstances, accessing devices based on physical location can
13 > be useful.
14 > However, I like hearing that you can specify device-specific things like
15 > that... Maybe I'll switch and hope I can configure it to do both =D Anyone
16 > know if the script for hotplug to automatically mount USB devices (under
17 > /mnt/usb/devicename) is compatible w/ udev?
18
19 udev is designed around the ability to provide /just/ this sort of
20 solution. The scripts activated when you plug something in can use
21 various stuff (like the buss, default kernel name, model and/or serial
22 number of the device, etc) to create an real /dev entry, and any number of
23 symlinks, which can be located in the traditional devfs location (as
24 Gentoo does by default) or anywhere you might happen to decide you want to
25 put them.
26
27 One of the reference implementation examples uses scripting to look up the
28 info for a CD in a CDDB, and actually symlinks the artist and album name
29 as one of the available device names! Greg KH (one of the Gentoo kernel
30 devs, BTW as well as one of the up and coming mainline kernel developers
31 due to his UDEV work) said it was a "fun" script without a lot of
32 practical use, but that it /did/ illustrate the flexibility available with
33 udev!
34
35 The one downside, if you want to call it that, is that depending on
36 whether you have it set to full dynamic UDEV or set to save some device
37 nodes across reboots, if in dynamic mode, it doesn't create the device
38 nodes until it actually detects the device. With hotplugged stuff it
39 generally does quite well. However, with stuff that's plugged into the
40 system at boot, with coldplug, it can and does detect and load the modules
41 and therefore creates the device nodes in some cases, but not in all
42 cases, depending on what the hardware is. However, that can be fixed
43 either by listing the modules in question in the kernel autoload file, or
44 by building the modules directly into the kernel. I believe creating the
45 device nodes manually, saving state across a reboot much as devfs did in
46 some cases, will work as well, autoloading the required module when the
47 device node is referenced. However, I prefer to avoid that sort of crufty
48 solution here, and like the idea of not having the device nodes there if
49 either the hardware or the modules aren't loaded to handle them. That
50 way, I can tell at a glance what's available for use, by the nodes in
51 /dev. If I wanted all sorts of crufty nodes maintaining themselves over
52 reboots, whether or not the hardware devices and kernel modules were
53 actually there available for use, I'd stick with a static /dev. I want
54 dynamic, and that's what I get, with udev, which allows me far more
55 precise control than devfs ever did.
56
57 --
58 Duncan - List replies preferred. No HTML msgs.
59 "They that can give up essential liberty to obtain a little
60 temporary safety, deserve neither liberty nor safety." --
61 Benjamin Franklin
62
63
64
65 --
66 gentoo-desktop@g.o mailing list

Replies

Subject Author
Re: [gentoo-desktop] Re: Kernel_2.6/devfsd/SCSI/USB/Digital Camera problem Lindsay Haisley <fmouse-gentoo@×××.com>