summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/update-usb-ids.pl
blob: 1ea45f9df0350ef9bbc33c604dccd4ff5b1a5846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl

use lib '../kernel';
use strict;
use MDK::Common;

my @modules = chomp_(`perl ../kernel/modules.pl pci_modules4stage1 "bus/usb"`)
  or die "unable to get USB controller modules";
print "char *usb_controller_modules[] = {
";
printf qq|\t"%s",\n|, $_ foreach @modules;
print "};
unsigned int usb_controller_modules_len = sizeof(usb_controller_modules) / sizeof(char *);
";

@modules = chomp_(`perl ../kernel/modules.pl pci_modules4stage1 "network/usb disk/usb"`)
  or die "unable to get USB modules";

print "char *usb_modules[] = {
";
printf qq|\t"%s",\n|, $_ foreach @modules;
print "};
unsigned int usb_modules_len = sizeof(usb_modules) / sizeof(char *);
";