From: Diego Calleja <diegocg@gmail.com>
To: Marek Wawrzyczny <marekw1977@yahoo.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19]
Date: Tue, 19 Dec 2006 14:56:27 +0100 [thread overview]
Message-ID: <20061219145627.fabf3d98.diegocg@gmail.com> (raw)
In-Reply-To: <200612192357.45443.marekw1977@yahoo.com.au>
[-- Attachment #1: Type: text/plain, Size: 484 bytes --]
El Tue, 19 Dec 2006 23:57:45 +1100, Marek Wawrzyczny <marekw1977@yahoo.com.au> escribió:
> I had another, probably crazy idea. Would it be possible to utilize the
> current vendor/device PCI ID database to create Linux friendliness matrix
> site?
I've a script (attached) that looks into /lib/modules/`uname -r`/modules.pcimap,
looks up the IDs in the pci id database and print the real name. At least it shows
it's possible to know what devices are supported ...
[-- Attachment #2: list-kernel-hardware.py --]
[-- Type: text/x-python, Size: 2278 bytes --]
#!/usr/bin/python
def pciids_to_names(ids):
# Only the last four numbers of the ids have useful info
vendorid = ids[1][6:10]
deviceid = ids[2][6:10]
subvendorid = ids[3][6:10]
subdeviceid = ids[4][6:10]
result = [ids[0], "", "", "", "", ""]
pciids = open('/usr/share/misc/pci.ids', 'r')
# Search for vendor
for line in pciids:
if line[0] == "#" or line[0] == "C" or line[0] == "\t":
continue
if line[0:4] == vendorid:
result[1] = line[6:].strip() # Vendor name
break
if result[1] == "": # Vendor not found
return result
# Search for a device
for line in pciids:
if line[0] != "\t":
continue
if line[1:5] == deviceid:
result[2] = line[7:].strip() # Device name
break
# Search a subsystem name
for line in pciids:
if line[2:11] == subvendorid + " " + subdeviceid: # subsystem name
result[3] = line[12:].strip() # The subvendor and subdevice ids point to a _single_ subsystem name
break
# Search a class name
if ids[5][4:6] == "00" and ids[5][6:8] == "00" and ids[5][6:8] == "00":
pass # void class ids
else:
pciids.seek(0)
# Search a class name
for line in pciids:
if line[0] == "C":
if line[2:4] == ids[5][4:6]: # found class
result[4] = line[6:].strip() # appended class name
break
if result[4] == "": # class not found
return result
# Search subclass name
for line in pciids:
if line [1:3] == ids[5][6:8]:
result[5] = line[5:].strip()
break
return result
### Start of the code flow ###
import platform
pcimap = open('/lib/modules/' + platform.uname()[2] + '/modules.pcimap', 'r')
previousmodule = ""
for line in pcimap:
if line[0] == "#" or line[0] == " ": continue
data = line.split(None)
ret = pciids_to_names(data)
if ret[0] != previousmodule:
previousmodule = ret[0]
print "Driver: " + previousmodule
if ret[2] == "":
output = "\tDevice NOT found in the pciid database: " + repr(data)
else:
output = "\tDevice: " + ret[2] + " (deviceid " + data[2][6:] + "); made by " + ret[1] + " (vendorid " + data[1][6:] + ")"
if ret[3] != "": output += "; Subsystem: " + ret[3] + " (subsysid " + data[3][6:] + ":" + data[4][6:] + ")"
if ret[4] != "": output += "; Class: " + ret[4]
if ret[5] != "": output += "; Subclass: " + ret[5]
print output
next prev parent reply other threads:[~2006-12-19 13:55 UTC|newest]
Thread overview: 239+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-13 19:52 [GIT PATCH] more Driver core patches for 2.6.19 Greg KH
[not found] ` <1166039585152-git-send-email-greg@kroah.com>
[not found] ` <11660395913232-git-send-email-greg@kroah.com>
[not found] ` <11660395951158-git-send-email-greg@kroah.com>
[not found] ` <11660395998-git-send-email-greg@kroah.com>
2006-12-13 19:52 ` [PATCH 5/14] Driver core: show "initstate" of module Greg KH
2006-12-13 19:52 ` [PATCH 6/14] driver core: delete virtual directory on class_unregister() Greg KH
2006-12-13 19:52 ` [PATCH 7/14] DebugFS : inotify create/mkdir support Greg KH
2006-12-13 19:52 ` [PATCH 8/14] DebugFS : coding style fixes Greg KH
2006-12-13 19:53 ` [PATCH 9/14] DebugFS : file/directory creation error handling Greg KH
2006-12-13 19:53 ` [PATCH 10/14] DebugFS : more " Greg KH
2006-12-13 19:53 ` [PATCH 11/14] DebugFS : file/directory removal fix Greg KH
2006-12-13 19:53 ` [PATCH 12/14] Driver core: "platform_driver_probe() can save codespace": save codespace Greg KH
2006-12-13 19:53 ` [PATCH 13/14] Driver core: Make platform_device_add_data accept a const pointer Greg KH
2006-12-13 19:53 ` [PATCH 14/14] Driver core: deprecate PM_LEGACY, default it to N Greg KH
2006-12-13 20:12 ` [GIT PATCH] more Driver core patches for 2.6.19 Linus Torvalds
2006-12-13 20:31 ` Greg KH
2006-12-13 20:58 ` Linus Torvalds
2006-12-13 21:08 ` Linus Torvalds
2006-12-13 21:15 ` Arjan van de Ven
2006-12-14 9:30 ` Muli Ben-Yehuda
2006-12-14 10:13 ` Hans-Jürgen Koch
2006-12-13 21:36 ` Thomas Gleixner
2006-12-13 21:46 ` Benjamin Herrenschmidt
2006-12-13 23:40 ` Greg KH
2006-12-14 8:49 ` Duncan Sands
2006-12-14 9:56 ` Hans-Jürgen Koch
2006-12-14 11:51 ` Olivier Galibert
2006-12-14 12:45 ` Hans-Jürgen Koch
2006-12-14 19:16 ` Olivier Galibert
2006-12-14 12:39 ` Alan
2006-12-14 13:08 ` Hans-Jürgen Koch
2006-12-14 17:02 ` Jan Engelhardt
2006-12-14 17:17 ` Hans-Jürgen Koch
2006-12-14 17:57 ` Jan Engelhardt
2006-12-16 20:13 ` Lee Revell
2006-12-16 20:28 ` Jan Engelhardt
2006-12-14 17:34 ` Bernd Petrovitsch
2006-12-14 17:47 ` Hans-Jürgen Koch
2006-12-14 17:59 ` Bernd Petrovitsch
2006-12-14 12:27 ` James Courtier-Dutton
2006-12-13 20:38 ` Michael K. Edwards
2006-12-13 21:02 ` Greg KH
2006-12-13 21:32 ` Martin Bligh
2006-12-13 21:47 ` Andrew Morton
2006-12-13 22:09 ` GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19] Greg KH
2006-12-14 0:32 ` Greg KH
2006-12-14 0:43 ` Jonathan Corbet
2006-12-14 0:55 ` Greg KH
2006-12-14 1:00 ` Linus Torvalds
2006-12-14 1:08 ` Michael K. Edwards
2006-12-14 1:30 ` Grzegorz Kulewski
2006-12-14 1:58 ` Greg KH
2006-12-14 4:15 ` Linus Torvalds
2006-12-14 5:39 ` Martin J. Bligh
2006-12-14 6:01 ` Hua Zhong
2006-12-14 11:14 ` Alan
2006-12-14 11:31 ` Hans-Jürgen Koch
2006-12-14 12:42 ` Alan
2006-12-14 12:54 ` Hans-Jürgen Koch
2006-12-14 16:59 ` Greg KH
2006-12-14 18:26 ` Alan
2006-12-14 21:16 ` Greg KH
2006-12-14 12:55 ` Jan Engelhardt
2006-12-14 13:10 ` Arjan van de Ven
2006-12-14 17:17 ` Jan Engelhardt
2006-12-17 10:54 ` Geert Uytterhoeven
2006-12-14 8:03 ` James Morris
2006-12-14 15:39 ` Adrian Bunk
2006-12-14 20:08 ` David Schwartz
2006-12-15 14:05 ` Paolo Ornati
2006-12-17 10:11 ` Geert Uytterhoeven
2006-12-17 10:56 ` Rafael J. Wysocki
2006-12-19 12:57 ` Marek Wawrzyczny
2006-12-19 13:56 ` Diego Calleja [this message]
2006-12-19 16:46 ` Gene Heskett
2006-12-19 17:11 ` Bill Nottingham
2006-12-19 17:24 ` Gene Heskett
2006-12-19 17:13 ` Diego Calleja
2006-12-20 5:11 ` Valdis.Kletnieks
2006-12-20 19:29 ` David Schwartz
2006-12-20 20:52 ` Valdis.Kletnieks
2006-12-20 21:10 ` alan
2006-12-21 15:34 ` Marek Wawrzyczny
2006-12-21 16:43 ` Horst H. von Brand
2006-12-21 19:28 ` Valdis.Kletnieks
2006-12-24 3:11 ` Horst H. von Brand
2006-12-20 4:27 ` Steven Rostedt
2006-12-14 13:07 ` Dave Jones
2006-12-14 15:05 ` Adrian Bunk
2006-12-14 16:11 ` Dave Jones
2006-12-14 16:31 ` Olivier Galibert
2006-12-14 15:36 ` Martin J. Bligh
2006-12-14 17:20 ` Jan Engelhardt
2006-12-14 14:12 ` Ben Collins
2006-12-14 15:10 ` James Courtier-Dutton
2006-12-14 16:09 ` Dave Jones
2006-12-14 16:36 ` Ben Collins
2006-12-14 17:34 ` Jan Engelhardt
2006-12-14 19:29 ` Michael Buesch
2006-12-14 20:19 ` Ben Collins
2006-12-14 7:24 ` Jeffrey V. Merkey
2006-12-14 8:21 ` David Woodhouse
2006-12-14 11:25 ` Alan
2007-01-22 23:37 ` dfsg isn't fsf (Re: GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19]) Oleg Verych
2006-12-14 14:53 ` GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19] Theodore Tso
2006-12-14 16:52 ` Linus Torvalds
2006-12-14 17:33 ` Jeff V. Merkey
2006-12-14 18:01 ` Martin J. Bligh
2006-12-14 18:12 ` Jeff V. Merkey
2006-12-14 18:37 ` Linus Torvalds
2006-12-14 18:30 ` Jeff V. Merkey
2006-12-14 9:34 ` James Courtier-Dutton
2006-12-24 11:57 ` Mark Hounschell
2006-12-24 13:22 ` Sean
2006-12-24 14:42 ` Mark Hounschell
2006-12-14 10:49 ` Xavier Bestel
2006-12-14 13:04 ` Dave Jones
2006-12-14 13:46 ` Ben Collins
2006-12-14 17:21 ` Jan Engelhardt
2006-12-14 17:49 ` Ben Collins
2006-12-14 15:46 ` Jeff Garzik
2006-12-14 17:03 ` Linus Torvalds
2006-12-14 17:08 ` Chris Wedgwood
2006-12-14 17:38 ` Christoph Hellwig
2006-12-14 17:52 ` Chris Wedgwood
2006-12-14 18:09 ` Jan Engelhardt
2006-12-18 10:28 ` GPL only modules Eric W. Biederman
2006-12-14 18:15 ` GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19] Eric Sandeen
2006-12-14 18:39 ` Chris Wedgwood
2006-12-14 18:51 ` Linus Torvalds
2006-12-14 19:42 ` Scott Preece
2006-12-14 19:34 ` Jeff V. Merkey
2006-12-15 5:28 ` GPL only modules Alexandre Oliva
2006-12-15 10:13 ` GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19] Eduard Bloch
2006-12-15 17:44 ` Dave Neuer
2006-12-18 10:55 ` Eric W. Biederman
2006-12-18 17:05 ` Jeff V. Merkey
2006-12-14 19:49 ` Hua Zhong
2006-12-17 10:57 ` Geert Uytterhoeven
2006-12-14 16:17 ` Adrian Bunk
2006-12-14 16:33 ` Alan
2006-12-14 16:54 ` Adrian Bunk
2006-12-14 17:17 ` Theodore Tso
2006-12-14 18:18 ` Alan
2006-12-14 19:51 ` Adrian Bunk
2006-12-21 15:38 ` Pavel Machek
2006-12-23 11:24 ` Adrian Bunk
2006-12-23 21:36 ` Pavel Machek
2006-12-24 1:07 ` Adrian Bunk
2006-12-19 15:12 ` free module selection Markus Elfring
2006-12-14 5:10 ` GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19] Bill Nottingham
2006-12-14 8:48 ` Greg KH
2006-12-14 14:02 ` Rik van Riel
2006-12-14 15:42 ` Chris Friesen
2006-12-14 15:47 ` Alan
2006-12-14 15:48 ` Jeff Garzik
2006-12-14 22:21 ` Dave Airlie
2006-12-14 22:26 ` Michael Buesch
2006-12-14 22:39 ` Dave Airlie
2006-12-14 22:45 ` Michael Buesch
2006-12-14 19:32 ` Bill Nottingham
2006-12-14 5:58 ` Nigel Cunningham
2006-12-14 7:54 ` David Schwartz
2006-12-14 8:21 ` David Woodhouse
2006-12-14 10:36 ` Alan
2006-12-14 14:57 ` Adrian Bunk
2006-12-24 14:27 ` Pavel Machek
2006-12-24 19:59 ` Dmitry Torokhov
2006-12-13 22:20 ` [GIT PATCH] more Driver core patches for 2.6.19 Michael K. Edwards
2006-12-13 22:59 ` Kyle Moffett
2006-12-13 23:55 ` Alan
2006-12-14 2:11 ` Al Viro
2006-12-14 17:22 ` Linus Torvalds
2006-12-14 15:13 ` Rik van Riel
2006-12-13 21:48 ` Michael K. Edwards
2006-12-13 21:03 ` Linus Torvalds
2006-12-16 9:05 ` Pavel Machek
2006-12-16 11:04 ` Jörn Engel
2006-12-17 10:49 ` Pavel Machek
2006-12-13 21:14 ` Benjamin Herrenschmidt
2006-12-13 21:22 ` Jan Engelhardt
2006-12-13 23:28 ` Linus Torvalds
2006-12-14 11:18 ` Jan Engelhardt
2006-12-14 11:26 ` Jan Engelhardt
2006-12-14 17:32 ` Linus Torvalds
2006-12-14 18:04 ` Jan Engelhardt
2006-12-14 17:26 ` Linus Torvalds
2006-12-14 20:47 ` Thomas Gleixner
2006-12-14 22:59 ` Linus Torvalds
2006-12-14 23:37 ` Thomas Gleixner
2006-12-13 21:26 ` Linus Torvalds
2006-12-13 22:14 ` Benjamin Herrenschmidt
2006-12-13 22:30 ` Thomas Gleixner
2006-12-13 22:39 ` Benjamin Herrenschmidt
2006-12-13 23:11 ` Thomas Gleixner
2006-12-13 23:39 ` Michael K. Edwards
2006-12-14 0:00 ` Alan
2006-12-13 23:56 ` Alan
2006-12-14 0:08 ` Greg KH
2006-12-14 9:15 ` Thomas Gleixner
2006-12-14 11:33 ` Alan
2006-12-13 22:40 ` Thomas Gleixner
2006-12-13 22:45 ` Benjamin Herrenschmidt
2006-12-13 23:15 ` Thomas Gleixner
-- strict thread matches above, loose matches on Subject: below --
2006-12-15 23:56 GPL only modules [was Re: [GIT PATCH] more Driver core patches for 2.6.19] karderio
2006-12-16 0:24 ` Linus Torvalds
2006-12-16 1:27 ` Alan
2006-12-16 1:53 ` Linus Torvalds
2006-12-16 3:59 ` jdow
2006-12-16 17:08 ` David Nicol
2006-12-16 2:32 ` karderio
2006-12-16 2:55 ` Linus Torvalds
2006-12-16 6:43 ` Willy Tarreau
2006-12-16 10:28 ` Rafael J. Wysocki
2006-12-16 10:50 ` Willy Tarreau
2006-12-16 11:09 ` Rafael J. Wysocki
2006-12-16 15:15 ` Gene Heskett
2006-12-17 11:04 ` Geert Uytterhoeven
2006-12-16 16:33 ` Linus Torvalds
2006-12-16 14:42 ` Theodore Tso
2006-12-16 16:30 ` Willy Tarreau
2006-12-16 20:23 ` Theodore Tso
2006-12-16 21:04 ` Willy Tarreau
2006-12-16 16:54 ` Jeremy Fitzhardinge
2006-12-16 16:28 ` Linus Torvalds
2006-12-16 16:49 ` Willy Tarreau
2006-12-16 17:20 ` Linus Torvalds
2006-12-16 18:33 ` Dave Jones
2006-12-17 1:56 ` Adrian Bunk
2006-12-17 3:06 ` Adrian Bunk
2006-12-17 20:23 ` Gerhard Mack
2006-12-21 19:39 ` Pavel Machek
2006-12-18 21:04 ` karderio
2006-12-18 22:05 ` Theodore Tso
2006-12-18 22:11 ` Linus Torvalds
2006-12-18 22:42 ` Scott Preece
2006-12-16 18:27 Ricardo Galli
2006-12-16 21:01 ` Linus Torvalds
2006-12-17 0:22 ` Ricardo Galli
2006-12-17 4:10 ` Theodore Tso
2006-12-18 2:43 Brendan Scott
2006-12-22 11:48 Niklas Steinkamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061219145627.fabf3d98.diegocg@gmail.com \
--to=diegocg@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marekw1977@yahoo.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.