home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / misc / src / install / pci-probing / README < prev    next >
Encoding:
Text File  |  1997-09-17  |  1.9 KB  |  58 lines

  1. This is a quick hack way to get the PCI vendor:dev codes for the
  2. stuff we want to support. 
  3.  
  4. The files 
  5.  
  6.     good-video.lst
  7.     good-eth.lst
  8.     good--scsi.lst
  9.  
  10. contain the latest list of the device IDs we have used. The files
  11.  
  12.     exclude.lst
  13.  
  14. contain the list of entries we ignored. 
  15. These lists are based on the file linux/drivers/pci/pci.c
  16. from the kernel source. When a pci.c is to be used, first run the script
  17.  
  18. pcidevinfomerge < pci.c
  19.  
  20. which assumes that the exclude and good- files exist in the current directory.
  21. It uses /usr/include/linux/pci.h for some information. If you have a newer
  22. kernel pci.c you want to integrate, you'll have to make sure either
  23. /usr/include/linux/pci.h is also updated, or muck with the script to read
  24. the right on.
  25. This command will output new entries which are not in either the exclude or
  26. the good lists. You will need to review these entries and stick them
  27. either in the good or exclude lists. 
  28. A list of all devices in pci.c can be created with the command
  29.  
  30. pcidevinfo < pci.c
  31.  
  32. Once a good list is made, run the command
  33.  
  34. makepciids
  35.  
  36. This will output some C code which defines a struct with the vendor/dev ids
  37. converted to numeric values. This ASSUMES that the /usr/include/linux/pci.h
  38. is recent enough to contain all the vendor/device ids in the pci.c file used
  39. to make the good-list.lst. It will make C code in pci-ids-temp.h.
  40.  
  41. The last step is to convert the English device names in the C code to the
  42. correct module name. This requires a mapping file, which must be named
  43. map-[eth,scsi,video].lst. Then run the command
  44.  
  45. mappcinames < pci-ids-temp.h > pci-ids.h
  46.  
  47. This final output can be integrated into source code and give you a
  48. mapping from pci vendor:device id into a module. BTW, if no mapping
  49. exists for a certain PCI id, the value "UNKNOWN" is used for the
  50. module. Source code should check the returned value against this to be
  51. sure a valid mapping exists!
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.