self.Expression = self.Expression.replace(Item, ExpGuidDict[Item])\r
\r
self.Expression = self.Expression.strip()\r
- ModuleType = (self.DepexType.startswith('PEI') and ['PEIM'] or ['DXE_DRIVER'])[0]\r
- if self.DepexType.startswith('SMM'):\r
- ModuleType = 'SMM_DRIVER'\r
- InputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.dpx')\r
- InputFile = os.path.normpath(InputFile)\r
+ if self.DepexType == 'PEI_DEPEX_EXP':\r
+ ModuleType = 'PEIM'\r
+ SecType = 'PEI_DEPEX'\r
+ elif self.DepexType == 'DXE_DEPEX_EXP':\r
+ ModuleType = 'DXE_DRIVER'\r
+ SecType = 'DXE_DEPEX'\r
+ elif self.DepexType == 'SMM_DEPEX_EXP':\r
+ ModuleType = 'DXE_SMM_DRIVER'\r
+ SecType = 'SMM_DEPEX'\r
+ else:\r
+ EdkLogger.error("GenFds", FORMAT_INVALID,\r
+ "Depex type %s is not valid for module %s" % (self.DepexType, ModuleName))\r
\r
- Dpx = DependencyExpression(self.Expression, ModuleType)\r
- Dpx.Generate(InputFile)\r
+ InputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.depex')\r
+ InputFile = os.path.normpath(InputFile)\r
+ Depex = DependencyExpression(self.Expression, ModuleType)\r
+ Depex.Generate(InputFile)\r
\r
- OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.depex')\r
- if self.DepexType.startswith('SMM'):\r
- OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.smm')\r
+ OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.dpx')\r
OutputFile = os.path.normpath(OutputFile)\r
- SecType = (self.DepexType.startswith('PEI') and ['PEI_DEPEX'] or ['DXE_DEPEX'])[0]\r
- if self.DepexType.startswith('SMM'):\r
- SecType = 'SMM_DEPEX'\r
- \r
+\r
GenFdsGlobalVariable.GenerateSection(OutputFile, [InputFile], Section.Section.SectionType.get (SecType))\r
FileList = [OutputFile]\r
return FileList, self.Alignment\r