summaryrefslogtreecommitdiffstats
path: root/convert
diff options
context:
space:
mode:
Diffstat (limited to 'convert')
-rw-r--r--convert/Makefile14
-rw-r--r--convert/README.pcitable20
-rw-r--r--convert/xf86PciInfo2pcitable.c22
-rw-r--r--convert/xf86str.h13
4 files changed, 20 insertions, 49 deletions
diff --git a/convert/Makefile b/convert/Makefile
index 596bee2d..c765b2d6 100644
--- a/convert/Makefile
+++ b/convert/Makefile
@@ -1,4 +1,6 @@
-FILES = xf86PciInfo2pcitable
+# see README.pcitable
+
+FILES =
all: $(FILES) verif
@@ -6,12 +8,4 @@ verif:
./verify_Cards.pl
clean:
- rm -f $(FILES)
-
-xf86PciInfo2pcitable: %: %.c xf86PciInfo.h
- gcc -o $@ $<
-
-#do
-# take new xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h in XFree86-4
-# make ; ./xf86PciInfo2pcitable > /tmp/xf_pcitable ; ./merge2pcitable.pl pcitable /tmp/xf_pcitable pcitable
-
+ rm -f $(FILES) modules.pcimap modules.usbmap vendors.txt
diff --git a/convert/README.pcitable b/convert/README.pcitable
index 1d5c74cd..a4aa727c 100644
--- a/convert/README.pcitable
+++ b/convert/README.pcitable
@@ -1,17 +1,29 @@
################################################################################
# How to merge the pcitable with various source:
#
+
+
# update pciutils
-# PS:
-# A pciids with more accurate information are available from
-# http://www.yourvote.com/pci/vendors.txt
./merge2pcitable.pl pciids /usr/share/pci.ids pcitable > pcitable.new
+# A pciids with more accurate information are available from
+rm -f vendors.txt ; wget http://www.yourvote.com/pci/vendors.txt
+./merge2pcitable.pl pciids vendors.txt pcitable > pcitable.new
+
+# http://www.begent.co.uk/pcids.htm
+
+
# with redhat's pcitable in /tmp/rh_pcitable (from kudzu or anaconda)
./merge2pcitable.pl pcitable /tmp/rh_pcitable pcitable > pcitable.new
+
# with a new kernel
-./merge2pcitable.pl kernel_pcimap $(echo /lib/modules/2.4.*/modules.pcimap | sed 's/ .*//') pcitable > pcitable.new
+(cd ~/tmp ; rm -rf lib ; rpm2cpio /RPMS/kernel-2.4.*.rpm |cpio -id './lib/modules/*/modules.*map')
+cp -f ~/tmp/lib/modules/*/modules.{pci,usb}map .
+rm -rf lib
+./merge2pcitable.pl kernel_pcimap modules.pcimap pcitable > pcitable.new
+./merge2pcitable.pl kernel_usbmap modules.usbmap usbtable > usbtable.new
+
# checking the pcitable
./merge2pcitable.pl pcitable pcitable pcitable > /dev/null
diff --git a/convert/xf86PciInfo2pcitable.c b/convert/xf86PciInfo2pcitable.c
deleted file mode 100644
index 30374b79..00000000
--- a/convert/xf86PciInfo2pcitable.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* take xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h in XFree86-4 */
-#include "xf86PciInfo.h"
-
-const char *vendor2text(int id) {
- SymTabRec *p;
- for (p = xf86PCIVendorNameInfoData; p->token; p++)
- if (p->token == id) return p->name;
- fprintf(stderr, "error, bad vendor id\n");
- exit(1);
-}
-
-main() {
- pciVendorDeviceInfo *p;
-
- for (p = xf86PCIVendorInfoData; p->VendorID; p++) {
- struct pciDevice *q;
- const char *vendor = vendor2text(p->VendorID);
- for (q = p->Device; q->DeviceID; q++) {
- printf("0x%04x\t0x%04x\t\"unknown\"\t\"%s|%s\"\n", p->VendorID, q->DeviceID, vendor, q->DeviceName);
- }
- }
-}
diff --git a/convert/xf86str.h b/convert/xf86str.h
deleted file mode 100644
index 9d9f5001..00000000
--- a/convert/xf86str.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-
-typedef struct {
- int token; /* id of the token */
- const char * name; /* token name */
-} SymTabRec, *SymTabPtr;
-
-#define CARD16 int
-
-#define INIT_PCI_CARD_INFO
-#define INIT_PCI_VENDOR_INFO
-#define INIT_PCI_VENDOR_NAME_INFO
-#define VENDOR_INCLUDE_NONVIDEO