Skip to content

Commit

Permalink
Populate HBBL partition
Browse files Browse the repository at this point in the history
  • Loading branch information
sannerd committed Feb 4, 2017
1 parent d642432 commit cadbb09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions create_pnor_image.pl
Expand Up @@ -136,6 +136,7 @@
$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\"";
Expand Down
9 changes: 9 additions & 0 deletions update_image.pl
Expand Up @@ -155,6 +155,15 @@
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");\
Expand Down

0 comments on commit cadbb09

Please sign in to comment.