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/swapdevids.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/swapdevids.pl')
-rwxr-xr-x | gpxe/src/util/swapdevids.pl | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/gpxe/src/util/swapdevids.pl b/gpxe/src/util/swapdevids.pl deleted file mode 100755 index c6255ae7..00000000 --- a/gpxe/src/util/swapdevids.pl +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/perl -w -# -# Program to reverse the device identifier IDs in the PCIR and PnP -# structures in a ROM for old non-compliant BIOSes -# -# GPL, Ken Yap 2001 -# - -use bytes; - -use IO::Seekable; - -sub swaplocs ($$$) -{ - my ($dataref, $loc1, $loc2) = @_; - my ($t); - - $t = substr($$dataref, $loc1, 1); - substr($$dataref, $loc1, 1) = substr($$dataref, $loc2, 1); - substr($$dataref, $loc2, 1) = $t; -} - -sub printdevids ($$) -{ - my ($dataref, $loc) = @_; - - return (sprintf "%02x %02x %02x", unpack('C3', substr($$dataref, $loc, 3))); -} - -$#ARGV >= 0 or die "Usage: $0 romimage\n"; -$file = $ARGV[0]; -open(F, "+<$file") or die "$file: $!\n"; -binmode(F); -# Handle up to 64kB ROM images -$len = read(F, $data, 64*1024); -defined($len) or die "$file: $!\n"; -substr($data, 0, 2) eq "\x55\xAA" or die "$file: Not a boot ROM image\n"; -($pci, $pnp) = unpack('v2', substr($data, 0x18, 4)); -($pci < $len and $pnp < $len) or die "$file: Not a PCI PnP ROM image\n"; -(substr($data, $pci, 4) eq 'PCIR' and substr($data, $pnp, 4) eq '$PnP') - or die "$file: No PCI and PNP structures, not a PCI PNP ROM image\n"; -&swaplocs(\$data, $pci+13, $pci+15); -&swaplocs(\$data, $pnp+18, $pnp+20); -seek(F, 0, SEEK_SET) or die "$file: Cannot seek to beginning\n"; -print F $data; -close(F); -print "PCI devids now: ", &printdevids(\$data, $pci+13), "\n"; -print "PnP devids now: ", &printdevids(\$data, $pnp+18), "\n"; -exit(0); |