3 from GenFdsGlobalVariable import GenFdsGlobalVariable
\r
6 from CommonDataClass.FdfClassObject import FileStatementsClassObject
\r
8 class FileStatements (FileStatementsClassObject) :
\r
10 FileStatementsClassObject.__init__(self)
\r
13 OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, self.NameGuid)
\r
14 if not os.path.exists(OutputDir):
\r
15 os.makedirs(OutputDir)
\r
17 if self.FileName != None :
\r
18 SectionFiles = ' -i ' + \
\r
19 GenFdsGlobalVariable.ReplaceWorkspaceMarco(self.FileName)
\r
22 for section in self.SectionList :
\r
23 sect, align = section.GenSection(OutputDir, self.NameGuid, self.KeyStringList)
\r
25 SectionFiles = SectionFiles + \
\r
29 SectionFiles = SectionFiles + \
\r
34 # Prepare the parameter
\r
36 print "Fixe = ", self.Fixed
\r
37 if self.Fixed != False:
\r
41 print "CheckSum=", self.CheckSum
\r
42 if self.CheckSum != False :
\r
47 if self.Alignment != None and self.Alignment !='':
\r
48 Alignment = ' -a ' + '%s' %self.Alignment
\r
52 if not (self.FvType == None):
\r
53 FileType = ' -t ' + Ffs.Ffs.FvTypeToFileType.get(self.FvType)
\r
57 FfsFileOutput = os.path.join(OutputDir, self.NameGuid + '.ffs')
\r
60 GenFfsCmd = 'GenFfs' + \
\r
72 GenFdsGlobalVariable.CallExternalTool(GenFfsCmd,"GenFfs Failed !")
\r
73 return FfsFileOutput
\r