diff options
author | H. Peter Anvin <hpa@zytor.com> | 2016-02-09 18:08:47 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2016-02-09 18:08:47 -0800 |
commit | f2f897a1762fab84d2905f32b1c15dd7b42abb56 (patch) | |
tree | a38f51d3f1fcbf44afddb4736d549c12eaf491be /gpxe/src/util/catrom.pl | |
parent | 72d2959272b4616f17a97667e6dfa9d06bf109a3 (diff) | |
download | syslinux-f2f897a1762fab84d2905f32b1c15dd7b42abb56.tar.gz |
gpxe: delete long since obsolete snapshot of gPXE
gPXE has been deprecated in favor of iPXE for many, many years now.
It is much better than users get it directly from the iPXE project,
since we should no longer need any special modifications for Syslinux
use.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpxe/src/util/catrom.pl')
-rwxr-xr-x | gpxe/src/util/catrom.pl | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/gpxe/src/util/catrom.pl b/gpxe/src/util/catrom.pl deleted file mode 100755 index fe37e6b6..00000000 --- a/gpxe/src/util/catrom.pl +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl -w - -use warnings; -use strict; - -use bytes; - -use constant MAX_ROM_LEN => 1024*1024; -use constant PCI_OFF => 0x18; -use constant INDICATOR_OFF => 0x15; - -my $total_len = 0; -my @romfiles = @ARGV - or die "Usage: $0 rom-file-1 rom-file-2 ... > multi-rom-file\n"; - -while ( my $romfile = shift @romfiles ) { - my $last = @romfiles ? 0 : 1; - - open ROM, "<$romfile" or die "Could not open $romfile: $!\n"; - my $len = read ( ROM, my $romdata, MAX_ROM_LEN ) - or die "Could not read $romfile: $!\n"; - close ROM; - - die "$romfile is not a ROM file\n" - unless substr ( $romdata, 0, 2 ) eq "\x55\xAA"; - - ( my $checklen ) = unpack ( 'C', substr ( $romdata, 2, 1 ) ); - $checklen *= 512; - die "$romfile has incorrect length field $checklen (should be $len)\n" - unless $len == $checklen; - - ( my $pci ) = unpack ( 'v', substr ( $romdata, PCI_OFF, 2 ) ); - die "Invalid PCI offset field in $romfile\n" - if $pci >= $len; - die "No PCIR signature in $romfile\n" - unless substr ( $romdata, $pci, 4 ) eq "PCIR"; - - ( my $indicator ) = - unpack ( 'C', substr ( $romdata, $pci + INDICATOR_OFF, 1 ) ); - my $msg = sprintf ( "$romfile: indicator was %02x, ", $indicator ); - $indicator &= ! ( 1 << 7 ); - $indicator |= ( $last << 7 ); - $msg .= sprintf ( "now %02x\n", $indicator ); - substr ( $romdata, $pci + INDICATOR_OFF, 1 ) = pack ( 'C', $indicator ); - warn $msg; - - print $romdata; -} |