* udev vs. devfs
@ 2005-06-16 15:07 Pelle Svensson
2005-06-16 17:10 ` Vassilis Virvilis
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: Pelle Svensson @ 2005-06-16 15:07 UTC (permalink / raw)
To: linux-hotplug
Hi,
I would say that devfs is a clear winner compare to udev when it comes
to it's simplicity in the setup. Just mark devfs in the kernel config and
mount it.
When it comes to udev the lack of documentation left you in a try/error
loop.
Can't somebody tell me what I need to get udev up and running from scratch.
I'm building a ARM system with 2.6 kernel from scratch so I only need the
most basic stuff to get a 'dev' list.
/Pelle
_________________________________________________________________
Nyhet! Hotmail direkt i Mobilen! http://mobile.msn.com/
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
@ 2005-06-16 17:10 ` Vassilis Virvilis
2005-06-16 18:37 ` Greg KH
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Vassilis Virvilis @ 2005-06-16 17:10 UTC (permalink / raw)
To: linux-hotplug
Pelle Svensson wrote:
>
> Hi,
>
[snip]
> Can't somebody tell me what I need to get udev up and running from scratch.
>
> I'm building a ARM system with 2.6 kernel from scratch so I only need the
> most basic stuff to get a 'dev' list.
>
Halo,
I don't if it will help you but it mostly works for my setup so you may give it a try.
Assuming you are booting correctly and
0) you have the latest kernel >= 2.6.11.rc4 and the latest udev (git versions)
1) you have mount your root partition
2) you have mount /proc /sys
in your init
1) run start_udev (it is distributed with udev sources)
2) later run coldplug
---- coldplug -----
#!/bin/sh
BUSSES="pci usb";
for bus in $BUSSES; do
for DEV in /sys/bus/$bus/devices/*; do
echo -n "Checking bus $bus device $DEV...";
if [ -L "$DEV" -a -f $DEV/modalias ]; then
echo "modprobing";
modprobe `cat $DEV/modalias`;
else
echo "no";
fi
done;
done;
---------------
and of course have a hotplug handy in /sbin/hotplug
----------- /sbin/hotplug ------------
#!/bin/sh
#echo "*** hotplug 'subsystem=$1' 'MODALIAS=$MODALIAS' 'DEVPATH=$DEVPATH' ***" > /dev/kmsg;
if [ -n "$MODALIAS" -a ! -L /sys/$DEVPATH/driver ]; then
echo "*** hotplug 'subsystem=$1' 'MODALIAS=$MODALIAS' 'DEVPATH=$DEVPATH' ***" > /dev/kmsg;
modprobe -v $MODALIAS > /dev/kmsg;
fi
if [ -n "$DEVPATH" -a -d "/sys" ]; then
#echo "udevsend $1 -------------" > /dev/kmsg;
/sbin/udevsend $1;
fi
if everything goes out well you can comment out the /dev/kmesg redirection.
Oh and in my /dev I have already /dev/kmsg /dev/null /dev/console.
I am sure somebody will popup with a better script/procedure or something
but anyway here are my 2dr.
.bill
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
2005-06-16 17:10 ` Vassilis Virvilis
@ 2005-06-16 18:37 ` Greg KH
2005-06-16 19:29 ` David Brownell
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2005-06-16 18:37 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jun 16, 2005 at 05:07:49PM +0200, Pelle Svensson wrote:
>
> Hi,
>
> I would say that devfs is a clear winner compare to udev when it comes
> to it's simplicity in the setup. Just mark devfs in the kernel config and
> mount it.
Great, glad you like it, unfortunatly you are pretty much alone, and
devfs is going away in a week or so (see patches on lkml for details.)
> When it comes to udev the lack of documentation left you in a try/error
> loop.
>
> Can't somebody tell me what I need to get udev up and running from scratch.
What is missing from the current udev documentation that you have
questions about? udev setups depend on the distro you are using. What
distro are you using?
> I'm building a ARM system with 2.6 kernel from scratch so I only need the
> most basic stuff to get a 'dev' list.
And the HOWTO-udev_for_dev file wasn't enough to get you up and running?
thanks,
greg k-h
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
2005-06-16 17:10 ` Vassilis Virvilis
2005-06-16 18:37 ` Greg KH
@ 2005-06-16 19:29 ` David Brownell
2005-06-17 12:42 ` Pelle Svensson
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: David Brownell @ 2005-06-16 19:29 UTC (permalink / raw)
To: linux-hotplug
On Thursday 16 June 2005 8:07 am, Pelle Svensson wrote:
> Can't somebody tell me what I need to get udev up and running from scratch.
>
> I'm building a ARM system with 2.6 kernel from scratch so I only need the
> most basic stuff to get a 'dev' list.
The latest buildroot, plus the br2-udev-v2.patch from
http://bugs.uclibc.org/view.php?id)0
Works fine for me on a couple ARM systems, modulo hotplug not behaving
for anything yet (much less CF cards, but that's coming soon). I've
told it to use gcc 3.4.3 FWIW; also module-init-tools instead of the
stuff built-in to busybox, since I want modprobe $MODALIAS and such.
- Dave
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (2 preceding siblings ...)
2005-06-16 19:29 ` David Brownell
@ 2005-06-17 12:42 ` Pelle Svensson
2005-06-17 12:58 ` Kay Sievers
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Pelle Svensson @ 2005-06-17 12:42 UTC (permalink / raw)
To: linux-hotplug
Hi greg,
First of all, It works now!
What I missed was that sysfs has to be mounted.
There where some minor errors in rc.sysinit, start_udev and fstab.
I think it should say somthing about what has to be in place in the
HOWTO-udev_for_dev
to get udev up and running.
Something like:
----
1. Kernel has to be compiled with sysfs
2. edit /etc/fstab and add a line for sysfs
none /sys sysfs defaults 0 0
3. edit rc.sysinit and add
mount /sys
----
I don't use any dist and that is probaly the reason why some general stuff
was not
in place..
/Thanks
Pelle
>From: Greg KH <greg@kroah.com>
>To: Pelle Svensson <pelle2004@hotmail.com>
>CC: linux-hotplug-devel@lists.sourceforge.net
>Subject: Re: udev vs. devfs
>Date: Thu, 16 Jun 2005 11:37:06 -0700
>
>On Thu, Jun 16, 2005 at 05:07:49PM +0200, Pelle Svensson wrote:
> >
> > Hi,
> >
> > I would say that devfs is a clear winner compare to udev when it comes
> > to it's simplicity in the setup. Just mark devfs in the kernel config
>and
> > mount it.
>
>Great, glad you like it, unfortunatly you are pretty much alone, and
>devfs is going away in a week or so (see patches on lkml for details.)
>
> > When it comes to udev the lack of documentation left you in a try/error
> > loop.
> >
> > Can't somebody tell me what I need to get udev up and running from
>scratch.
>
>What is missing from the current udev documentation that you have
>questions about? udev setups depend on the distro you are using. What
>distro are you using?
>
> > I'm building a ARM system with 2.6 kernel from scratch so I only need
>the
> > most basic stuff to get a 'dev' list.
>
>And the HOWTO-udev_for_dev file wasn't enough to get you up and running?
>
>thanks,
>
>greg k-h
_________________________________________________________________
Nyhet! Hotmail direkt i Mobilen! http://mobile.msn.com/
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (3 preceding siblings ...)
2005-06-17 12:42 ` Pelle Svensson
@ 2005-06-17 12:58 ` Kay Sievers
2005-06-17 13:15 ` Pelle Svensson
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Kay Sievers @ 2005-06-17 12:58 UTC (permalink / raw)
To: linux-hotplug
On Fri, Jun 17, 2005 at 02:42:24PM +0200, Pelle Svensson wrote:
> First of all, It works now!
>
> What I missed was that sysfs has to be mounted.
> There where some minor errors in rc.sysinit, start_udev and fstab.
>
> I think it should say somthing about what has to be in place in the
> HOWTO-udev_for_dev
> to get udev up and running.
>
> Something like:
>
> ----
>
> 1. Kernel has to be compiled with sysfs
> 2. edit /etc/fstab and add a line for sysfs
>
> none /sys sysfs defaults 0 0
>
> 3. edit rc.sysinit and add
>
> mount /sys
>
>----
You should have looked in the README:
- Make sure sysfs is mounted. udev will figure out where sysfs is mounted,
but the traditional place for it is at /sys. You can mount it by hand
by running:
mount -t sysfs none /sys
Kay
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (4 preceding siblings ...)
2005-06-17 12:58 ` Kay Sievers
@ 2005-06-17 13:15 ` Pelle Svensson
2005-06-17 16:05 ` Greg KH
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Pelle Svensson @ 2005-06-17 13:15 UTC (permalink / raw)
To: linux-hotplug
You are right.
But on the other hand I missed when Greg guided me to HOWTP-udev_for_dev.
Doc files can be of 2 kinds short or long. When you run in to the 'wall' a
very
long basic step by step which do not leave anything out is better.
/Pelle
>From: Kay Sievers <kay.sievers@vrfy.org>
>To: Pelle Svensson <pelle2004@hotmail.com>
>CC: greg@kroah.com, linux-hotplug-devel@lists.sourceforge.net
>Subject: Re: udev vs. devfs
>Date: Fri, 17 Jun 2005 14:58:41 +0200
>
>On Fri, Jun 17, 2005 at 02:42:24PM +0200, Pelle Svensson wrote:
> > First of all, It works now!
> >
> > What I missed was that sysfs has to be mounted.
> > There where some minor errors in rc.sysinit, start_udev and fstab.
> >
> > I think it should say somthing about what has to be in place in the
> > HOWTO-udev_for_dev
> > to get udev up and running.
> >
> > Something like:
> >
> > ----
> >
> > 1. Kernel has to be compiled with sysfs
> > 2. edit /etc/fstab and add a line for sysfs
> >
> > none /sys sysfs defaults 0 0
> >
> > 3. edit rc.sysinit and add
> >
> > mount /sys
> >
> >----
>
>You should have looked in the README:
>
> - Make sure sysfs is mounted. udev will figure out where sysfs is
>mounted,
> but the traditional place for it is at /sys. You can mount it by hand
> by running:
> mount -t sysfs none /sys
>
>Kay
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
>_______________________________________________
>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
_________________________________________________________________
Nyhet! MSN Messenger i Mobiltelefonen! http://mobile.msn.com/
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (5 preceding siblings ...)
2005-06-17 13:15 ` Pelle Svensson
@ 2005-06-17 16:05 ` Greg KH
2005-06-17 19:21 ` David Brownell
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2005-06-17 16:05 UTC (permalink / raw)
To: linux-hotplug
On Fri, Jun 17, 2005 at 02:42:24PM +0200, Pelle Svensson wrote:
>
> First of all, It works now!
So is that an appology for comparing udev to devfs? :)
> What I missed was that sysfs has to be mounted.
> There where some minor errors in rc.sysinit, start_udev and fstab.
Like Kay said, the README already stated that. If you don't read all
the documentation we provide, it's a bit rude to complain...
greg k-h
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (6 preceding siblings ...)
2005-06-17 16:05 ` Greg KH
@ 2005-06-17 19:21 ` David Brownell
2005-06-17 19:26 ` David Brownell
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: David Brownell @ 2005-06-17 19:21 UTC (permalink / raw)
To: linux-hotplug
On Thursday 16 June 2005 10:10 am, Vassilis Virvilis wrote:
> ...
> I am sure somebody will popup with a better script/procedure or something
> but anyway here are my 2dr.
It hit the spot for me, pretty much. Here are my updated versions;
debug stuff removed (for some reason it wedged), added support for
some PCMCIA and MMC special cases, and a bit of doc. So it's worked
for me hotplugging USB, PCMCIA [1], and MMC ... though I've not yet
tried hooking in code to mount those removable flash cards.
The PCMCIA hotplug is using the patches, now sitting in the MM tree,
that will likely be merged early in 2.6.13 ... if they provided
the "modalias" attribute, then "coldplug" wouldn't even need that
helper program from the new pcmcia utils package [2].
I think we need a stripped down and turnkey hotplug-and-udev setup
starting real soon now, at least for use with embedded hardware,
and these scripts could be a reasonable start.
- Dave
[1] Though CompactFlash memory cards wouldn't bind properly through
the IDE stack. Seems to be an issue with the new PCMCIA hotplug
stuff, since non-memory CF cards worked fine.
[2] http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (7 preceding siblings ...)
2005-06-17 19:21 ` David Brownell
@ 2005-06-17 19:26 ` David Brownell
2005-06-20 12:52 ` Pelle Svensson
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: David Brownell @ 2005-06-17 19:26 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
On Friday 17 June 2005 12:21 pm, David Brownell wrote:
> On Thursday 16 June 2005 10:10 am, Vassilis Virvilis wrote:
> > ...
> > I am sure somebody will popup with a better script/procedure or something
> > but anyway here are my 2dr.
>
> It hit the spot for me, pretty much. Here are my updated versions;
>
Whoops, HERE they are.
[-- Attachment #2: coldplug --]
[-- Type: text/plain, Size: 1040 bytes --]
#!/bin/ash
#
# "coldplug" ensures every hardware device present has its driver loaded,
# even if its hotplug event was ignored since it was too early in system
# startup for hotplug processing to work. Loading the driver will cause
# another hotplug event that will lead to /dev node creation.
#
# Run this during system startup shortly after /dev has been initialized
# using udevstart.
if [ ! -d /sys/devices ]
then
exit 1
fi
# "new style" kernel hotplug has module-init-tools do the thinking
cd /sys/devices
for DIR in $(find . -type d)
do
if [ -f $DIR/modalias -a ! -f $DIR/driver ]
then
modprobe -q $(cat $DIR/modalias)
fi
done
# FIXME will MODULE_ALIAS("name.*") work for "name.3" devices?
cd /sys/devices/platform
for DEV in *
do
if [ ! -L $DEV/driver ]
then
# some platform drivers will need a MODULE_ALIAS()
modprobe -q $DEV
fi
done
# REVISIT pcmcia doesn't yet have "modalias" files
if [ -d /sys/bus/pcmcia/devices ]
then
cd /sys/bus/pcmcia/devices
for F in *
do
modprobe -q $(pcmcia-modalias $F)
done
fi
[-- Attachment #3: hotplug --]
[-- Type: text/plain, Size: 806 bytes --]
#!/bin/ash
#
# "hotplug" initializes devices ... hardware drivers get modprobed and
# create class devices. then later udev handles /dev node creation and
# invokes programs that make userspace aware of the new device node.
#
# install as /sbin/hotplug
if [ ! -d /sys ]
then
exit 1
fi
cd /sys
if [ "$ACTION" = "add" -a "$SUBSYSTEM" = "mmc" ]
then
# MMC doesn't support modalias yet, but mmc_block is
# the only useful option until Linux gets SDIO support.
MODALIAS=mmc_block
fi
if [ "$ACTION" = "add" -a -n "$MODALIAS" -a ! -L $DEVPATH/driver ]
then
# REVISIT: pcmcia currently needs special cases here,
# for non-static mapped sockets and many CF memory cards.
# most important subsystems now have $MODALIAS support:
modprobe -q $MODALIAS
fi
if [ -n "$DEVPATH" ]
then
/sbin/udevsend $1
fi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (8 preceding siblings ...)
2005-06-17 19:26 ` David Brownell
@ 2005-06-20 12:52 ` Pelle Svensson
2005-06-23 16:59 ` Vassilis Virvilis
2005-06-28 11:24 ` Vassilis Virvilis
11 siblings, 0 replies; 13+ messages in thread
From: Pelle Svensson @ 2005-06-20 12:52 UTC (permalink / raw)
To: linux-hotplug
Hi,
Not I'm not complaning, just say that for me it was more
complicated to get udev up and working than devfs.
Thanks for your help and a good program!
/Pelle
>From: Greg KH <greg@kroah.com>
>To: Pelle Svensson <pelle2004@hotmail.com>
>CC: linux-hotplug-devel@lists.sourceforge.net
>Subject: Re: udev vs. devfs
>Date: Fri, 17 Jun 2005 09:05:11 -0700
>
>On Fri, Jun 17, 2005 at 02:42:24PM +0200, Pelle Svensson wrote:
> >
> > First of all, It works now!
>
>So is that an appology for comparing udev to devfs? :)
>
> > What I missed was that sysfs has to be mounted.
> > There where some minor errors in rc.sysinit, start_udev and fstab.
>
>Like Kay said, the README already stated that. If you don't read all
>the documentation we provide, it's a bit rude to complain...
>
>greg k-h
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
>_______________________________________________
>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
_________________________________________________________________
Chatt: Träffa nya nätkompisar på Habbo Hotel
http://habbohotel.msn.se/habbo/sv/channelizer
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (9 preceding siblings ...)
2005-06-20 12:52 ` Pelle Svensson
@ 2005-06-23 16:59 ` Vassilis Virvilis
2005-06-28 11:24 ` Vassilis Virvilis
11 siblings, 0 replies; 13+ messages in thread
From: Vassilis Virvilis @ 2005-06-23 16:59 UTC (permalink / raw)
To: linux-hotplug
David Brownell wrote:
> On Friday 17 June 2005 12:21 pm, David Brownell wrote:
>
>>On Thursday 16 June 2005 10:10 am, Vassilis Virvilis wrote:
>>
>>>...
>>>I am sure somebody will popup with a better script/procedure or something
>>>but anyway here are my 2dr.
>>
>>It hit the spot for me, pretty much. Here are my updated versions;
>>
David,
Sorry for the long delay and glad that worked for you.
Some questions though...
>
> ------------------------------------------------------------------------
>
> #!/bin/ash
> #
> # "coldplug" ensures every hardware device present has its driver loaded,
> # even if its hotplug event was ignored since it was too early in system
> # startup for hotplug processing to work. Loading the driver will cause
> # another hotplug event that will lead to /dev node creation.
> #
> # Run this during system startup shortly after /dev has been initialized
> # using udevstart.
>
> if [ ! -d /sys/devices ]
> then
> exit 1
> fi
good.
>
> # "new style" kernel hotplug has module-init-tools do the thinking
> cd /sys/devices
> for DIR in $(find . -type d)
> do
> if [ -f $DIR/modalias -a ! -f $DIR/driver ]
> then
> modprobe -q $(cat $DIR/modalias)
> fi
> done
this I don't like. After demorgan that reads
if [ ! -f $DIR/modalias -o -f $DIR/driver ]
modprobe -q $(cat $DIR/modalias)
fi
which seems wrong
On other complain. I am using initramfs and klibc. So `find` it's out
of the question for me at least. I am open to suggestions.
Nop ls `is` a don't have either. If you have any ideas I am all
ears...
>
> # FIXME will MODULE_ALIAS("name.*") work for "name.3" devices?
> cd /sys/devices/platform
> for DEV in *
> do
> if [ ! -L $DEV/driver ]
> then
> # some platform drivers will need a MODULE_ALIAS()
> modprobe -q $DEV
> fi
> done
Doh! so that's why the damn thing was not autoloading my mouse.
It is under /sys/devices/platform/i8042/. Good catch!!!
Question: Doesn't catch it through the proper directory traversing?
[snip pcmcia]
> ------------------------------------------------------------------------
>
> #!/bin/ash
> #
> # "hotplug" initializes devices ... hardware drivers get modprobed and
> # create class devices. then later udev handles /dev node creation and
> # invokes programs that make userspace aware of the new device node.
> #
> # install as /sbin/hotplug
>
> if [ ! -d /sys ]
> then
> exit 1
> fi
> cd /sys
>
> if [ "$ACTION" = "add" -a "$SUBSYSTEM" = "mmc" ]
> then
> # MMC doesn't support modalias yet, but mmc_block is
> # the only useful option until Linux gets SDIO support.
> MODALIAS=mmc_block
> fi
>
> if [ "$ACTION" = "add" -a -n "$MODALIAS" -a ! -L $DEVPATH/driver ]
> then
> # REVISIT: pcmcia currently needs special cases here,
> # for non-static mapped sockets and many CF memory cards.
>
> # most important subsystems now have $MODALIAS support:
> modprobe -q $MODALIAS
> fi
>
> if [ -n "$DEVPATH" ]
> then
> /sbin/udevsend $1
> fi
Good grace! It never occured to me to only run modpobe only if ACTION = add.
MMC is memory card? with IDE interface? Should work, no? Do you
have/had problems with them?
.bill
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: udev vs. devfs
2005-06-16 15:07 udev vs. devfs Pelle Svensson
` (10 preceding siblings ...)
2005-06-23 16:59 ` Vassilis Virvilis
@ 2005-06-28 11:24 ` Vassilis Virvilis
11 siblings, 0 replies; 13+ messages in thread
From: Vassilis Virvilis @ 2005-06-28 11:24 UTC (permalink / raw)
To: linux-hotplug
david-b@pacbell.net wrote:
> That transform is wrong, yes, but the original was right.
Indeed. The transform was wrong. I had it right but I copied
it wrong. Still I can't understand it however (the purpose of the test).
> Yet you have "ash" and "modprobe"?? "find" is just a busybox option.
> If you must, you can implement a recursive directory traversal with
> recursive shell functions and "echo".
>
Yes. It's a klibc environment. ash comes with it, modprobe ported to klibc.
Patches are on klibc mailing list.
.bill
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-06-28 11:24 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-16 15:07 udev vs. devfs Pelle Svensson
2005-06-16 17:10 ` Vassilis Virvilis
2005-06-16 18:37 ` Greg KH
2005-06-16 19:29 ` David Brownell
2005-06-17 12:42 ` Pelle Svensson
2005-06-17 12:58 ` Kay Sievers
2005-06-17 13:15 ` Pelle Svensson
2005-06-17 16:05 ` Greg KH
2005-06-17 19:21 ` David Brownell
2005-06-17 19:26 ` David Brownell
2005-06-20 12:52 ` Pelle Svensson
2005-06-23 16:59 ` Vassilis Virvilis
2005-06-28 11:24 ` Vassilis Virvilis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).