diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/build/buildpnor/defaultPnorLayout.xml | 4 | ||||
| -rwxr-xr-x | src/build/buildpnor/genPnorImages.pl | 27 |
2 files changed, 20 insertions, 11 deletions
diff --git a/src/build/buildpnor/defaultPnorLayout.xml b/src/build/buildpnor/defaultPnorLayout.xml index bedc42dae..85db37ae0 100644 --- a/src/build/buildpnor/defaultPnorLayout.xml +++ b/src/build/buildpnor/defaultPnorLayout.xml @@ -195,7 +195,9 @@ Layout Description <ecc/> </section> <section> - <description>Special PNOR Test Space (36K)</description> + <!-- Note there is no <sha512Version/> tag on purpose to avoid hostboot + from skipping header. Signing is forced in build pnor phase --> + <description>Special PNOR Test Space with Header (36K)</description> <eyeCatch>TESTRO</eyeCatch> <physicalOffset>0x2C76000</physicalOffset> <physicalRegionSize>0x9000</physicalRegionSize> diff --git a/src/build/buildpnor/genPnorImages.pl b/src/build/buildpnor/genPnorImages.pl index 428446a98..614c44334 100755 --- a/src/build/buildpnor/genPnorImages.pl +++ b/src/build/buildpnor/genPnorImages.pl @@ -564,6 +564,7 @@ sub manipulateImages $isNormalSecure ||= ($eyeCatch eq "HCODE"); $isNormalSecure ||= ($eyeCatch eq "WOFDATA"); $isNormalSecure ||= ($eyeCatch eq "IMA_CATALOG"); + $isNormalSecure ||= ($eyeCatch eq "TESTRO"); my $isSpecialSecure = ($eyeCatch eq "HBB"); $isSpecialSecure ||= ($eyeCatch eq "HBD"); @@ -837,25 +838,31 @@ sub manipulateImages # fill the partition. elsif (!-e $bin_file) { - # Test partitions have random data - if ($eyeCatch eq "TEST" || $eyeCatch eq "TESTRO") - { - run_command("dd if=/dev/urandom of=$tempImages{PAD_PHASE} count=1 bs=$size"); - } - elsif ($eyeCatch eq "SBKT" && $secureboot && $keyTransition{enabled}) + + if ($eyeCatch eq "SBKT" && $secureboot && $keyTransition{enabled}) { $callerHwHdrFields{configure} = 1; create_sb_key_transition_container($tempImages{PAD_PHASE}); setCallerHwHdrFields(\%callerHwHdrFields, $tempImages{PAD_PHASE}); } - # Other partitions fill with FF's if no empty bin file provided else { - run_command("dd if=/dev/zero bs=$size count=1 | tr \"\\000\" \"\\377\" > $tempImages{PAD_PHASE}"); + # Test partitions have random data + if ($eyeCatch eq "TEST" || $eyeCatch eq "TESTRO") + { + run_command("dd if=/dev/urandom of=$tempImages{PAD_PHASE} count=1 bs=$size"); + } + # Other partitions fill with FF's if no empty bin file provided + else + { + run_command("dd if=/dev/zero bs=$size count=1 | tr \"\\000\" \"\\377\" > $tempImages{PAD_PHASE}"); + } # Add secure container header - if( ($sectionHash{$layoutKey}{sha512Version} eq "yes") - && ($eyeCatch ne "SBKT")) + # Force TESTRO section to have a header + if( ($eyeCatch eq "TESTRO") || + (($sectionHash{$layoutKey}{sha512Version} eq "yes") + && ($eyeCatch ne "SBKT"))) { # Remove PAGE_SIZE bytes from generated dummy content of # file to make room for the secure header |

