summaryrefslogtreecommitdiffstats
path: root/src/util/parserom.pl
diff options
context:
space:
mode:
authorMichael Brown2007-11-19 21:14:20 +0100
committerMichael Brown2007-11-19 21:14:20 +0100
commita1e243d504a9348ed0afbb53aa345ba1eed99965 (patch)
tree576711b04743495a4ad014885d3107d582c06935 /src/util/parserom.pl
parentWork around a bug in the OpenSolaris iSCSI target. (diff)
downloadipxe-a1e243d504a9348ed0afbb53aa345ba1eed99965.tar.gz
ipxe-a1e243d504a9348ed0afbb53aa345ba1eed99965.tar.xz
ipxe-a1e243d504a9348ed0afbb53aa345ba1eed99965.zip
Add bin/pci_VVVV_DDDD target to allow building ROM images without
needing to know the gPXE internal ROM name.
Diffstat (limited to 'src/util/parserom.pl')
-rw-r--r--src/util/parserom.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/util/parserom.pl b/src/util/parserom.pl
index 56bb9445..ace8ec94 100644
--- a/src/util/parserom.pl
+++ b/src/util/parserom.pl
@@ -32,8 +32,8 @@ sub rom {
print "DRIVER_$image = $driver_name\n";
print "ROM_TYPE_$image = $type\n";
print "ROM_DESCRIPTION_$image = \"$desc\"\n";
- print "PCI_VENDOR_$image = $vendor\n" if $vendor;
- print "PCI_DEVICE_$image = $device\n" if $device;
+ 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";
}
@@ -42,13 +42,14 @@ while ( <DRV> ) {
next unless /(PCI|ISA)_ROM\s*\(/;
if ( /^\s*PCI_ROM\s*\(
- \s*(0x[0-9A-Fa-f]{4})\s*, # PCI vendor
- \s*(0x[0-9A-Fa-f]{4})\s*, # PCI device
+ \s*0x([0-9A-Fa-f]{4})\s*, # PCI vendor
+ \s*0x([0-9A-Fa-f]{4})\s*, # PCI device
\s*\"([^\"]*)\"\s*, # Image
\s*\"([^\"]*)\"\s* # Description
\)/x ) {
( my $vendor, my $device, my $image, my $desc ) = ( lc $1, lc $2, $3, $4 );
rom ( "pci", $image, $desc, $vendor, $device );
+ rom ( "pci", lc "pci_${vendor}_${device}", $desc, $vendor, $device );
} elsif ( /^\s*ISA_ROM\s*\(
\s*\"([^\"]*)\"\s*, # Image
\s*\"([^\"]*)\"\s* # Description