diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2015-08-03 16:27:56 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-03-29 16:29:34 -0500 |
commit | 8703d19f71ebe117e36d076d456b742c2a716b4d (patch) | |
tree | 169b249d7daa867c64a9f26537d80866dbc08890 /create_pnor_image.pl | |
parent | 1e4410052a26acf4b439226860afae9507f0d94a (diff) | |
download | pnor-8703d19f71ebe117e36d076d456b742c2a716b4d.tar.gz pnor-8703d19f71ebe117e36d076d456b742c2a716b4d.zip |
Adding XZ decompression functionality for the skiboot payload
Diffstat (limited to 'create_pnor_image.pl')
-rwxr-xr-x | create_pnor_image.pl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/create_pnor_image.pl b/create_pnor_image.pl index a8ebc57..c30196c 100755 --- a/create_pnor_image.pl +++ b/create_pnor_image.pl @@ -18,6 +18,7 @@ my $sbe_binary_filename = ""; my $wink_binary_filename = ""; my $occ_binary_filename = ""; my $openpower_version_filename = ""; +my $xz_compression = "false"; while (@ARGV > 0){ $_ = $ARGV[0]; @@ -84,6 +85,10 @@ while (@ARGV > 0){ $openpower_version_filename = $ARGV[1] or die "Bad command line arg given: expecting openpower version filename.\n"; shift; } + elsif (/^-xz_compression/i){ + $xz_compression = $ARGV[1] or die "Bad command line arg given: expecting xz compression flag.\n"; + shift; + } else { print "Unrecognized command line arg: $_ \n"; print "To view all the options and help text run \'$program_name -h\' \n"; @@ -99,6 +104,11 @@ if ($outdir eq "") { print "scratch_dir = $scratch_dir\n"; print "pnor_data_dir = $pnor_data_dir\n"; +if($xz_compression eq "false") { + run_command("sed -i '/compressed/d' $xml_layout_file\n"); + run_command("sed -i '/algorithm/d' $xml_layout_file\n"); +} + my $build_pnor_command = "$hb_image_dir/buildpnor.pl"; $build_pnor_command .= " --pnorOutBin $pnor_filename --pnorLayout $xml_layout_file"; $build_pnor_command .= " --binFile_HBD $scratch_dir/$targeting_binary_filename"; |