Skip to content

Commit

Permalink
[build] Include only one copy of each ROM in "make allroms"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcb30 committed Mar 30, 2011
1 parent 8399488 commit 0579b82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/util/parserom.pl
Expand Up @@ -18,7 +18,7 @@
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";
Expand All @@ -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> ) {
Expand All @@ -49,8 +49,8 @@ sub rom {
\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
Expand Down

0 comments on commit 0579b82

Please sign in to comment.