Re: [PCI] building PCI IDs/drivers DB from Linux kernel sources

From: Tim Waugh (twaugh@redhat.com)
Date: Mon Jul 30 2001 - 05:11:33 EST


On Mon, Jul 30, 2001 at 11:33:19AM +0200, Thierry Laronde wrote:

> I have decided to write a script (you will find all the stuff attached)
> parsing the Linux kernel sources in order to do that.

For the MODULE_DEVICE_TABLE case, isn't it less fragile to parse the
binary modules?

If there were a program to spit out the MODULE_DEVICE_TABLE in a
format easily parseable by scripts, it would be great; is there such a
program already?

> Driver names:
>
> I try to match the filename processed (minus the suffix) against entries in
> the Makefile, and even try a substring against the Makefile in order to
> guess the correct driver name. When everything fails, the log file indicates
> the problem, and I have built a "drivers_aliases" giving the correct name
> for these files.

Again for the MODULE_DEVICE_TABLE case, there is nothing to guess.

> May I suggest some possible tracks?
>
> * Use of macro definitions for magic numbers
[...]
> * Define the driver name in the file
[...]
> * Define the class name in the file too
[...]

None of this is needed if people just use the MODULE_DEVICE_TABLE
mechanism that is already provided.

Tim.
*/



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:43 EST