From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Mon, 11 Jul 2005 13:58:06 +0000 Subject: Re: UDEV from scratch for beginners - mtd device not shown in device tree. Message-Id: <20050711135806.GA6760@vrfy.org> List-Id: References: <42D271E4.40908@anagramm.de> In-Reply-To: <42D271E4.40908@anagramm.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Mon, Jul 11, 2005 at 03:19:32PM +0200, Clemens Koller wrote: > After installing "udev from scratch" on an embedded system > (not being able to follow Decibels UDEV Primer directly as I don't use > any package management tools.) I still cannot get my mtd > (memory technology device) node created dynamically by udev when I > insert my module to the kernel. >=20 > Basically, my installation was like this: >=20 > - compiled Linux-2.6.13-rc2 w/ CONFIG_UNIX98_PTYS and CONFIG_DEVPTS_FS > and CONFIG_HOTPLUG and friends. >=20 > - manually created /dev nodes on local filesystem to be able to boot > and login via ssh at least: > cd /dev > mknod -m 660 console c 5 1 > mknod -m 666 null c 1 3 > mknod -m 666 hda b 3 0 > mknod -m 666 hda1 b 3 1 > mknod -m 666 hda2 b 3 2 > (I guess I will have to move those manually created devices to > /etc/udev/devices, right? Where is documentation for that and who > is copying that to /dev and when?) This is Fedora specific, udev does not do it by default. > (BTW: in which order are the files in /etc/udev/rules.d processed if > there are more than one? Lexical order. > Are there any naming conventions which apply? > Where is the documentation for that?) The man page. > - I've checked /udev/uevent_listen which works pretty fine while > loading my mtd modules: >=20 > $ ./uevent_listen > [1121084998] received 'remove' from '/module/mminfo' > ACTION=3Dremove > DEVPATH=3D/module/mminfo > SUBSYSTEM=3Dmodule > SEQNUM=181 >=20 > [1121085000] received 'add' from '/module/mminfo' > ACTION=ADd > DEVPATH=3D/module/mminfo > SUBSYSTEM=3Dmodule > SEQNUM=182 >=20 > while doing > $ rmmod mminfo > $ insmod mminfo.ko These are module events and not events for class or block devices. udev will not create any node for such events. > Now I ran into the following problem while loading my module > which appeared as /dev/mtd/0 and/or /dev/mtd/0ro in devfs: >=20 > Jul 11 13:33:29 ecam udevd[14647]: udevd.c: seq 177 forked, pid 14653, 2 = > seconds old > Jul 11 13:33:29 ecam udev[14653]: udev_rules.c: reset run list > Jul 11 13:33:29 ecam udev[14654]: udev_utils.c: exec of program=20 > '/sbin/udev_run_devd' failed > Jul 11 13:33:29 ecam udevd[14647]: udevd.c: seq 177 exit, 2 seconds old > Jul 11 13:42:32 ecam udevd[14647]: udevd.c: seq 178 queued, devpath=20 > '/module/mminfo' > Jul 11 13:42:32 ecam udevd[14647]: udevd.c: seq 178 forked, pid 14662, 0 = > seconds old >=20 > I patched udev_utils.c (appended, whitespaces fixed, too) to get the clue > that the call to /sbin/udev_run_devd failed. >=20 > Well, there is no valuable documentation about udev_run_devd neither in > writing_udev_rules nor in Decibels UDEV primer. So I decided to remove > that line from the 50-udev.rules: > # emulate dev.d/ > #RUN=3D"/sbin/udev_run_devd" > without really knowing what that is... > (What is a directory multiplexer doing? Do I need that? For what?) Look at the archives, and RELEASE-NOTES. dev.d/ is a hotplug.d/ style directory, where you can place programs in, that run at device node creation/removal. > The error messge about failed exec of udev_run_devd doesn't appear anymor= e. > But I still cannot get my /dev/mtd/0 created... Mtd seems to lack proper driver-core integration, and therefore no udev support: http://lists.infradead.org/pipermail/linux-mtd/2005-June/012821.html Kay ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel