Revision: 19102
http://sourceforge.net/p/edk2/code/19102
Author: vanjeff
Date: 2015-12-03 03:27:13 +0000 (Thu, 03 Dec 2015)
Log Message:
-----------
BaseTools: sync BaseTools from main trunk r18579.
This patch fixes incomplete merge of multiple workspaces support.
Without this patch build fails with error similar to:
~/sources/edk2> build -p MdePkg/MdePkg.dsc -t GCC48 -a X64
Build environment: Linux-3.16.7-24-desktop-x86_64-with-SuSE-13.2-x86_64
Build start time: 17:15:43, Dec.02 2015
WORKSPACE = /home/user/sources/edk2
ECP_SOURCE = /home/user/sources/edk2/EdkCompatibilityPkg
EDK_SOURCE = /home/user/sources/edk2/EdkCompatibilityPkg
EFI_SOURCE = /home/user/sources/edk2/EdkCompatibilityPkg
EDK_TOOLS_PATH = /home/user/sources/edk2/BaseTools
build.py...
: error C0DE: Unknown fatal error when processing
[/home/user/sources/edk2/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf]
(Please send email to [email protected] for help, attaching
following call stack trace!)
(Python 2.7.8 on linux2) Traceback (most recent call last):
File
"/home/user/sources/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py",
line 2033, in Main
MyBuild.Launch()
File
"/home/user/sources/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py",
line 1788, in Launch
self._MultiThreadBuildPlatform()
File
"/home/user/sources/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py",
line 1583, in _MultiThreadBuildPlatform
self.Progress
File "/home/user/sources/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py",
line 175, in __new__
if not AutoGenObject._Init(Workspace, MetaFile, Target, Toolchain, Arch,
*args, **kwargs):
File "/home/user/sources/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py",
line 355, in _Init
Pkgs = list(PkgSet) + list(PGen.PackageList)
File "/home/user/sources/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py",
line 1484, in _GetPackageList
for La in self.LibraryAutoGenList:
File "/home/user/sources/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py",
line 1594, in _GetLibraryAutoGenList
self._GetAutoGenObjectList()
File "/home/user/sources/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py",
line 1575, in _GetAutoGenObjectList
self.MetaFile
File "/home/user/sources/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py",
line 175, in __new__
if not AutoGenObject._Init(Workspace, MetaFile, Target, Toolchain, Arch,
*args, **kwargs):
File "/home/user/sources/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py",
line 2199, in _Init
self.SourceDir = mws.relpath(self.SourceDir, self.WorkspaceDir)
File
"/home/user/sources/edk2/BaseTools/Source/Python/Common/MultipleWorkspace.py",
line 94, in relpath
for Pkg in cls.PACKAGES_PATH:
TypeError: 'NoneType' object is not iterable
- Failed -
Build end time: 17:15:44, Dec.02 2015
Build total time: 00:00:01
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Mike Maslenkin <[email protected]>
Cc: Jeff Fan <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/18579
Modified Paths:
--------------
branches/UDK2015/BaseTools/Source/Python/build/BuildReport.py
branches/UDK2015/BaseTools/Source/Python/build/build.py
Modified: branches/UDK2015/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- branches/UDK2015/BaseTools/Source/Python/build/BuildReport.py
2015-12-03 03:19:01 UTC (rev 19101)
+++ branches/UDK2015/BaseTools/Source/Python/build/BuildReport.py
2015-12-03 03:27:13 UTC (rev 19102)
@@ -41,6 +41,7 @@
from Common.DataType import TAB_BRG_LIBRARY
from Common.DataType import TAB_BACK_SLASH
from Common.LongFilePathSupport import OpenLongFilePath as open
+from Common.MultipleWorkspace import MultipleWorkspace as mws
## Pattern to extract contents in EDK DXS files
gDxsDependencyPattern = re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END",
re.DOTALL)
@@ -1235,12 +1236,13 @@
DecDefaultValue = Package.Pcds[TokenCName,
TokenSpaceGuidCName, DecType].DefaultValue
PlatformPcds[(TokenCName, TokenSpaceGuidCName)] =
DecDefaultValue
#
- # Collect PCDs defined in DSC common section
+ # Collect PCDs defined in DSC file
#
- Platform = Wa.BuildDatabase[Wa.MetaFile, 'COMMON']
- for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
- DscDefaultValue = Platform.Pcds[(TokenCName,
TokenSpaceGuidCName)].DefaultValue
- PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
+ for arch in Wa.ArchList:
+ Platform = Wa.BuildDatabase[Wa.MetaFile, arch]
+ for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
+ DscDefaultValue = Platform.Pcds[(TokenCName,
TokenSpaceGuidCName)].DefaultValue
+ PlatformPcds[(TokenCName, TokenSpaceGuidCName)] =
DscDefaultValue
#
# Add PEI and DXE a priori files GUIDs defined in PI specification.
@@ -1255,7 +1257,7 @@
for Pa in Wa.AutoGenObjectList:
for ModuleKey in Pa.Platform.Modules:
M = Pa.Platform.Modules[ModuleKey].M
- InfPath = os.path.join(Wa.WorkspaceDir, M.MetaFile.File)
+ InfPath = mws.join(Wa.WorkspaceDir, M.MetaFile.File)
self._GuidsDb[M.Guid.upper()] = "%s (%s)" %
(M.Module.BaseName, InfPath)
#
@@ -1277,7 +1279,7 @@
Guid =
GuidStructureByteArrayToGuidString(GuidValue).upper()
for Section in Ffs.SectionList:
try:
- ModuleSectFile = os.path.join(Wa.WorkspaceDir,
Section.SectFileName)
+ ModuleSectFile = mws.join(Wa.WorkspaceDir,
Section.SectFileName)
self._GuidsDb[Guid] = ModuleSectFile
except AttributeError:
pass
Modified: branches/UDK2015/BaseTools/Source/Python/build/build.py
===================================================================
--- branches/UDK2015/BaseTools/Source/Python/build/build.py 2015-12-03
03:19:01 UTC (rev 19101)
+++ branches/UDK2015/BaseTools/Source/Python/build/build.py 2015-12-03
03:27:13 UTC (rev 19102)
@@ -41,6 +41,7 @@
from AutoGen.AutoGen import *
from Common.BuildToolError import *
from Workspace.WorkspaceDatabase import *
+from Common.MultipleWorkspace import MultipleWorkspace as mws
from BuildReport import BuildReport
from GenPatchPcdTable.GenPatchPcdTable import *
@@ -104,12 +105,16 @@
EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in
WORKSPACE path",
ExtraData=WorkspaceDir)
os.environ["WORKSPACE"] = WorkspaceDir
+
+ # set multiple workspace
+ PackagesPath = os.getenv("PACKAGES_PATH")
+ mws.setWs(WorkspaceDir, PackagesPath)
#
# Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to
ECP
#
if "ECP_SOURCE" not in os.environ:
- os.environ["ECP_SOURCE"] = os.path.join(WorkspaceDir,
GlobalData.gEdkCompatibilityPkg)
+ os.environ["ECP_SOURCE"] = mws.join(WorkspaceDir,
GlobalData.gEdkCompatibilityPkg)
if "EFI_SOURCE" not in os.environ:
os.environ["EFI_SOURCE"] = os.environ["ECP_SOURCE"]
if "EDK_SOURCE" not in os.environ:
@@ -151,16 +156,18 @@
EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in
EFI_SOURCE path",
ExtraData=EfiSourceDir)
- # change absolute path to relative path to WORKSPACE
- if EfiSourceDir.upper().find(WorkspaceDir.upper()) != 0:
- EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE is not under
WORKSPACE",
- ExtraData="WORKSPACE = %s\n EFI_SOURCE = %s" %
(WorkspaceDir, EfiSourceDir))
- if EdkSourceDir.upper().find(WorkspaceDir.upper()) != 0:
- EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE is not under
WORKSPACE",
- ExtraData="WORKSPACE = %s\n EDK_SOURCE = %s" %
(WorkspaceDir, EdkSourceDir))
- if EcpSourceDir.upper().find(WorkspaceDir.upper()) != 0:
- EdkLogger.error("build", PARAMETER_INVALID, "ECP_SOURCE is not under
WORKSPACE",
- ExtraData="WORKSPACE = %s\n ECP_SOURCE = %s" %
(WorkspaceDir, EcpSourceDir))
+ # check those variables on single workspace case
+ if not PackagesPath:
+ # change absolute path to relative path to WORKSPACE
+ if EfiSourceDir.upper().find(WorkspaceDir.upper()) != 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE is not
under WORKSPACE",
+ ExtraData="WORKSPACE = %s\n EFI_SOURCE = %s" %
(WorkspaceDir, EfiSourceDir))
+ if EdkSourceDir.upper().find(WorkspaceDir.upper()) != 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE is not
under WORKSPACE",
+ ExtraData="WORKSPACE = %s\n EDK_SOURCE = %s" %
(WorkspaceDir, EdkSourceDir))
+ if EcpSourceDir.upper().find(WorkspaceDir.upper()) != 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "ECP_SOURCE is not
under WORKSPACE",
+ ExtraData="WORKSPACE = %s\n ECP_SOURCE = %s" %
(WorkspaceDir, EcpSourceDir))
# check EDK_TOOLS_PATH
if "EDK_TOOLS_PATH" not in os.environ:
@@ -182,7 +189,7 @@
GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir
GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir
GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] = os.environ["EDK_TOOLS_PATH"]
-
+
## Get normalized file path
#
# Convert the path to be local format, and remove the WORKSPACE path at the
@@ -198,7 +205,8 @@
if os.path.isabs(FilePath):
FileFullPath = os.path.normpath(FilePath)
else:
- FileFullPath = os.path.normpath(os.path.join(Workspace, FilePath))
+ FileFullPath = os.path.normpath(mws.join(Workspace, FilePath))
+ Workspace = mws.getWs(Workspace, FilePath)
# check if the file path exists or not
if not os.path.isfile(FileFullPath):
@@ -748,10 +756,10 @@
if not os.path.isabs(ConfDirectoryPath):
# Since alternate directory name is not absolute, the
alternate directory is located within the WORKSPACE
# This also handles someone specifying the Conf directory in
the workspace. Using --conf=Conf
- ConfDirectoryPath = os.path.join(self.WorkspaceDir,
ConfDirectoryPath)
+ ConfDirectoryPath = mws.join(self.WorkspaceDir,
ConfDirectoryPath)
else:
# Get standard WORKSPACE/Conf use the absolute path to the
WORKSPACE/Conf
- ConfDirectoryPath = os.path.join(self.WorkspaceDir, 'Conf')
+ ConfDirectoryPath = mws.join(self.WorkspaceDir, 'Conf')
GlobalData.gConfDirectory = ConfDirectoryPath
GlobalData.gDatabasePath =
os.path.normpath(os.path.join(ConfDirectoryPath, GlobalData.gDatabasePath))
@@ -772,10 +780,16 @@
# print current build environment and configuration
EdkLogger.quiet("%-16s = %s" % ("WORKSPACE", os.environ["WORKSPACE"]))
+ if "PACKAGES_PATH" in os.environ:
+ # WORKSPACE env has been converted before. Print the same path
style with WORKSPACE env.
+ EdkLogger.quiet("%-16s = %s" % ("PACKAGES_PATH",
os.path.normcase(os.path.normpath(os.environ["PACKAGES_PATH"]))))
EdkLogger.quiet("%-16s = %s" % ("ECP_SOURCE",
os.environ["ECP_SOURCE"]))
EdkLogger.quiet("%-16s = %s" % ("EDK_SOURCE",
os.environ["EDK_SOURCE"]))
EdkLogger.quiet("%-16s = %s" % ("EFI_SOURCE",
os.environ["EFI_SOURCE"]))
EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_PATH",
os.environ["EDK_TOOLS_PATH"]))
+ if "EDK_TOOLS_BIN" in os.environ:
+ # Print the same path style with WORKSPACE env.
+ EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_BIN",
os.path.normcase(os.path.normpath(os.environ["EDK_TOOLS_BIN"]))))
EdkLogger.info("")
@@ -796,7 +810,7 @@
ToolDefinitionFile =
self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF]
if ToolDefinitionFile == '':
ToolDefinitionFile = gToolsDefinition
- ToolDefinitionFile =
os.path.normpath(os.path.join(self.WorkspaceDir, 'Conf', ToolDefinitionFile))
+ ToolDefinitionFile =
os.path.normpath(mws.join(self.WorkspaceDir, 'Conf', ToolDefinitionFile))
if os.path.isfile(ToolDefinitionFile) == True:
StatusCode = self.ToolDef.LoadToolDefFile(ToolDefinitionFile)
else:
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits