5 from GenFdsGlobalVariable import GenFdsGlobalVariable
\r
8 class FvImageSection(Section.Section):
\r
10 self.Aligenment = None
\r
13 def GenSection(self, OutputPath, ModuleName, KeyStringList, FfsInf = None):
\r
14 Buffer = StringIO.StringIO('')
\r
18 if self.FvName != None:
\r
19 Fv = GenFdsGlobalVariable.FdfParser.profile.FvDict.get(self.FvName)
\r
23 raise Exception("FvImageSection Failed! Can't describe the \
\r
24 FvImageSection both in FvUiName and \
\r
27 FvFileName = self.Fv.AddToBuffer(Buffer)
\r
29 # Prepare the parameter of GenSection
\r
31 OutputFile = os.path.join(OutputPath, ModuleName + Ffs.SectionSuffix.get("FV_IMAGE"))
\r
33 GenSectionCmd = 'GenSec -o ' + \
\r
36 'EFI_SECTION_FIRMWARE_VOLUME_IMAGE ' + \
\r
40 GenFdsGlobalVariable.CallExternalTool(GenSectionCmd, "GenSection Failed!")
\r
41 return OutputFile, self.Aligenment
\r