Browse Source

[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>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
0579b8279c
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/util/parserom.pl

+ 4
- 4
src/util/parserom.pl View File

18
 my $printed_family;
18
 my $printed_family;
19
 
19
 
20
 sub rom {
20
 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 ) = @_;
22
   my $ids = $vendor ? "$vendor,$device" : "-";
22
   my $ids = $vendor ? "$vendor,$device" : "-";
23
   unless ( $printed_family ) {
23
   unless ( $printed_family ) {
24
     print "\n";
24
     print "\n";
34
   print "ROM_DESCRIPTION_$image = \"$desc\"\n";
34
   print "ROM_DESCRIPTION_$image = \"$desc\"\n";
35
   print "PCI_VENDOR_$image = 0x$vendor\n" if $vendor;
35
   print "PCI_VENDOR_$image = 0x$vendor\n" if $vendor;
36
   print "PCI_DEVICE_$image = 0x$device\n" if $device;
36
   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;
39
 }
39
 }
40
 
40
 
41
 while ( <DRV> ) {
41
 while ( <DRV> ) {
49
          \s*.*\s*		   # Driver data
49
          \s*.*\s*		   # Driver data
50
        \)/x ) {
50
        \)/x ) {
51
     ( my $vendor, my $device, my $image, my $desc ) = ( lc $1, lc $2, $3, $4 );
51
     ( my $vendor, my $device, my $image, my $desc ) = ( lc $1, lc $2, $3, $4 );
52
-    rom ( "pci", $image, $desc, $vendor, $device );
53
     rom ( "pci", lc "${vendor}${device}", $desc, $vendor, $device );
52
     rom ( "pci", lc "${vendor}${device}", $desc, $vendor, $device );
53
+    rom ( "pci", $image, $desc, $vendor, $device, 1 );
54
   } elsif ( /^\s*ISA_ROM\s*\(
54
   } elsif ( /^\s*ISA_ROM\s*\(
55
 	      \s*\"([^\"]*)\"\s*,  # Image
55
 	      \s*\"([^\"]*)\"\s*,  # Image
56
 	      \s*\"([^\"]*)\"\s*   # Description
56
 	      \s*\"([^\"]*)\"\s*   # Description

Loading…
Cancel
Save