* Question on how to get custom kernel module to work with udev
@ 2005-06-03 13:24 Terry Barnaby
2005-06-03 13:33 ` Terry Barnaby
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Terry Barnaby @ 2005-06-03 13:24 UTC (permalink / raw)
To: linux-hotplug
Hi,
I have a custom kernel device driver module for a PCI hardware device that I would like
to integrate with UDEV to get UDEV to generate the /dev nodes.
I am using Fedora Core 3.
I have not been able to make this work so far, so any ideas ?
When the device is loaded /sbin/hotplug is called with the environment:
export SUBSYSTEM=drivers
export DEVPATH=/bus/pci/drivers/admxrc2
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
export ACTIONd
export PWD=/
export SHLVL=1
export HOME=/
export SEQNUMx5
export _=/bin/env
I have added a file /etc/udev/rules.d/40-admxrc.rules with the contents:
KERNEL="admxrc2", NAME="admxrcii%k"
SYSFS{vendor}="0x4144", NAME="admxrciii%k"
The two line are alternate versions for testing.
I have tried setting the udev config parameter "udev_log" to "yes" and
do get logs when other drivers are loaded. However when I do a
"rmmod admxrc2; modprobe admxrc2" no log information is printed.
1. Is there a way to get more debug information out of udev ?
2. Is there some special thing I need to do in the device module ?
3. Is there something wround with the configuration ?
Cheers
Terry
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
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] 9+ messages in thread
* Re: Question on how to get custom kernel module to work with udev
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
@ 2005-06-03 13:33 ` Terry Barnaby
2005-06-03 20:20 ` Kay Sievers
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Terry Barnaby @ 2005-06-03 13:33 UTC (permalink / raw)
To: linux-hotplug
Terry Barnaby wrote:
> Hi,
>
> I have a custom kernel device driver module for a PCI hardware device
> that I would like
> to integrate with UDEV to get UDEV to generate the /dev nodes.
>
> I am using Fedora Core 3.
> I have not been able to make this work so far, so any ideas ?
>
> When the device is loaded /sbin/hotplug is called with the environment:
>
> export SUBSYSTEM=drivers
> export DEVPATH=/bus/pci/drivers/admxrc2
> export PATH=/sbin:/bin:/usr/sbin:/usr/bin
> export ACTIONd
> export PWD=/
> export SHLVL=1
> export HOME=/
> export SEQNUMx5
> export _=/bin/env
>
> I have added a file /etc/udev/rules.d/40-admxrc.rules with the contents:
>
> KERNEL="admxrc2", NAME="admxrcii%k"
> SYSFS{vendor}="0x4144", NAME="admxrciii%k"
>
> The two line are alternate versions for testing.
>
> I have tried setting the udev config parameter "udev_log" to "yes" and
> do get logs when other drivers are loaded. However when I do a
> "rmmod admxrc2; modprobe admxrc2" no log information is printed.
>
> 1. Is there a way to get more debug information out of udev ?
> 2. Is there some special thing I need to do in the device module ?
> 3. Is there something wround with the configuration ?
>
> Cheers
>
> Terry
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> 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
Some more information on this:
I have enabled debugiing in the udev sources and now see an error displayed
in the /var/log/messages file:
Jun 3 14:31:07 beam1 udev[15275]: main: looking at '/bus/pci/drivers/admxrc2'
Jun 3 14:31:07 beam1 udev[15275]: main: not a block or class device
This seems to sugest that I need to do something specific in the device
driver module to get udev to work ???
Terry
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
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] 9+ messages in thread
* Re: Question on how to get custom kernel module to work with udev
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
2005-06-03 13:33 ` Terry Barnaby
@ 2005-06-03 20:20 ` Kay Sievers
2005-06-04 6:00 ` Terry Barnaby
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2005-06-03 20:20 UTC (permalink / raw)
To: linux-hotplug
On Fri, Jun 03, 2005 at 02:24:44PM +0100, Terry Barnaby wrote:
> Hi,
>
> I have a custom kernel device driver module for a PCI hardware device that
> I would like
> to integrate with UDEV to get UDEV to generate the /dev nodes.
Is the source of the driver available?
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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] 9+ messages in thread
* Re: Question on how to get custom kernel module to work with udev
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
2005-06-03 13:33 ` Terry Barnaby
2005-06-03 20:20 ` Kay Sievers
@ 2005-06-04 6:00 ` Terry Barnaby
2005-06-04 6:30 ` Greg KH
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Terry Barnaby @ 2005-06-04 6:00 UTC (permalink / raw)
To: linux-hotplug
Kay Sievers wrote:
> On Fri, Jun 03, 2005 at 02:24:44PM +0100, Terry Barnaby wrote:
>
>>Hi,
>>
>>I have a custom kernel device driver module for a PCI hardware device that
>>I would like
>>to integrate with UDEV to get UDEV to generate the /dev nodes.
>
>
> Is the source of the driver available?
>
> Kay
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
> a projector? How fast can you ride your desk chair down the office luge track?
> If you want to score the big prize, get to know the little guy.
> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
> _______________________________________________
> 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
Hi Kay,
Thanks for the response.
Yes, the source code is available, and I have expierience in
writing Linux device drivers, but I have not been able to
find any information on what a device driver needs to do
to get udev to work.
Does it need to override the default set up of sysfs ?
Terry
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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] 9+ messages in thread
* Re: Question on how to get custom kernel module to work with udev
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
` (2 preceding siblings ...)
2005-06-04 6:00 ` Terry Barnaby
@ 2005-06-04 6:30 ` Greg KH
2005-06-04 6:32 ` Greg KH
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2005-06-04 6:30 UTC (permalink / raw)
To: linux-hotplug
On Sat, Jun 04, 2005 at 07:00:12AM +0100, Terry Barnaby wrote:
> Yes, the source code is available, and I have expierience in
> writing Linux device drivers, but I have not been able to
> find any information on what a device driver needs to do
> to get udev to work.
> Does it need to override the default set up of sysfs ?
No, you need to provide the major/minor of your device through sysfs.
Examples of how to do this are in the Linux Device Drivers book, third
edition, Chapter 14. It's online for free if you don't want to buy it
at:
http://lwn.net/Kernel/LDD3/
If you have further questions after reading that, let us know.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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] 9+ messages in thread
* Re: Question on how to get custom kernel module to work with udev
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
` (3 preceding siblings ...)
2005-06-04 6:30 ` Greg KH
@ 2005-06-04 6:32 ` Greg KH
2005-06-04 7:06 ` Terry Barnaby
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2005-06-04 6:32 UTC (permalink / raw)
To: linux-hotplug
On Fri, Jun 03, 2005 at 11:30:26PM -0700, Greg KH wrote:
> On Sat, Jun 04, 2005 at 07:00:12AM +0100, Terry Barnaby wrote:
> > Yes, the source code is available, and I have expierience in
> > writing Linux device drivers, but I have not been able to
> > find any information on what a device driver needs to do
> > to get udev to work.
> > Does it need to override the default set up of sysfs ?
>
> No, you need to provide the major/minor of your device through sysfs.
> Examples of how to do this are in the Linux Device Drivers book, third
> edition, Chapter 14.
Page 404 is what you want to look at, to be specific.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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] 9+ messages in thread
* Re: Question on how to get custom kernel module to work with udev
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
` (4 preceding siblings ...)
2005-06-04 6:32 ` Greg KH
@ 2005-06-04 7:06 ` Terry Barnaby
2005-06-04 7:36 ` Greg KH
2005-06-04 8:14 ` Terry Barnaby
7 siblings, 0 replies; 9+ messages in thread
From: Terry Barnaby @ 2005-06-04 7:06 UTC (permalink / raw)
To: linux-hotplug
Hi Greg,
Thanks very much for this, this looks exactly the
information I need.
Maybe a link to this information for device driver
writers would be useful on the main udev.html page ?
Cheers
Terry
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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] 9+ messages in thread
* Re: Question on how to get custom kernel module to work with udev
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
` (5 preceding siblings ...)
2005-06-04 7:06 ` Terry Barnaby
@ 2005-06-04 7:36 ` Greg KH
2005-06-04 8:14 ` Terry Barnaby
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2005-06-04 7:36 UTC (permalink / raw)
To: linux-hotplug
On Sat, Jun 04, 2005 at 08:06:33AM +0100, Terry Barnaby wrote:
>
> Maybe a link to this information for device driver
> writers would be useful on the main udev.html page ?
What, don't all device driver writers already have a copy of this book?
:)
Yeah, it's also been described in the archives of this list and lkml a
few times too, but sure if you have a suggested change to the .html
file, I'll consider it.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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] 9+ messages in thread
* Re: Question on how to get custom kernel module to work with udev
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
` (6 preceding siblings ...)
2005-06-04 7:36 ` Greg KH
@ 2005-06-04 8:14 ` Terry Barnaby
7 siblings, 0 replies; 9+ messages in thread
From: Terry Barnaby @ 2005-06-04 8:14 UTC (permalink / raw)
To: linux-hotplug
Greg KH wrote:
> On Sat, Jun 04, 2005 at 08:06:33AM +0100, Terry Barnaby wrote:
>
>>Maybe a link to this information for device driver
>>writers would be useful on the main udev.html page ?
>
>
> What, don't all device driver writers already have a copy of this book?
> :)
>
> Yeah, it's also been described in the archives of this list and lkml a
> few times too, but sure if you have a suggested change to the .html
> file, I'll consider it.
>
> thanks,
>
> greg k-h
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
> a projector? How fast can you ride your desk chair down the office luge track?
> If you want to score the big prize, get to know the little guy.
> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
> _______________________________________________
> 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
All my device driver info and that I could find on the net was
out of date.
A suggested change to the udev.html file is:
In the "Documentation Section" a link to "http://lwn.net/Kernel/LDD3/"
with text: "Udev information for kernel device driver writers is in
the Linux Device Drivers, Third Edition book".
Terry
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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] 9+ messages in thread
end of thread, other threads:[~2005-06-04 8:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-03 13:24 Question on how to get custom kernel module to work with udev Terry Barnaby
2005-06-03 13:33 ` Terry Barnaby
2005-06-03 20:20 ` Kay Sievers
2005-06-04 6:00 ` Terry Barnaby
2005-06-04 6:30 ` Greg KH
2005-06-04 6:32 ` Greg KH
2005-06-04 7:06 ` Terry Barnaby
2005-06-04 7:36 ` Greg KH
2005-06-04 8:14 ` Terry Barnaby
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).