Parcourir la 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 il y a 13 ans
Parent
révision
0579b8279c
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4
    4
      src/util/parserom.pl

+ 4
- 4
src/util/parserom.pl Voir le fichier

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

Chargement…
Annuler
Enregistrer