diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2017-10-25 15:41:02 -0500 |
---|---|---|
committer | Richard J. Knight <rjknight@us.ibm.com> | 2018-03-29 15:20:22 -0500 |
commit | 16d2c17d994af6b815403d2380ea1386fb5691a0 (patch) | |
tree | f1f374f11fe913f825c25280b4564e6ed9c519af | |
parent | 824b1bf91c6f030e696c1a4d72b7311985006705 (diff) | |
download | pnor-16d2c17d994af6b815403d2380ea1386fb5691a0.tar.gz pnor-16d2c17d994af6b815403d2380ea1386fb5691a0.zip |
Add support for hcode repo
-Modify update_image.pl to support passing an alternate location
for the hardware image (HCODE)
-rwxr-xr-x | update_image.pl | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/update_image.pl b/update_image.pl index be782df..a8bafc0 100755 --- a/update_image.pl +++ b/update_image.pl @@ -10,6 +10,7 @@ my $op_target_dir = ""; my $hb_image_dir = ""; my $scratch_dir = ""; my $hb_binary_dir = ""; +my $hcode_dir = ""; my $sbe_binary_dir = ""; my $targeting_binary_filename = ""; my $targeting_binary_source = ""; @@ -62,6 +63,10 @@ while (@ARGV > 0){ $hb_binary_dir = $ARGV[1] or die "Bad command line arg given: expecting a config type.\n"; shift; } + elsif (/^-hcode_dir/i){ + $hcode_dir = $ARGV[1] or die "Bad command line arg given: expecting a config type.\n"; + shift; + } elsif (/^-sbe_binary_dir/i){ $sbe_binary_dir = $ARGV[1] or die "Bad command line arg given: expecting a config type.\n"; shift; @@ -156,6 +161,13 @@ while (@ARGV > 0){ shift; } +#if hcode_dir is not defined, default to the hostboot-binaries location +if(!$hcode_dir) +{ + $hcode_dir = $hb_binary_dir; +} + + # If OpenPOWER hostboot is compiled with secureboot, then -always- build with # secure signatures (and hash page tables for applicable partitions), otherwise # use "dummy" secure headers which lack signatures, and don't do any page table @@ -211,7 +223,7 @@ if ($release eq "p9") { # SBE image prep if ($release eq "p9") { - run_command("python $sbe_binary_dir/sbeOpDistribute.py --install --buildSbePart $hb_image_dir/buildSbePart.pl --hw_ref_image $hb_binary_dir/p9n.ref_image.bin --sbe_binary_filename $sbe_binary_filename --scratch_dir $scratch_dir --sbe_binary_dir $sbe_binary_dir"); + run_command("python $sbe_binary_dir/sbeOpDistribute.py --install --buildSbePart $hb_image_dir/buildSbePart.pl --hw_ref_image $hcode_dir/p9n.ref_image.bin --sbe_binary_filename $sbe_binary_filename --scratch_dir $scratch_dir --sbe_binary_dir $sbe_binary_dir"); } else { run_command("cp $hb_binary_dir/$sbe_binary_filename $scratch_dir/"); @@ -227,6 +239,7 @@ sub processConvergedSections { my $sbePreEcc = "$scratch_dir/$sbe_binary_filename"; $sbePreEcc =~ s/.ecc//; + # Source and destination file for each supported section my %sections=(); $sections{HBBL}{in} = "$scratch_dir/hbbl.bin"; @@ -241,7 +254,7 @@ sub processConvergedSections { $sections{SBE}{out} = "$scratch_dir/$sbe_binary_filename"; $sections{PAYLOAD}{in} = "$payload.bin"; $sections{PAYLOAD}{out} = "$scratch_dir/$payload_filename"; - $sections{HCODE}{in} = "$hb_binary_dir/${stop_basename}.bin"; + $sections{HCODE}{in} = "$hcode_dir/${stop_basename}.bin"; $sections{HCODE}{out} = "$scratch_dir/${stop_basename}.hdr.bin.ecc"; $sections{HBRT}{in} = "$hb_image_dir/img/hostboot_runtime.bin"; $sections{HBRT}{out} = "$scratch_dir/hostboot_runtime.header.bin.ecc"; |