From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PyHco-0006Gk-W1 for garchives@archives.gentoo.org; Sat, 12 Mar 2011 05:44:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 776F7E0453; Sat, 12 Mar 2011 05:44:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2E3B9E0408 for ; Sat, 12 Mar 2011 05:44:17 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6139A1B409A for ; Sat, 12 Mar 2011 05:44:16 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2104) id 0768120054; Sat, 12 Mar 2011 05:44:15 +0000 (UTC) From: "Joshua Saddler (nightmorph)" To: gentoo-doc-cvs@lists.gentoo.org Subject: [gentoo-doc-cvs] gentoo commit in xml/htdocs/doc/en: udev-guide.xml X-VCS-Repository: gentoo X-VCS-Files: udev-guide.xml X-VCS-Directories: xml/htdocs/doc/en X-VCS-Committer: nightmorph X-VCS-Committer-Name: Joshua Saddler Content-Type: text/plain; charset=utf8 Message-Id: <20110312054415.0768120054@flycatcher.gentoo.org> Date: Sat, 12 Mar 2011 05:44:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-doc-cvs@lists.gentoo.org Reply-to: docs-team@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 74d5016b1a5e4864a93ed92fd9725cfc nightmorph 11/03/12 05:44:15 Modified: udev-guide.xml Log: update udev guide to remove sysfs, add uevents and rules.d, new profile= s, and remove conf.d-rc; patch from swift on bug 358409 Revision Changes Path 1.53 xml/htdocs/doc/en/udev-guide.xml file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/udev= -guide.xml?rev=3D1.53&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/udev= -guide.xml?rev=3D1.53&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/udev= -guide.xml?r1=3D1.52&r2=3D1.53 Index: udev-guide.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/udev-guide.xml,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- udev-guide.xml 26 Dec 2010 19:21:44 -0000 1.52 +++ udev-guide.xml 12 Mar 2011 05:44:14 -0000 1.53 @@ -1,6 +1,6 @@ - + =20 Gentoo udev Guide @@ -23,8 +23,8 @@ =20 -7 -2010-12-26 +8 +2011-03-11 =20 What is udev? @@ -71,103 +71,14 @@ =20

-To provide these features, udev is developed in three separate projects: -namedev, libsysfs and, of course, udev. -

- - - -
-namedev - - -

-Namedev allows you to define the device naming separately from the udev = program. -This allows for flexible naming policies and naming schemes developed by -separate entities. This device naming subsystem provides a standard inte= rface -that udev can use. -

- -

-Currently only a single naming scheme is provided by namedev; the one pr= ovided -by LANANA, used by the majority of Linux systems currently and therefore= very -suitable for the majority of Linux users. -

- -

-Namedev uses a 5-step procedure to find out the name of a given device. = If the -device name is found in one of the given steps, that name is used. The s= teps -are: -

- -
    -
  • label or serial number
  • -
  • bus device number
  • -
  • bus topology
  • -
  • statically given name
  • -
  • kernel provided name
  • -
- -

-The label or serial number step checks if the device has a unique -identifier. For instance USB devices have a unique USB serial number; SC= SI -devices have a unique UUID. If namedev finds a match between this unique= number -and a given configuration file, the name provided in the configuration f= ile is -used. -

- -

-The bus device number step checks the device bus number. For -non-hot-swappable environments this procedure is sufficient to -identify a hardware device. For instance PCI bus numbers rarely change i= n the -lifetime of a system. Again, if namedev finds a match between this posit= ion and -a given configuration file, the name provided in that configuration file= is -used. -

- -

-Likewise the bus topology is a rather static way of defining devi= ces as -long as the user doesn't switch devices. When the position of the device= matches -a given setting provided by the user, the accompanying name is used. -

- -

-The fourth step, statically given name, is a simple string replac= ement. -When the kernel name (the default name) matches a given replacement stri= ng, the -substitute name will be used. -

- -

-The final step (kernel provided name) is a catch-all: this one ta= kes -the default name provided by the kernel. In the majority of cases this i= s -sufficient as it matches the device naming used on current Linux systems= . -

- - -
-
-libsysfs - - -

-udev interacts with the kernel through the sysfs pseudo filesystem. The = libsysfs -project provides a common API to access the information given by the sys= fs -filesystem in a generic way. This allows for querying all kinds of hardw= are -without having to make assumptions on the kind of hardware. -

- - -
-
-udev - - -

-Every time the kernel gets an event in the device structure, it asks ude= v to -take a look. udev follows the rules in the /etc/udev/rules.d/ -directory. udev then uses the information given by the kernel to perform= the -necessary actions on the /dev structure (creating or deleti= ng -device files). +Every time a change happens within the device structure, the kernel emit= s a=20 +uevent which gets picked up by udev. udev then follows the rules = as +declared in the /etc/udev/rules.d and=20 +/lib/udev/rules.d directories. Based on the information con= tained +within the uevent, it finds the rule or rules it needs to trigger and pe= rforms=20 +the required actions. These actions can be creating or deleting device f= iles,=20 +but can also trigger the loading of particular firmware files into the +kernel memory.

=20 @@ -182,9 +93,11 @@ =20

udev is meant to be used in combination with a 2.6 kernel (like -gentoo-sources with the default 2007.0 profile). If you're using = such a -kernel then you just have to make sure that you have a recent -sys-apps/baselayout version. That's all you need. +gentoo-sources with the default 10.0 profile). If you're using su= ch a +kernel then you just should have no issues whatsoever with using udev as= the=20 +necessary support is built-in in all stable sys-apps/baselayout=20 +versions. Normally, udev should already be installed on your system, but= if +this is not the case, then it is easy to install:

=20
@@ -196,11 +109,13 @@
 

=20
-File systems --->
-    [*] Inotify file change notification support
-    [*]   Inotify support for userspace
+General Setup --->
+  (Make sure the following item is *not* enabled)
+  [ ] enable deprecated sysfs features to support old userspace tools
+
+File Systems --->
+  [*] Inotify support for userspace
   Pseudo filesystems --->
-    [*] /proc file system support
     [*] Virtual memory file system support (former shm fs)
 
=20 @@ -211,43 +126,6 @@ =20
-
-Configuration - - -

-If you want to use the udev settings Gentoo provides to make your life -comfortable, then read no more. Gentoo will use udev but keep a static -/dev so that you will never have any missing device nodes. -The Gentoo init scripts won't run the devfsd daemon and will deactivate = devfs -when you boot up. -

- -

-But if you are a die-hard and want to run a udev-only, unmodified system= as is -intended by the udev development (including the difficulties of missing = device -nodes because udev doesn't support them yet), by all means, read on :) -

- -

-We'll deactivate the rules that save the device file nodes: edit the -RC_DEVICE_TARBALL variable in /etc/conf.d/rc and set= it to -no: -

- -
-RC_DEVICE_TARBALL=3D"no"
-
- -

-If you have included devfs support in your kernel, you can deactivate it= in -the bootloader configuration: add gentoo=3Dnodevfs as a kernel pa= rameter. -If you want to use devfs and deactivate udev, add gentoo=3Dnoudev= as kernel -parameter. -

- - -
=20