diff options
author | Antoine Ginies <aginies@mandriva.com> | 2011-01-19 10:44:49 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2011-01-19 10:44:49 +0000 |
commit | 530a16ec071db0e24e6e949e265a96848864967c (patch) | |
tree | fe40cacd28d67b98186754c551b7fd339ebc7e17 /mdk-stage1/pci-resource | |
download | drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.gz drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.bz2 drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.xz drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.zip |
add mes5-2.6.33 branch
Diffstat (limited to 'mdk-stage1/pci-resource')
-rw-r--r-- | mdk-stage1/pci-resource/Makefile | 25 | ||||
-rwxr-xr-x | mdk-stage1/pci-resource/update-pci-ids.pl | 27 |
2 files changed, 52 insertions, 0 deletions
diff --git a/mdk-stage1/pci-resource/Makefile b/mdk-stage1/pci-resource/Makefile new file mode 100644 index 000000000..3fea7db00 --- /dev/null +++ b/mdk-stage1/pci-resource/Makefile @@ -0,0 +1,25 @@ + #****************************************************************************** + # + # $Id: Makefile 213578 2005-08-25 11:41:51Z prigaux $ + # + # 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 new file mode 100755 index 000000000..c6653a735 --- /dev/null +++ b/mdk-stage1/pci-resource/update-pci-ids.pl @@ -0,0 +1,27 @@ +#!/usr/bin/perl + +use lib '../kernel'; +use strict; +use MDK::Common; + + +my %t = ( + network => 'network/main|gigabit|tokenring|wireless|pcmcia', + medias_ide => 'disk/ide', + medias_other => 'disk/scsi|hardware_raid|sata bus/firewire', +); + +foreach my $type (keys %t) { + my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1 "$t{$type}"`) + or die "unable to get PCI modules"; + + print "#ifndef DISABLE_".uc($type)." +char* ${type}_pci_modules[] = { +"; + printf qq|\t"%s",\n|, $_ foreach @modules; + print "}; +unsigned int ${type}_pci_modules_len = sizeof(${type}_pci_modules) / sizeof(char *); +#endif + +"; +} |