Skip to content

Commit 0579b82

Browse files
committedMar 30, 2011
[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>
1 parent 8399488 commit 0579b82

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/util/parserom.pl

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
my $printed_family;
1919

2020
sub rom {
21-
( my $type, my $image, my $desc, my $vendor, my $device ) = @_;
21+
( my $type, my $image, my $desc, my $vendor, my $device, my $dup ) = @_;
2222
my $ids = $vendor ? "$vendor,$device" : "-";
2323
unless ( $printed_family ) {
2424
print "\n";
@@ -34,8 +34,8 @@ sub rom {
3434
print "ROM_DESCRIPTION_$image = \"$desc\"\n";
3535
print "PCI_VENDOR_$image = 0x$vendor\n" if $vendor;
3636
print "PCI_DEVICE_$image = 0x$device\n" if $device;
37-
print "ROMS += $image\n";
38-
print "ROMS_$driver_name += $image\n";
37+
print "ROMS += $image\n" unless $dup;
38+
print "ROMS_$driver_name += $image\n" unless $dup;
3939
}
4040

4141
while ( <DRV> ) {
@@ -49,8 +49,8 @@ sub rom {
4949
\s*.*\s* # Driver data
5050
\)/x ) {
5151
( my $vendor, my $device, my $image, my $desc ) = ( lc $1, lc $2, $3, $4 );
52-
rom ( "pci", $image, $desc, $vendor, $device );
5352
rom ( "pci", lc "${vendor}${device}", $desc, $vendor, $device );
53+
rom ( "pci", $image, $desc, $vendor, $device, 1 );
5454
} elsif ( /^\s*ISA_ROM\s*\(
5555
\s*\"([^\"]*)\"\s*, # Image
5656
\s*\"([^\"]*)\"\s* # Description

0 commit comments

Comments
 (0)