]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/EfiSection.py
BaseTools/GenFds: cleanup GenFds
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / EfiSection.py
index 623b77d27427a83d42c75842a507718fc115da3f..f8573b5c7d1b03bfcef1e0843744967055358a69 100644 (file)
@@ -20,7 +20,7 @@ from struct import *
 from . import Section\r
 from .GenFdsGlobalVariable import GenFdsGlobalVariable\r
 import subprocess\r
-from .Ffs import Ffs\r
+from .Ffs import SectionSuffix\r
 import Common.LongFilePathOs as os\r
 from CommonDataClass.FdfClass import EfiSectionClassObject\r
 from Common import EdkLogger\r
@@ -124,7 +124,7 @@ class EfiSection (EfiSectionClassObject):
                     BuildNumTuple = tuple()\r
 \r
                 Num = SecNum\r
-                OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + str(Num) + Ffs.SectionSuffix.get(SectionType))\r
+                OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + str(Num) + SectionSuffix.get(SectionType))\r
                 GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_VERSION',\r
                                                     #Ui=StringData,\r
                                                     Ver=BuildNum,\r
@@ -135,7 +135,7 @@ class EfiSection (EfiSectionClassObject):
                 for File in FileList:\r
                     Index = Index + 1\r
                     Num = '%s.%d' %(SecNum, Index)\r
-                    OutputFile = os.path.join(OutputPath, ModuleName + SUP_MODULE_SEC + Num + Ffs.SectionSuffix.get(SectionType))\r
+                    OutputFile = os.path.join(OutputPath, ModuleName + SUP_MODULE_SEC + Num + SectionSuffix.get(SectionType))\r
                     f = open(File, 'r')\r
                     VerString = f.read()\r
                     f.close()\r
@@ -164,7 +164,7 @@ class EfiSection (EfiSectionClassObject):
                     else:\r
                         EdkLogger.error("GenFds", GENFDS_ERROR, "File: %s miss Version Section value" %InfFileName)\r
                 Num = SecNum\r
-                OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + str(Num) + Ffs.SectionSuffix.get(SectionType))\r
+                OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + str(Num) + SectionSuffix.get(SectionType))\r
                 GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_VERSION',\r
                                                     #Ui=VerString,\r
                                                     Ver=BuildNum,\r
@@ -185,7 +185,7 @@ class EfiSection (EfiSectionClassObject):
                 Num = SecNum\r
                 if IsMakefile and StringData == ModuleNameStr:\r
                     StringData = "$(MODULE_NAME)"\r
-                OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + str(Num) + Ffs.SectionSuffix.get(SectionType))\r
+                OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + str(Num) + SectionSuffix.get(SectionType))\r
                 GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_USER_INTERFACE',\r
                                                      Ui=StringData, IsMakefile=IsMakefile)\r
                 OutputFileList.append(OutputFile)\r
@@ -194,7 +194,7 @@ class EfiSection (EfiSectionClassObject):
                 for File in FileList:\r
                     Index = Index + 1\r
                     Num = '%s.%d' %(SecNum, Index)\r
-                    OutputFile = os.path.join(OutputPath, ModuleName + SUP_MODULE_SEC + Num + Ffs.SectionSuffix.get(SectionType))\r
+                    OutputFile = os.path.join(OutputPath, ModuleName + SUP_MODULE_SEC + Num + SectionSuffix.get(SectionType))\r
                     f = open(File, 'r')\r
                     UiString = f.read()\r
                     f.close()\r
@@ -218,7 +218,7 @@ class EfiSection (EfiSectionClassObject):
                 Num = SecNum\r
                 if IsMakefile and StringData == ModuleNameStr:\r
                     StringData = "$(MODULE_NAME)"\r
-                OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + str(Num) + Ffs.SectionSuffix.get(SectionType))\r
+                OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + str(Num) + SectionSuffix.get(SectionType))\r
                 GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_USER_INTERFACE',\r
                                                      Ui=StringData, IsMakefile=IsMakefile)\r
                 OutputFileList.append(OutputFile)\r
@@ -239,7 +239,7 @@ class EfiSection (EfiSectionClassObject):
                     """ Copy Map file to FFS output path """\r
                     Index = Index + 1\r
                     Num = '%s.%d' %(SecNum, Index)\r
-                    OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + Num + Ffs.SectionSuffix.get(SectionType))\r
+                    OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + Num + SectionSuffix.get(SectionType))\r
                     File = GenFdsGlobalVariable.MacroExtend(File, Dict)\r
 \r
                     #Get PE Section alignment when align is set to AUTO\r