Re: Hardware Prob0r

On Thu, 30 Jan 2003, David Schleef wrote:

> On Mon, Jan 27, 2003 at 12:03:45PM -0500, Calin A. Culianu wrote:
> > As friendly as a menu-driven curses dialog box is, an better approach is
> > to first try and probe hardware by PCI-ids.  I could scan the PCI bus
> > (which means that ISA boards aren't probeable) and use the pci-id to try
> > and auto-load the module (then run comedi_config automatically with the
> > proper board config string).
>
> This is a (mostly) solved problem that is handled by the install
> process of most distributions.  The only thing left to do is adding
> Comedi-specific lines to /etc/modules.conf.
>
> I'm not too familiar with autodetection packages, but one method
> uses /lib/modules/$(uname -r)/modules.pcimap to map PCI ids to
> module names.  All Comedi drivers register their PCI ids in this
> manner.  (This only works with Linux 2.4, though.)

:)  This is my intented approach. After doing more research on this I
realized this as well.  I am going to rely on this file as a master list
of all comedi pci id's.

>
> > 1) Apart from grepping through the .c files in the drivers/ directory is
> > there a complete pci-id list for comedi somewhere?  If not I will compile
> > such a list and if I do does anyone else need it?
>
> Periodically, I synchronize with the /usr/share/misc/pci.ids list
> that is installed as part of most distros.  I haven't done this
> recently, though.
>

It's not too big a deal as its possible to compute those values at runtime
from a combination of modules.pcimap and /proc/pci and
/proc/bus/pci/devices.

> > 2) Setting PCI-ID's aside for a moment, is there a more up-to-date version
> > of the hardware database text file?  The one you get when you click on
> > http://www.comedi.org/hardware.php ?  I noticed this list is incomplete
> > (for instance _my_ driver isn't there :)  ).  I heard that file is
> > auto-generated by reading some meta information from the top of each .c
> > file.. is that script around anywhere?
>
> 'make drivers.txt' creates Documentation/comedi/drivers.txt and
> devices.txt.
>

Yep.  I discovered this too but thanks for the info anyway.


Now what to do about ISA devices??  :/  This is a solvable problem too
since linux can kind of tell you about all the isapnp devices, but how do
I automate scanning all the drivers to figure out which drivers go with
which devices.  Worse still, each driver expects a config string that can
be totally irregular from one driver to the next.  I haven't thought about
this at all yet.. but how to detect isapnp and map them to the right
driver?

-Calin

Received on 2003-01-31Z00:55:53