]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/GuidSection.py
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / GuidSection.py
index 8362073f97a30c533ad4484cb53a8656a4df213b..c55fb34f2b74e0703684622e2b4bed5d4489a8d9 100644 (file)
@@ -1,7 +1,8 @@
 ## @file\r
 # process GUIDed section generation\r
 #\r
-#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -28,6 +29,7 @@ from Common.BuildToolError import *
 from FvImageSection import FvImageSection\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
 from GenFds import FindExtendTool\r
+from Common.DataType import *\r
 \r
 ## generate GUIDed section\r
 #\r
@@ -74,7 +76,7 @@ class GuidSection(GuidSectionClassObject) :
             FvAddrIsSet = True\r
         else:\r
             FvAddrIsSet = False\r
-        \r
+\r
         if self.ProcessRequired in ("TRUE", "1"):\r
             if self.FvAddr != []:\r
                 #no use FvAddr when the image is processed.\r
@@ -121,7 +123,7 @@ class GuidSection(GuidSectionClassObject) :
         OutputFile = OutputPath + \\r
                      os.sep + \\r
                      ModuleName + \\r
-                     'SEC' + \\r
+                     SUP_MODULE_SEC + \\r
                      SecNum + \\r
                      Ffs.SectionSuffix['GUIDED']\r
         OutputFile = os.path.normpath(OutputFile)\r
@@ -156,7 +158,7 @@ class GuidSection(GuidSectionClassObject) :
             TempFile = OutputPath + \\r
                        os.sep + \\r
                        ModuleName + \\r
-                       'SEC' + \\r
+                       SUP_MODULE_SEC + \\r
                        SecNum + \\r
                        '.tmp'\r
             TempFile = os.path.normpath(TempFile)\r
@@ -272,6 +274,8 @@ class GuidSection(GuidSectionClassObject) :
                 self.Alignment = None\r
                 self.IncludeFvSection = False\r
                 self.ProcessRequired = "TRUE"\r
+            if IsMakefile and self.Alignment is not None and self.Alignment.strip() == '0':\r
+                self.Alignment = '1'\r
             return OutputFileList, self.Alignment\r
 \r
 \r