summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Hoffa <wihoffa@gmail.com>2018-04-02 13:22:27 -0500
committerGitHub <noreply@github.com>2018-04-02 13:22:27 -0500
commitdafcab48658b4de48e70c929b036985dac7ef7b8 (patch)
treef1f374f11fe913f825c25280b4564e6ed9c519af
parent824b1bf91c6f030e696c1a4d72b7311985006705 (diff)
parent16d2c17d994af6b815403d2380ea1386fb5691a0 (diff)
downloadpnor-dafcab48658b4de48e70c929b036985dac7ef7b8.tar.gz
pnor-dafcab48658b4de48e70c929b036985dac7ef7b8.zip
Merge pull request #94 from rjknight/master
Add support for hcode repo
-rwxr-xr-xupdate_image.pl17
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";
OpenPOWER on IntegriCloud