Skip to content

Commit

Permalink
Merge pull request #124 from crgeddes/master
Browse files Browse the repository at this point in the history
Update pnor generation scripts to fill in ECC for EECACHE section
  • Loading branch information
crgeddes authored Aug 6, 2019
2 parents 4fbcc5e + a71b1d0 commit 1bfff01
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions create_pnor_image.pl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@
$build_pnor_command .= " --binFile_MVPD $scratch_dir/mvpd_fill.bin.ecc";
}

if (checkForPnorPartition("EECACHE", $parsed_pnor_layout))
{
$build_pnor_command .= " --binFile_EECACHE $scratch_dir/eecache_fill.bin.ecc";
}

if (checkForPnorPartition("OCMBFW", $parsed_pnor_layout))
{
$build_pnor_command .= " --binFile_OCMBFW $ocmbfw_binary_filename";
Expand Down
9 changes: 9 additions & 0 deletions update_image.pl
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ sub processConvergedSections {
$sections{MVPD}{out} = "$scratch_dir/mvpd_fill.bin.ecc";
}

if (checkForPnorPartition("EECACHE", $parsed_pnor_layout))
{
$sections{EECACHE}{out} = "$scratch_dir/eecache_fill.bin.ecc";
}

if(-e $wof_binary_filename)
{
$sections{WOFDATA}{in} = "$wof_binary_filename";
Expand Down Expand Up @@ -604,6 +609,10 @@ sub processConvergedSections {
# Create blank binary file for NVRAM partition
run_command("dd if=/dev/zero bs=512K count=1 of=$scratch_dir/nvram.bin");

# Create blank binary file for EECACHE partition
run_command("dd if=/dev/zero bs=512K count=1 | tr \"\\000\" \"\\377\" > $scratch_dir/hostboot.temp.bin");
run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/eecache_fill.bin.ecc --p8");

# Create blank binary file for MVPD partition
run_command("dd if=/dev/zero bs=512K count=1 | tr \"\\000\" \"\\377\" > $scratch_dir/hostboot.temp.bin");
run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/mvpd_fill.bin.ecc --p8");
Expand Down

0 comments on commit 1bfff01

Please sign in to comment.