[RFC] [PATCH] Automatic driver detection enablement - updated
Michael_E_Brown at Dell.com
Michael_E_Brown at Dell.com
Fri Feb 16 11:50:08 CST 2007
Resending without attachment to see if this gets around the spam
filtering....
Updated version.
This version adds version tags to the module provides that match the
module modinfo version. New output looks like this:
[michael_e_brown at mdomsch-pe2850 dkms]$ rpm -qp --provides
/usr/src/redhat/RPMS/noarch/megaraid_sas-v00.00.03.06-1dkms.noarch.rpm
kmod-alias(pci:v00001000d00000060sv*sd*bc*sc*i*) = 00.00.03.06
kmod-alias(pci:v00001000d00000411sv*sd*bc*sc*i*) = 00.00.03.06
kmod-alias(pci:v00001000d00000413sv*sd*bc*sc*i*) = 00.00.03.06
kmod-alias(pci:v00001028d00000015sv*sd*bc*sc*i*) = 00.00.03.06
megaraid_sas = v00.00.03.06-1dkms
--
Michael
> -----Original Message-----
> From: Brown, Michael E
> Sent: Thursday, February 15, 2007 6:07 PM
> To: dkms-devel-Lists
> Subject: [RFC] [PATCH] Automatic driver detection enablement
>
>
> Problem statement:
> Given PCI/USB ID, it is possible to find out which
> installed kernel driver to use using the modalias facility of
> udev. But, if the current kernel does not have the
> appropriate driver installed already, it is not possible to
> find out which possible DKMS, KMP, or other possible package
> would be appropriate to install to drive this hardware.
>
> Proposed solution:
> When building a driver package, add "Provides: XXXXX"
> that could be used to identify which driver to download and
> install. In this case, I have chosen a format for the
> Provides info that matches the format of the "alias" line
> that is output from the modinfo command. This is the same
> information that is used by udev.
>
> Output:
> When this patch is used, it automatically adds
> "Provides:" tags to built DKMS rpms with no required changes
> to the spec file. An example of this output is given at the
> end of this email.
>
> Use Case:
> To make this useful, I intend to write a small script
> that does the equivalent of "yum list all kmod-alias(*)" and
> then match each kmod-alias against PCI devices present to
> figure out which packages are needed. This work is underway
> and will become part of firmware-tools when complete.
>
> TODO:
> -- Need to detect that modinfo is recent enough version.
> -- possibly run original find-provides script, although
> I am not sure it is necessary. None of the packages I
> examined needed it.
> --
> Michael
>
>
> [michael_e_brown at mdomsch-pe2850 dkms]$ rpm -qp --provides
> /usr/src/redhat/RPMS/noarch/megaraid_sas-v00.00.03.06-1dkms.noarch.rpm
> kmod-alias(pci:v00001000d00000060sv*sd*bc*sc*i*)
> kmod-alias(pci:v00001000d00000411sv*sd*bc*sc*i*)
> kmod-alias(pci:v00001000d00000413sv*sd*bc*sc*i*)
> kmod-alias(pci:v00001028d00000015sv*sd*bc*sc*i*)
> megaraid_sas = v00.00.03.06-1dkms
>
> [michael_e_brown at mdomsch-pe2850 dkms]$ modinfo
> /var/lib/dkms/megaraid_sas/v00.00.03.06/2.6.19-1.2895.fc6/x86_
> 64/module/megaraid_sas.ko
> filename:
> /var/lib/dkms/megaraid_sas/v00.00.03.06/2.6.19-1.2895.fc6/x86_
> 64/module/megaraid_sas.ko
> description: LSI Logic MegaRAID SAS Driver
> author: sreenivas.bagalkote at lsil.com
> version: 00.00.03.06
> license: GPL
> srcversion: 20316EF80F8B7E90CF78F6A
> alias: pci:v00001028d00000015sv*sd*bc*sc*i*
> alias: pci:v00001000d00000413sv*sd*bc*sc*i*
> alias: pci:v00001000d00000060sv*sd*bc*sc*i*
> alias: pci:v00001000d00000411sv*sd*bc*sc*i*
> depends: scsi_mod
> vermagic: 2.6.19-1.2895.fc6 SMP mod_unload
>
>
>
>
More information about the DKMS-devel
mailing list