david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[build] Include only one copy of each ROM in "make allroms"

Each PCI ROM currently ends up appearing twice in the $(ROMS) list:
once under its designated name (e.g. "rtl8139.rom"), once under its
PCI IDs (e.g. "bin/10ec8139.rom").

Include only the latter of these in the $(ROMS) list, so that doing
"make allroms" will generate only one copy of each ROM.

Reported-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2011-03-30 15:49:00 +01:00
parent 83994886ab
commit 0579b8279c
1 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ open DRV, "<$source" or die "Could not open $source: $!\n";
my $printed_family;
sub rom {
( my $type, my $image, my $desc, my $vendor, my $device ) = @_;
( my $type, my $image, my $desc, my $vendor, my $device, my $dup ) = @_;
my $ids = $vendor ? "$vendor,$device" : "-";
unless ( $printed_family ) {
print "\n";
@ -34,8 +34,8 @@ sub rom {
print "ROM_DESCRIPTION_$image = \"$desc\"\n";
print "PCI_VENDOR_$image = 0x$vendor\n" if $vendor;
print "PCI_DEVICE_$image = 0x$device\n" if $device;
print "ROMS += $image\n";
print "ROMS_$driver_name += $image\n";
print "ROMS += $image\n" unless $dup;
print "ROMS_$driver_name += $image\n" unless $dup;
}
while ( <DRV> ) {
@ -49,8 +49,8 @@ while ( <DRV> ) {
\s*.*\s* # Driver data
\)/x ) {
( my $vendor, my $device, my $image, my $desc ) = ( lc $1, lc $2, $3, $4 );
rom ( "pci", $image, $desc, $vendor, $device );
rom ( "pci", lc "${vendor}${device}", $desc, $vendor, $device );
rom ( "pci", $image, $desc, $vendor, $device, 1 );
} elsif ( /^\s*ISA_ROM\s*\(
\s*\"([^\"]*)\"\s*, # Image
\s*\"([^\"]*)\"\s* # Description