[RFC] Automatic driver package resolution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have cross-posted this message to the three lists where I think this
is extremely relevant. 


Problem statement:
	Given a new machine, it is not possible to automatically
determine which kernel driver RPMs are needed to drive hardware on that
machine.

	For example, my new laptop has the Intel IPW 3945 wireless card.
If I, as a novice user, do not specifically know that I need to
configure livna/freshrpms/etc and manually "yum install ipw3945 (and
friends)", I cannot get my wireless working.

	This proposal outlines a method to create a yum utility that can
do automatic hardware detection and automatically install the correct
set of kernel modules for your current system. The purpose of this
proposal is to arrive at a consensus that something like this is
acceptable to the yum/dkms/driver-updates people so it can become part
of future distributions out of the box (and not some addon thing that is
forever-maintained out-of-tree.)


Solution Summary:
	
	The solution consists of two parts: 1) a specially-formatted
"Provides:" tag on all hardware driver RPMS, and 2) a small utility that
can match this new tag with the local hardware to pull down the correct
RPM via yum.


"Provides:" Tag:
	All kernel driver RPMs contain kernel driver module
(/lib/modules/.../*.ko) files. This is pretty much a given. With these
driver modules, you can run the "modinfo" program to extract data from
them. For all PCI and USB drivers, the module contains "alias" lines
which have the PCI ID or USB ID of the devices which this module
supports. This proposal would extract these alias lines and, after
formatting them, add them to the RPM as "Provides:" tags. This is done
automatically by a "find-provides" extension script (attached -
find-provides.modalias).
      Proposal (long-term): Add the attached find-provides.modinfo to
the distribution RPM macro set.
	Proposal (short-term):  Add the attached find-provides.modinfo
script to the SOURCES of RPM DKMS or KMP packages and override the
builtin RPM %{__find_provides} script


Yum utility:
	This part has not been completed, but I am working on a
prototype. It will be called "find-hardware-driver-packages". The basic
conceptual outline is that it would do a "yum list all modalias*". Then
it would find matches in that list against the
/sys/devices/{pci|usb}*/$device/modalias file using the built-in
globbing present in the modalias tag. It would find a candidate list of
packages that with matching modaliases. It could then narrow this list
down by matching ksym() provides tags against the currently running and
currently installed kernels to install the correct list of driver RPMs. 
	

	I am looking for feedback. I believe that this method is
conceptually very simple, and yet it should be robust enough to handle
the situations I can envision. I would like to produce something that
will work for Fedora, Red Hat Enterprise, and SUSE, at the least. I
believe that this concept can also be extended to work with the
Debian-based distributions.

--
Michael Brown
Linux OS Engineering
Dell Inc

Attachment: find-provides.modalias
Description: find-provides.modalias

_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxxxxx
https://lists.dulug.duke.edu/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux