summaryrefslogtreecommitdiffstats
path: root/src/build/vpo/hb-dump
diff options
context:
space:
mode:
authorCamVan Nguyen <ctnguyen@us.ibm.com>2012-02-03 12:25:27 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-02-07 11:57:25 -0600
commitcadd824189729c71542271e41460290ed7c5e961 (patch)
treeed6e2ab9653572f76f5b688e67122612ab501045 /src/build/vpo/hb-dump
parent4f09f9f6573e174c72b684b883d77f824fe949fe (diff)
downloadtalos-hostboot-cadd824189729c71542271e41460290ed7c5e961.tar.gz
talos-hostboot-cadd824189729c71542271e41460290ed7c5e961.zip
Changes to VPO tools:
Add tool's directory to perl's search path so tool modules can be found and tool can be invoked from anywhere. Change to use Hostboot's own copies of external vbu tools. Change to use common arguments for tools. Change-Id: Ide6233df381e33e724c4b57bf5fdeb37ff7233bb Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/645 Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/vpo/hb-dump')
-rwxr-xr-xsrc/build/vpo/hb-dump46
1 files changed, 9 insertions, 37 deletions
diff --git a/src/build/vpo/hb-dump b/src/build/vpo/hb-dump
index 276fad24e..73e8f07ec 100755
--- a/src/build/vpo/hb-dump
+++ b/src/build/vpo/hb-dump
@@ -34,7 +34,7 @@
#------------------------------------------------------------------------------
use strict;
use warnings;
-
+use File::Basename;
#------------------------------------------------------------------------------
# Forward Declaration
@@ -53,18 +53,8 @@ my $numArgs = $#ARGV + 1;
#print "num args = $numArgs\n";
#print "argument list = @ARGV\n";
-my $hbDir = $ENV{'HBDIR'};
-if (defined ($hbDir))
-{
- unless ($hbDir ne "")
- {
- $hbDir = '.'; #Set to current directory
- }
-}
-else
-{
- $hbDir = '.'; #Set to current directory
-}
+my $toolDir = dirname (__FILE__);
+#print "$toolDir\n";
for (my $i=0; $i<$numArgs; $i++)
{
@@ -74,20 +64,11 @@ for (my $i=0; $i<$numArgs; $i++)
printUsage();
exit (0);
}
- elsif ($ARGV[$i] eq "--in")
- {
- if (($i + 1) >= $numArgs)
- {
- die "No value given for --in parameter.\n";
- }
- $i++;
- $hbDir = $ARGV[$i];
- }
- elsif ($ARGV[$i] eq "--out")
+ elsif ($ARGV[$i] eq "--out-path")
{
if (($i + 1) >= $numArgs)
{
- die "No value given for --out parameter.\n";
+ die "No value given for --out-path parameter.\n";
}
$i++;
}
@@ -103,7 +84,7 @@ for (my $i=0; $i<$numArgs; $i++)
#------------------------------------------------------------------------------
# Dump L3
#------------------------------------------------------------------------------
-my $command = "$hbDir/hb-virtdebug.pl @ARGV";
+my $command = "$toolDir/hb-virtdebug.pl @ARGV";
system($command);
@@ -116,29 +97,20 @@ system($command);
#------------------------------------------------------------------------------
sub printUsage()
{
- print ("\nUsage: hb-dump [--help] | [--in <path to hb-virtdebug.pl>]\n");
- print (" [--out <path to save output data>]\n");
+ print ("\nUsage: hb-dump [--help] |\n");
+ print (" [--out-path <path to save output data>]\n");
print (" [-k#] [-n#] [-s#] [-p#] [-c#]\n\n");
print (" This program dumps the entire L3 to a file.\n");
print (" Use the hb-parsedump.pl program to expand and view data in the file.\n\n");
print (" User should copy hb-virtdebug.pl to the current directory or set\n");
print (" the env variable HBDIR to the path of the file.\n\n");
print (" --help Prints usage information.\n");
- print (" --in Overrides the automatically detected hb-virtdebug.pl file\n");
- print (" in HBDIR or the current directory.\n");
- print (" This program will search for the file in the ");
- print ("following order:\n");
- print (" 1. from the path specified by the user\n");
- print (" 2. from HBDIR if it is defined\n");
- print (" 3. from the current directory\n");
- print (" --out Directory where the output data will be saved.\n");
+ print (" --out-path Directory where the output data will be saved.\n");
print (" Default path is the current directory.\n");
print (" -k# Specify which cage to act on (default = 0).\n");
print (" -n# Specify which node to act on (default = 0).\n");
print (" -s# Specify which slot to act on (default = 0).\n");
print (" -p# Specify which chip position to act on (default = 0).\n");
print (" -c# Specify which core/chipUnit to act on (default = 3).\n");
- print ("\n NOTE: This program will not work if user has not stopped instructions\n");
- print (" prior to running this program.\n");
}
OpenPOWER on IntegriCloud