## @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
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
\r
##\r
# Import Modules\r
#\r
-import Section\r
+from __future__ import absolute_import\r
+from . import Section\r
import subprocess\r
-from Ffs import Ffs\r
+from .Ffs import SectionSuffix\r
import Common.LongFilePathOs as os\r
-from GenFdsGlobalVariable import GenFdsGlobalVariable\r
+from .GenFdsGlobalVariable import GenFdsGlobalVariable\r
+from .GenFdsGlobalVariable import FindExtendTool\r
from CommonDataClass.FdfClass import GuidSectionClassObject\r
-from Common import ToolDefClassObject\r
import sys\r
from Common import EdkLogger\r
from Common.BuildToolError import *\r
-from FvImageSection import FvImageSection\r
+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
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
OutputFile = OutputPath + \\r
os.sep + \\r
ModuleName + \\r
- 'SEC' + \\r
+ SUP_MODULE_SEC + \\r
SecNum + \\r
- Ffs.SectionSuffix['GUIDED']\r
+ SectionSuffix['GUIDED']\r
OutputFile = os.path.normpath(OutputFile)\r
\r
ExternalTool = None\r
TempFile = OutputPath + \\r
os.sep + \\r
ModuleName + \\r
- 'SEC' + \\r
+ SUP_MODULE_SEC + \\r
SecNum + \\r
'.tmp'\r
TempFile = os.path.normpath(TempFile)\r
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