[elrepo] Package for detecting hardware?

Phil Perry phil at elrepo.org
Fri Jun 28 08:55:12 EDT 2013


On 25/06/13 15:27, David Carollo wrote:
> I have done a semester of perl scripting, so I shall try my best.
> On Jun 25, 2013 6:24 AM, "Ljubomir Ljubojevic" <centos at plnet.rs> wrote:
>

Yes, this would make a very nice little project for someone willing to 
undertake it. At a fundamental level, I guess it's simply a case of 
parsing each device against a list of device IDs from a list of 
supported devices for each driver.

I would break it up into different device classes - e.g, get the device 
IDs of video devices and look up against the list of supported video 
drivers, then get the network device IDs and look those up against a 
list of network drivers etc rather than parsing ALL device IDs against 
ALL drivers (IOW it's safe to assume no network driver is going to 
support a video device etc, and vice versa).

This could be done in C as I did for nvidia-detect or just as easily in 
a language such as perl. I chose C for nvidia-detect purely through 
personal preference as opposed to any technical reasons. I don't know 
much perl so wouldn't be able to help much there.

The code for nvidia-detect can be found here:

https://github.com/elrepo/packages/tree/master/nvidia-detect

Once the initial parsing routines are written, the big ongoing work 
would be maintaining a list (database) of device IDs that each driver 
supports as support for new devices is added to a driver (or support for 
old devices removed) and/or new drivers are added to the repository. At 
the simplest level this can be extracted from the module by parsing the 
alias info from the output of modinfo. In other cases the info needs to 
be obtained from the OEM vendor (as was the case with nvidia). This 
isn't a task I would wish upon one person and thus is ideal for 
community participation as many eyes/hands lighten the load. This is 
probably the main reason we (elrepo devs) haven't undertaken such a 
project to date.

Any code should be submitted and maintained on elrepo's GitHub 
repository here:

https://github.com/elrepo/packages/

which will allow others to easily review/contribute to such a project.

The elrepo-devel list is probably the best place for more detailed 
development discussions but here on the main list is fine for proposing 
such ideas and getting the ball rolling, and probably likely to gain 
more traction due to it's wider subscriber base.

Phil


>> Hi.
>>
>> I was wondering if you guys could create a package/script that would scan
>> the hardware and compare DeviceID's and offer command to install them, like
>> "to install those drivers run this: 'yum install kmod-***'"
>>
>> I see nvidia-detect works in similar way. It would greatly help for cases
>> where there is no internet but there is a local copy of packages
>> (LiveDVD's, repo from file://), not to mention making life easier and
>> CentOS more attractive for newbies.
>>
>> If there is a hardware that is not recognized, it could show DeviceID.
>>
>> On top of all of that, package might recognize divers that exist in
>> kernel-lt and kernel-ml, with suggestion that that might solve their
>> problem (with a warning notice about not being offical CentOS kernel or
>> what ever).
>>
>> Is there a chance for something like that?
>>
>> --
>> Ljubomir Ljubojevic
>> (Love is in the Air)
>> PL Computers
>> Serbia, Europe
>>
>> StarOS, Mikrotik and CentOS/RHEL/Linux consultant
>> ______________________________**_________________
>> elrepo mailing list
>> elrepo at lists.elrepo.org
>> http://lists.elrepo.org/**mailman/listinfo/elrepo<http://lists.elrepo.org/mailman/listinfo/elrepo>
>>
>
>
>
> _______________________________________________
> elrepo mailing list
> elrepo at lists.elrepo.org
> http://lists.elrepo.org/mailman/listinfo/elrepo
>



More information about the elrepo mailing list