summaryrefslogtreecommitdiffstats
path: root/src/build/debug
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-01-24 14:16:52 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-01-30 12:13:35 -0500
commit89c55d65e62b74221262652c02c4afef0590e127 (patch)
tree866925525fde194d54da8c9409cee9853079b80f /src/build/debug
parent24d823ba8823ec86fad7c316abb46aae1cb08997 (diff)
downloadtalos-hostboot-89c55d65e62b74221262652c02c4afef0590e127.tar.gz
talos-hostboot-89c55d65e62b74221262652c02c4afef0590e127.zip
Add output parm to Dump tool
New 'outdir' argument allows a user to specify the directory where the hbdump file should be written to, not specifying the argument defaults to the current directory (./) like previous code. BackPort: yes Change-Id: I7778c62b2b14dc77d832c71c251c9dcfb0505c87 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35350 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/debug')
-rwxr-xr-xsrc/build/debug/Hostboot/Dump.pm17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/build/debug/Hostboot/Dump.pm b/src/build/debug/Hostboot/Dump.pm
index ac33fff47..6a89f0365 100755
--- a/src/build/debug/Hostboot/Dump.pm
+++ b/src/build/debug/Hostboot/Dump.pm
@@ -6,7 +6,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2012,2016
+# Contributors Listed Below - COPYRIGHT 2012,2017
# [+] International Business Machines Corp.
#
#
@@ -113,6 +113,13 @@ sub main
$debug = 1;
}
+ # Check for a different output directory
+ my $outdir = "./";
+ if (defined $args->{"outdir"})
+ {
+ $outdir = $args->{"outdir"};
+ }
+
# Read the current memory state.
my $memstate_addr = ::read64(0x2000 + 0x8); # Read descriptor address.
$memstate_addr += 0x10; # Memory state is 3rd entry into descriptor.
@@ -122,9 +129,9 @@ sub main
#Get current timestamp and open a corresponding file.
my $timeStamp = `date +%Y%m%d%H%M`;
chomp $timeStamp;
- my $hbDumpFile = "hbdump.$timeStamp";
+ my $hbDumpFile = "$outdir\hbdump.$timeStamp";
- ::userDisplay "Dumping Hostboot to Open output file $hbDumpFile\n";
+ ::userDisplay "Dumping Hostboot to $hbDumpFile\n";
open( OUTFH, ">$hbDumpFile" ) or die "can't open $hbDumpFile: $!\n";
binmode(OUTFH);
@@ -166,5 +173,9 @@ sub helpInfo
my %info = (
name => "Dump",
intro => ["Dumps the entire Hostboot buffer to a file."],
+ options => {
+ "outdir=<path>" => ["Output directory for dump file"],
+ "debug" => ["More debug output."],
+ },
);
}
OpenPOWER on IntegriCloud