FW: [opensuse-kernel] Creating device nodes for kernel driver
Hi Greg
I wrote a kernel device driver for a special purpose PCI framegrapper device which I maintain using a kmp rpm-package.
Great, why not work to get it upstream into the main kernel.org repo so that all distros and users can get to it?
Well, the current hardware is based on a prototype xilinx FPGA implementation and therefore cannot be bought by anyone sofar. --> very limited use to the generel public currently and I am guessing that the kernel.org people will refrain to accept a driver they cannot get hardware for. Otherwise I am very much willing to provide source (there is no special magic nor ip involved imho). In addition I want to get rid of the obvious flaws like the creation of device nodes from user space setup script before getting fried on lkml. This is actually the reason why I am asking on this list than on lkml.
Sofar I am grep'ing /proc/devices for the major number during startup and create the device nodes at startup.
Ick, no, that's not good.
Yes, this is what I was expecting.
The documentation I found on the web and in /usr/src/linux/Documentations seems to be outdated, incomplete or contradicting.
It shouldn't be, have you read the book, Linux Device Drivers, 3rd edition, that says how to do this? It's a bit out of date, but you will get the basic idea.
I have the outdated 2nd edition to my disposal and soon discovered that it too much outdated for this purpose.
Hint, use a misc device if you want an easy way to do this automatically from your driver.
Thanks for the hint! It is appreciated. I will now firstly hunt down the 3rd edition of the book
Have a pointer to your source code anywhere?
Do you want it via Email? Mit freundlichen Grüßen / Best regards Martin Konold Robert Bosch GmbH Automotive Electronics Postfach 13 42 72703 Reutlingen GERMANY www.bosch.com Tel. +49 7121 35 3322 Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000; Aufsichtsratsvorsitzender: Hermann Scholl; Geschäftsführung: Franz Fehrenbach, Siegfried Dais; Stefan Asenkerschbaumer, Bernd Bohr, Rudolf Colm, Volkmar Denner, Wolfgang Malchow, Peter Marks, Uwe Raschke, Wolf-Henning Scheider, Peter Tyroller -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Tue, Jul 19, 2011 at 02:05:15PM +0200, EXTERNAL Konold Martin (Firma, RtP2/TEF72) wrote:
Hi Greg
I wrote a kernel device driver for a special purpose PCI framegrapper device which I maintain using a kmp rpm-package.
Great, why not work to get it upstream into the main kernel.org repo so that all distros and users can get to it?
Well, the current hardware is based on a prototype xilinx FPGA implementation and therefore cannot be bought by anyone sofar.
That doesn't matter, we take drivers for anything, even hardware that no one else can get.
--> very limited use to the generel public currently and I am guessing that the kernel.org people will refrain to accept a driver they cannot get hardware for.
Nope, we do.
Otherwise I am very much willing to provide source (there is no special magic nor ip involved imho). In addition I want to get rid of the obvious flaws like the creation of device nodes from user space setup script before getting fried on lkml. This is actually the reason why I am asking on this list than on lkml.
Try the driver devel mailing list from the linux driver project at devel@driverdev.osuosl.org as it is much more "friendly". Odds are you can get your driver into the staging tree now, and we can help clean it up there and then get it moved into the "correct" part of the kernel after time.
Sofar I am grep'ing /proc/devices for the major number during startup and create the device nodes at startup.
Ick, no, that's not good.
Yes, this is what I was expecting.
The documentation I found on the web and in /usr/src/linux/Documentations seems to be outdated, incomplete or contradicting.
It shouldn't be, have you read the book, Linux Device Drivers, 3rd edition, that says how to do this? It's a bit out of date, but you will get the basic idea.
I have the outdated 2nd edition to my disposal and soon discovered that it too much outdated for this purpose.
The 3rd is free online, the 2nd is _very_ out of date.
Hint, use a misc device if you want an easy way to do this automatically from your driver.
Thanks for the hint! It is appreciated.
I will now firstly hunt down the 3rd edition of the book
Have a pointer to your source code anywhere?
Do you want it via Email?
Sure. Also, why are you using a character device node and not an existing class of devices (like the v4l2 layer for a video device)? for this type of driver? thanks, greg k-h -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (2)
-
EXTERNAL Konold Martin (Firma, RtP2/TEF72)
-
Greg KH