5 from GenFdsGlobalVariable import GenFdsGlobalVariable
\r
6 from CommonDataClass.FdfClassObject import CompressSectionClassObject
\r
8 class CompressSection (CompressSectionClassObject) :
\r
10 'PI_STD' : ' -c PI_STD ',
\r
11 'NON_PI_STD' : ' -c NON_PI_STD '
\r
15 CompressSectionClassObject.__init__(self)
\r
18 def GenSection(self, OutputPath, ModuleName, KeyStringList, FfsInf = None):
\r
20 # Generate all section
\r
23 self.CompType = FfsInf.__ExtendMarco__(self.CompType)
\r
24 self.Alignment = FfsInf.__ExtendMarco__(self.Alignment)
\r
27 for Sect in self.SectionList:
\r
28 sect, align = Sect.GenSection(OutputPath, ModuleName, KeyStringList, FfsInf)
\r
30 SectFiles = SectFiles + \
\r
35 OutputFile = OutputPath + \
\r
38 Ffs.SectionSuffix['COMPRESS']
\r
39 OutputFile = os.path.normpath(OutputFile)
\r
41 GenSectionCmd = 'GenSec -o ' + \
\r
44 Section.Section.SectionType['COMPRESS'] + \
\r
45 self.CompTypeDict[self.CompType] + \
\r
51 GenFdsGlobalVariable.CallExternalTool(GenSectionCmd, "GenSection Failed!")
\r
53 return OutputFile, self.Alignment
\r