summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/update-pci-ids.pl
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/update-pci-ids.pl')
-rwxr-xr-xmdk-stage1/update-pci-ids.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/mdk-stage1/update-pci-ids.pl b/mdk-stage1/update-pci-ids.pl
new file mode 100755
index 000000000..1b084ea80
--- /dev/null
+++ b/mdk-stage1/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|pcmcia|virtual|wireless',
+ medias_ide => 'disk/ide',
+ medias_other => 'disk/scsi|hardware_raid|sata|virtual 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
+
+";
+}