[APL] Enhance Boot Guard check logic for IFWI image

This patch updated the logic to check if Boot Guard is enabled in
the base IFWI image.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This commit is contained in:
Maurice Ma 2019-04-16 10:27:45 -07:00
parent 0721b7c3d4
commit 8255640056
1 changed files with 1 additions and 1 deletions

View File

@ -784,7 +784,7 @@ def CreateIfwiImage (IfwiIn, IfwiOut, BiosOut, PlatformData, NonRedundant, Stitc
if not Comp: if not Comp:
raise Exception ('Unsupported base image format !') raise Exception ('Unsupported base image format !')
Data = IfwiData[Comp.Offset + 0x30:Comp.Offset + 0x32] Data = IfwiData[Comp.Offset + 0x30:Comp.Offset + 0x32]
if Data[0] != 0x10 or Data[1] != 0x00: if (Data[0] & 0x0F) != 0x00:
raise Exception ('Unsupported base image type. Boot Guard might have been enabled in this image !') raise Exception ('Unsupported base image type. Boot Guard might have been enabled in this image !')
print ('Creating %sredundant image ...' % ('Non-' if NonRedundant else '')) print ('Creating %sredundant image ...' % ('Non-' if NonRedundant else ''))