summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Sanner <dsanner@us.ibm.com>2017-02-03 10:52:24 -0600
committerDean Sanner <dsanner@us.ibm.com>2017-02-03 21:10:13 -0600
commitcadbb09e40877748f54774869c2e64fd86ea737c (patch)
tree582b5a493238533c6ea0b5dfeda004d835ce606c
parentd64243265a6e34a39917fc084d949338ab306adb (diff)
downloadpnor-cadbb09e40877748f54774869c2e64fd86ea737c.tar.gz
pnor-cadbb09e40877748f54774869c2e64fd86ea737c.zip
Populate HBBL partition
-rwxr-xr-xcreate_pnor_image.pl1
-rwxr-xr-xupdate_image.pl9
2 files changed, 10 insertions, 0 deletions
diff --git a/create_pnor_image.pl b/create_pnor_image.pl
index cdfed1e..33dddcf 100755
--- a/create_pnor_image.pl
+++ b/create_pnor_image.pl
@@ -136,6 +136,7 @@ if ($release eq "p8"){
$build_pnor_command .= " --binFile_WINK $scratch_dir/$wink_binary_filename";
} else {
$build_pnor_command .= " --binFile_HCODE $scratch_dir/$wink_binary_filename";
+ $build_pnor_command .= " --binFile_HBBL $scratch_dir/hbbl.bin.ecc";
}
$build_pnor_command .= " --fpartCmd \"fpart\"";
$build_pnor_command .= " --fcpCmd \"fcp\"";
diff --git a/update_image.pl b/update_image.pl
index 4f51c36..c8a6193 100755
--- a/update_image.pl
+++ b/update_image.pl
@@ -155,6 +155,15 @@ run_command("cat $hb_image_dir/img/hostboot_extended.bin >> $scratch_dir/hostboo
run_command("dd if=$scratch_dir/hostboot.temp.bin of=$scratch_dir/hostboot_extended.header.bin ibs=5120k conv=sync");
run_command("ecc --inject $scratch_dir/hostboot_extended.header.bin --output $scratch_dir/hostboot_extended.header.bin.ecc --p8");
+#Create HBBL section
+if ($release eq "p9") {
+ # remove first 12K from bin, then extend. No secure header yet for HBBL section
+ run_command("tail -c +12289 $hb_image_dir/img/hostboot_bootloader.bin > $scratch_dir/hbbl.bin");
+ run_command("dd if=$scratch_dir/hbbl.bin of=$scratch_dir/hbbl.bin.pad ibs=20K conv=sync");
+ run_command("ecc --inject $scratch_dir/hbbl.bin.pad --output $scratch_dir/hbbl.bin.tmp.ecc --p8");
+ run_command("dd if=$scratch_dir/hbbl.bin.tmp.ecc of=$scratch_dir/hbbl.bin.ecc ibs=24K conv=sync"); #0s is good ECC
+}
+
#Create blank binary file for HB Errorlogs (HBEL) Partition
run_command("dd if=/dev/zero bs=128K count=1 | tr \"\\000\" \"\\377\" > $scratch_dir/hostboot.temp.bin");
run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/hbel.bin.ecc --p8");\
OpenPOWER on IntegriCloud