From bd9ae60ea7df3a2dc09798ea1cba6f55f2c3f0e4 Mon Sep 17 00:00:00 2001 From: Mystery Man Date: Fri, 2 Sep 2005 22:32:32 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'V10_3_0_53mdk'. --- mdk-stage1/pci-resource/.cvsignore | 1 - mdk-stage1/pci-resource/Makefile | 25 ----------- mdk-stage1/pci-resource/update-pci-ids.pl | 72 ------------------------------- 3 files changed, 98 deletions(-) delete mode 100644 mdk-stage1/pci-resource/.cvsignore delete mode 100644 mdk-stage1/pci-resource/Makefile delete mode 100755 mdk-stage1/pci-resource/update-pci-ids.pl (limited to 'mdk-stage1/pci-resource') diff --git a/mdk-stage1/pci-resource/.cvsignore b/mdk-stage1/pci-resource/.cvsignore deleted file mode 100644 index 4c7b0844b..000000000 --- a/mdk-stage1/pci-resource/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -pci-ids.h diff --git a/mdk-stage1/pci-resource/Makefile b/mdk-stage1/pci-resource/Makefile deleted file mode 100644 index fadeee162..000000000 --- a/mdk-stage1/pci-resource/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - #****************************************************************************** - # - # $Id$ - # - # Guillaume Cottenceau (gc@mandrakesoft.com) - # - # Copyright 2000 Mandrakesoft - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - # - #***************************************************************************** - - -all: pci-ids.h - -pci-ids.h: /usr/share/ldetect-lst/pcitable.gz update-pci-ids.pl - perl update-pci-ids.pl > $@ || { rm -f $@; exit 1; } - -clean: - rm -f pci-ids.h diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl deleted file mode 100755 index 021757fc4..000000000 --- a/mdk-stage1/pci-resource/update-pci-ids.pl +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/perl - -use strict; -use MDK::Common; - -require '/usr/bin/merge2pcitable.pl'; -my $pci = read_pcitable("/usr/share/ldetect-lst/pcitable"); - -print ' -#define PCI_REVISION_ID 0x08 /* Revision ID */ - -struct pci_module_map { - unsigned short vendor; /* PCI vendor id */ - unsigned short device; /* PCI device id */ - const char *name; /* PCI human readable name */ - const char *module; /* module to load */ -}; - -struct pci_module_map_full { - unsigned short vendor; /* PCI vendor id */ - unsigned short device; /* PCI device id */ - unsigned short subvendor; /* PCI subvendor id */ - unsigned short subdevice; /* PCI subdevice id */ - const char *name; /* PCI human readable name */ - const char *module; /* module to load */ -}; - -'; - -my %t = ( - network => 'network/main|gigabit|tokenring|wireless|pcmcia', - medias => 'disk/scsi|hardware_raid|sata', -); - -foreach my $type (keys %t) { - my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1 "$t{$type}"`); - - my (@entries, @entries_full); - - foreach my $k (sort keys %$pci) { - my $v = $pci->{$k}; - member($v->[0], @modules) or next; - $k =~ /^(....)(....)(....)(....)/; - my $values = { vendor => $1, device => $2, subvendor => $3, subdevice => $4, driver => $v->[0], description => $v->[1] }; - if ($values->{subdevice} eq 'ffff' && $values->{subvendor} eq 'ffff') { - push @entries, $values; - } else { - push @entries_full, $values; - } - } - - print "#ifndef DISABLE_".uc($type)." -struct pci_module_map ${type}_pci_ids[] = { -"; - printf qq|\t{ 0x%s, 0x%s, "%s", "%s" },\n|, $_->{vendor}, $_->{device}, $_->{description}, $_->{driver} - foreach @entries; - print "}; -unsigned int ${type}_num_ids = sizeof(${type}_pci_ids) / sizeof(struct pci_module_map); -"; - - print " -struct pci_module_map_full ${type}_pci_ids_full[] = { -"; - printf qq|\t{ 0x%s, 0x%s, 0x%s, 0x%s, "%s", "%s" },\n|, $_->{vendor}, $_->{device}, $_->{subvendor}, $_->{subdevice}, $_->{description}, $_->{driver} - foreach @entries_full; - print "}; -unsigned int ${type}_num_ids_full = sizeof(${type}_pci_ids_full) / sizeof(struct pci_module_map_full); - -#endif - -"; -} -- cgit v1.2.1