Sync BaseTool trunk (version r2474) into EDKII BaseTools.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 16 Dec 2011 08:52:13 +0000 (08:52 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 16 Dec 2011 08:52:13 +0000 (08:52 +0000)
Signed-off-by: lgao4
Reviewed-by: gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12883 6f19259b-4bc3-4df7-8a09-765794883524

45 files changed:
BaseTools/Bin/Win32/BPDG.exe
BaseTools/Bin/Win32/BootSectImage.exe
BaseTools/Bin/Win32/EfiLdrImage.exe
BaseTools/Bin/Win32/EfiRom.exe
BaseTools/Bin/Win32/Fpd2Dsc.exe
BaseTools/Bin/Win32/GenBootSector.exe
BaseTools/Bin/Win32/GenCrc32.exe
BaseTools/Bin/Win32/GenDepex.exe
BaseTools/Bin/Win32/GenFds.exe
BaseTools/Bin/Win32/GenFfs.exe
BaseTools/Bin/Win32/GenFv.exe
BaseTools/Bin/Win32/GenFw.exe
BaseTools/Bin/Win32/GenPage.exe
BaseTools/Bin/Win32/GenPatchPcdTable.exe
BaseTools/Bin/Win32/GenSec.exe
BaseTools/Bin/Win32/GenVtf.exe
BaseTools/Bin/Win32/LzmaCompress.exe
BaseTools/Bin/Win32/MigrationMsa2Inf.exe
BaseTools/Bin/Win32/PatchPcdValue.exe
BaseTools/Bin/Win32/Spd2Dec.exe
BaseTools/Bin/Win32/Split.exe
BaseTools/Bin/Win32/TargetTool.exe
BaseTools/Bin/Win32/TianoCompress.exe
BaseTools/Bin/Win32/Trim.exe
BaseTools/Bin/Win32/UPT.exe
BaseTools/Bin/Win32/VfrCompile.exe
BaseTools/Bin/Win32/VolInfo.exe
BaseTools/Bin/Win32/build.exe
BaseTools/Conf/tools_def.template
BaseTools/Source/C/Include/Common/BuildVersion.h
BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools/Source/Python/AutoGen/GenC.py
BaseTools/Source/Python/Common/BuildVersion.py
BaseTools/Source/Python/Ecc/Ecc.py
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
BaseTools/Source/Python/GenFds/FdfParser.py
BaseTools/Source/Python/GenFds/Fv.py
BaseTools/Source/Python/UPT/BuildVersion.py
BaseTools/Source/Python/UPT/InstallPkg.py
BaseTools/Source/Python/UPT/Library/ParserValidate.py
BaseTools/Source/Python/UPT/Library/String.py
BaseTools/Source/Python/UPT/Parser/InfParser.py
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
BaseTools/Source/Python/build/build.py

index d67e1b67db3db1c90f07d918be7df4d3f3ce6aef..8cb7362fa873b4754ca5764ec0d070c9fd44a659 100644 (file)
Binary files a/BaseTools/Bin/Win32/BPDG.exe and b/BaseTools/Bin/Win32/BPDG.exe differ
index 7af47afbf9697a568463fb8e3f767bf0d913a710..368c269553a7332884c61ec99fdae596793eaa26 100755 (executable)
Binary files a/BaseTools/Bin/Win32/BootSectImage.exe and b/BaseTools/Bin/Win32/BootSectImage.exe differ
index 69de8394f0ceab748163b639d2c9c23086a5e85f..604f850f040e2983e5fb0a83722de347032882dc 100755 (executable)
Binary files a/BaseTools/Bin/Win32/EfiLdrImage.exe and b/BaseTools/Bin/Win32/EfiLdrImage.exe differ
index 4b3de928143be93ccd93234b978322b5bfe9e825..5de62fd7836954c3ce455e862b79e596f75c45d2 100755 (executable)
Binary files a/BaseTools/Bin/Win32/EfiRom.exe and b/BaseTools/Bin/Win32/EfiRom.exe differ
index 2c48bc05f4d14fc029e09565a827adcbdf52edad..d774971d6a0b35160beec0bb4d06b9f170458671 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Fpd2Dsc.exe and b/BaseTools/Bin/Win32/Fpd2Dsc.exe differ
index 51603b91e348342b10cd60723c3f5cf9f08baae7..cb57ba77eac6abac282b7696e4175d89b8a2841d 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenBootSector.exe and b/BaseTools/Bin/Win32/GenBootSector.exe differ
index 8f84be2365c772f4c6b842239cbf8bb6020a3102..d545e7e8b854cc4ce75088c15a0e3a8f83da0839 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenCrc32.exe and b/BaseTools/Bin/Win32/GenCrc32.exe differ
index d2013b73eb5328fca6bda006f506df76558b6fb7..b17f12ed7bbf3142cbf9d138b54d7ffd43652086 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenDepex.exe and b/BaseTools/Bin/Win32/GenDepex.exe differ
index 92bebfa6b6ca9f86d4b21653c73599302fdd804b..bd270d63fa8ae40b6a2b751f18a93b29341b90ee 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFds.exe and b/BaseTools/Bin/Win32/GenFds.exe differ
index 37a069e265b332182b133e0317479103ee4c4894..bf3ab699bdb3e2bbf5f530cd6155f89f4508fd3e 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFfs.exe and b/BaseTools/Bin/Win32/GenFfs.exe differ
index 03b80f3bfe4b4ea6726ee5c3c71d5ee6ffdc63a6..96f97312901be95614b5d14b337ba202ab311aba 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFv.exe and b/BaseTools/Bin/Win32/GenFv.exe differ
index 6df993458241c091b0f48cc7abf0dba2f289ff83..33c08bcd44723a8fdacfecaee39db162c0d7d3ac 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFw.exe and b/BaseTools/Bin/Win32/GenFw.exe differ
index 3f70426fc82e33e5c301cb1bf6e5b788c235af3b..e7f673252f75238882d17d1bd26f98466795afd5 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenPage.exe and b/BaseTools/Bin/Win32/GenPage.exe differ
index cd9ec75569b699ec1bba690ddbdca398dc1aa504..aa9bf405aa782bc71cc4acdae31d9179ff37bb92 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenPatchPcdTable.exe and b/BaseTools/Bin/Win32/GenPatchPcdTable.exe differ
index f8f11e82c1a86edc99616b0ccb01b7ea9eca8cb7..1274d352bcb2e054a63c6ac14ddff81a899d3d59 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenSec.exe and b/BaseTools/Bin/Win32/GenSec.exe differ
index 6e60e8c36507420aed9acf9bab44b4a1e98013f9..4f1868ff87af6a26870e0afdcb4a96306c12faad 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenVtf.exe and b/BaseTools/Bin/Win32/GenVtf.exe differ
index 8d97bcb2d30d41de7f9d323ab76c6d18f557b540..244237a2e1005247c8c71f5007166a5ef2de7b1e 100755 (executable)
Binary files a/BaseTools/Bin/Win32/LzmaCompress.exe and b/BaseTools/Bin/Win32/LzmaCompress.exe differ
index 6a96e513fc7ac73d270cd59bc7f87772eba087d2..219b181d12ae1b0b539fcbf7989c883b6ff07988 100755 (executable)
Binary files a/BaseTools/Bin/Win32/MigrationMsa2Inf.exe and b/BaseTools/Bin/Win32/MigrationMsa2Inf.exe differ
index ac5121474465ae06f5f62adfbf51c198780587d7..c635d3ac11445947d1a8365d48d928a551d4c872 100755 (executable)
Binary files a/BaseTools/Bin/Win32/PatchPcdValue.exe and b/BaseTools/Bin/Win32/PatchPcdValue.exe differ
index e003096aa5bd864a61c734aa3e9a64cc6c8e4deb..072f648225470697731384f83c7205a6c6e43f05 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Spd2Dec.exe and b/BaseTools/Bin/Win32/Spd2Dec.exe differ
index 5285c71db9c309b5bac293da521649537c3e175b..c5fead3786ba5d9a5e0606fcd75ab66397eec8eb 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Split.exe and b/BaseTools/Bin/Win32/Split.exe differ
index 5eecbeb9a5f286cc9bce660e98874f0b6e0ee395..19ff3a832224ef30ca9c5462a547a3c56f5f9ac2 100755 (executable)
Binary files a/BaseTools/Bin/Win32/TargetTool.exe and b/BaseTools/Bin/Win32/TargetTool.exe differ
index 58d2972ec9952f16b08d109136b19bfc3b0fa157..e47070c24d788af1e16fbd01185e1666487a7ee7 100755 (executable)
Binary files a/BaseTools/Bin/Win32/TianoCompress.exe and b/BaseTools/Bin/Win32/TianoCompress.exe differ
index 563ca64a864246c8c2bf45e06041618f9768c4c9..25f919877877b63e2618f99094033ebdab245816 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Trim.exe and b/BaseTools/Bin/Win32/Trim.exe differ
index 3dad60db652f810bd6eb027196caec81ad39b453..8f08ca3ef392a15661fc2549b671ca1abb90b5be 100644 (file)
Binary files a/BaseTools/Bin/Win32/UPT.exe and b/BaseTools/Bin/Win32/UPT.exe differ
index 4a14a12c0ae3e3d2e01c302bc74b727e127f5dad..ccb69a263ec5f9f3e0ccbec3d49f986044247ccb 100755 (executable)
Binary files a/BaseTools/Bin/Win32/VfrCompile.exe and b/BaseTools/Bin/Win32/VfrCompile.exe differ
index ad84ee10dcc705d41a1cae40051c27ddd8f4be0f..0befe01e73f68288edacaf63d762c4b73351e2da 100755 (executable)
Binary files a/BaseTools/Bin/Win32/VolInfo.exe and b/BaseTools/Bin/Win32/VolInfo.exe differ
index 4158f832ab5bec0609f6568214b5f5fbd28193a8..1bb30e7a3e45ccf48ccbd24a78dfa4b6c8dfa185 100755 (executable)
Binary files a/BaseTools/Bin/Win32/build.exe and b/BaseTools/Bin/Win32/build.exe differ
index ee7e23eee86f3fcdd05d39e6a2fa675d1e27e842..68caf86fe6404d3e9e10d62b0c16ca5cad491168 100644 (file)
@@ -4320,7 +4320,7 @@ RELEASE_ARMLINUXGCC_ARM_ASM_FLAGS   = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittl
 *_ARMLINUXGCC_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -x c -E -P -DVFRCOMPILE --include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h\r
 \r
 *_ARMLINUXGCC_ARM_SLINK_FLAGS =  -rc\r
-*_ARMLINUXGCC_ARM_DLINK_FLAGS =  $(ARCHDLINK_FLAGS)  --oformat=elf32-littlearm --emit-relocs -nostdlib -u $(IMAGE_ENTRY_POINT) -e $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map\r
+*_ARMLINUXGCC_ARM_DLINK_FLAGS =  $(ARCHDLINK_FLAGS) -Ttext=0x0 --oformat=elf32-littlearm --emit-relocs -nostdlib -u $(IMAGE_ENTRY_POINT) -e $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map\r
 \r
   DEBUG_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARMGCC_CC_FLAGS) -Wno-address -O0\r
 RELEASE_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARMGCC_CC_FLAGS) -Wno-address -Wno-unused-but-set-variable\r
index 64bce09165ebef590f567309e1ea11ebbd2bd260..22327e7ec7854692677e0883564b7577124eb3c1 100644 (file)
@@ -1,3 +1,17 @@
-//This file is for build version number auto generation\r
-//\r
-#define __BUILD_VERSION "Build 2460"\r
+/** @file\r
+  This file is for build version number auto generation\r
+\r
+  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\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
+\r
+  File Name:  BuildVersion.h\r
+\r
+**/\r
+\r
+#define __BUILD_VERSION "Build 2474"\r
index cb3369ffdf315394a3c05534e9273789d07a7bf9..894ec8dcd8e3bc23ed348cb6b8a12811170f6e6e 100644 (file)
@@ -173,7 +173,8 @@ class WorkspaceAutoGen(AutoGen):
     #   @param  SkuId                   SKU id from command line\r
     #\r
     def _Init(self, WorkspaceDir, ActivePlatform, Target, Toolchain, ArchList, MetaFileDb,\r
-              BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=None, Fvs=None, Caps=None, SkuId='', UniFlag=None):\r
+              BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=None, Fvs=None, Caps=None, SkuId='', UniFlag=None, \r
+              Progress=None, BuildModule=None):\r
         if Fds is None:\r
             Fds = []\r
         if Fvs is None:\r
@@ -236,8 +237,25 @@ class WorkspaceAutoGen(AutoGen):
         # parse FDF file to get PCDs in it, if any\r
         if not self.FdfFile:\r
             self.FdfFile = self.Platform.FlashDefinition\r
-        EdkLogger.verbose("\nFLASH_DEFINITION = %s" % self.FdfFile)\r
+        \r
+        EdkLogger.info("")\r
+        if self.ArchList:\r
+            EdkLogger.info('%-16s = %s' % ("Architecture(s)", ' '.join(self.ArchList)))\r
+        EdkLogger.info('%-16s = %s' % ("Build target", self.BuildTarget))\r
+        EdkLogger.info('%-16s = %s' % ("Toolchain",self.ToolChain))        \r
+        \r
+        EdkLogger.info('\n%-24s = %s' % ("Active Platform", self.Platform))\r
+        if BuildModule:\r
+            EdkLogger.info('%-24s = %s' % ("Active Module", BuildModule))\r
+        \r
+        if self.FdfFile:\r
+            EdkLogger.info('%-24s = %s' % ("Flash Image Definition", self.FdfFile))\r
 \r
+        EdkLogger.verbose("\nFLASH_DEFINITION = %s" % self.FdfFile)\r
+        \r
+        if Progress:\r
+            Progress.Start("\nProcessing meta-data")\r
+        \r
         if self.FdfFile:\r
             #\r
             # Mark now build in AutoGen Phase\r
index 530dfd7c978dfc2b9dea7ee173dae904abee3e3b..63131cee2460ed4dc4be1dab5908f43feb9a9c44 100644 (file)
@@ -1575,6 +1575,35 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase):
     if NumberOfLocalTokens == 0:
         AutoGenC.Append(gEmptyPcdDatabaseAutoGenC.Replace(Dict))
     else:
+        #
+        # Update Size Table to the right order, it should be same with LocalTokenNumberTable
+        #
+        SizeCNameTempList = []
+        SizeGuidTempList = []
+        SizeCurLenTempList = []
+        SizeMaxLenTempList = []
+        ReOrderFlag = True
+  
+        if len(Dict['SIZE_TABLE_CNAME']) == 1:
+            if not (Dict['SIZE_TABLE_CNAME'][0] and Dict['SIZE_TABLE_GUID'][0]):
+                ReOrderFlag = False
+        
+        if ReOrderFlag:
+            for Count in range(len(Dict['TOKEN_CNAME'])):
+                for Count1 in range(len(Dict['SIZE_TABLE_CNAME'])):
+                    if Dict['TOKEN_CNAME'][Count] == Dict['SIZE_TABLE_CNAME'][Count1] and \
+                        Dict['TOKEN_GUID'][Count] == Dict['SIZE_TABLE_GUID'][Count1]:
+                        SizeCNameTempList.append(Dict['SIZE_TABLE_CNAME'][Count1])
+                        SizeGuidTempList.append(Dict['SIZE_TABLE_GUID'][Count1])
+                        SizeCurLenTempList.append(Dict['SIZE_TABLE_CURRENT_LENGTH'][Count1])
+                        SizeMaxLenTempList.append(Dict['SIZE_TABLE_MAXIMUM_LENGTH'][Count1])
+                        
+            for Count in range(len(Dict['SIZE_TABLE_CNAME'])):
+                Dict['SIZE_TABLE_CNAME'][Count] = SizeCNameTempList[Count]
+                Dict['SIZE_TABLE_GUID'][Count] = SizeGuidTempList[Count]
+                Dict['SIZE_TABLE_CURRENT_LENGTH'][Count] = SizeCurLenTempList[Count]
+                Dict['SIZE_TABLE_MAXIMUM_LENGTH'][Count] = SizeMaxLenTempList[Count]
+                
         AutoGenC.Append(gPcdDatabaseAutoGenC.Replace(Dict))
 
     return AutoGenH, AutoGenC
index fc3239135cd175a87d23486a98b74eafa5573e62..b6b02cf8aee08ae7b9febbf7cce198497cc8112f 100644 (file)
@@ -1,3 +1,16 @@
-#This file is for build version number auto generation\r
+## @file\r
 #\r
-gBUILD_VERSION = "Build 2460"\r
+# This file is for build version number auto generation\r
+#\r
+# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# This program and the accompanying materials are licensed and made available \r
+# under the terms and conditions of the BSD License which accompanies this \r
+# 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
+#\r
+\r
+gBUILD_VERSION = "Build 2474"\r
index ab438c7e86d561fd7857e47feb395bcfc3368d38..e2e92ef6723ceeb3f2fe680c40da98dbfcf0a811 100644 (file)
@@ -22,12 +22,12 @@ from MetaDataParser import *
 from optparse import OptionParser\r
 from Configuration import Configuration\r
 from Check import Check\r
-\r
+import Common.GlobalData as GlobalData\r
 \r
 from Common.String import NormPath\r
 from Common.BuildVersion import gBUILD_VERSION\r
 from Common import BuildToolError\r
-\r
+from Common.Misc import PathClass\r
 from MetaFileWorkspace.MetaFileParser import DscParser\r
 from MetaFileWorkspace.MetaFileParser import DecParser\r
 from MetaFileWorkspace.MetaFileParser import InfParser\r
@@ -61,7 +61,41 @@ class Ecc(object):
 \r
         # Parse the options and args\r
         self.ParseOption()\r
-\r
+        \r
+        #\r
+        # Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to ECP\r
+        #\r
+        WorkspaceDir = os.path.normcase(os.path.normpath(os.environ["WORKSPACE"]))\r
+        os.environ["WORKSPACE"] = WorkspaceDir\r
+        if "ECP_SOURCE" not in os.environ:\r
+            os.environ["ECP_SOURCE"] = os.path.join(WorkspaceDir, GlobalData.gEdkCompatibilityPkg)\r
+        if "EFI_SOURCE" not in os.environ:\r
+            os.environ["EFI_SOURCE"] = os.environ["ECP_SOURCE"]\r
+        if "EDK_SOURCE" not in os.environ:\r
+            os.environ["EDK_SOURCE"] = os.environ["ECP_SOURCE"]\r
+\r
+        #\r
+        # Unify case of characters on case-insensitive systems\r
+        #\r
+        EfiSourceDir = os.path.normcase(os.path.normpath(os.environ["EFI_SOURCE"]))\r
+        EdkSourceDir = os.path.normcase(os.path.normpath(os.environ["EDK_SOURCE"]))\r
+        EcpSourceDir = os.path.normcase(os.path.normpath(os.environ["ECP_SOURCE"]))\r
+        \r
+        os.environ["EFI_SOURCE"] = EfiSourceDir\r
+        os.environ["EDK_SOURCE"] = EdkSourceDir\r
+        os.environ["ECP_SOURCE"] = EcpSourceDir\r
+        \r
+        GlobalData.gWorkspace = WorkspaceDir\r
+        GlobalData.gEfiSource = EfiSourceDir\r
+        GlobalData.gEdkSource = EdkSourceDir\r
+        GlobalData.gEcpSource = EcpSourceDir\r
+\r
+        GlobalData.gGlobalDefines["WORKSPACE"]  = WorkspaceDir\r
+        GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir\r
+        GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir\r
+        GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir\r
+        \r
+        \r
         # Generate checkpoints list\r
         EccGlobalData.gConfig = Configuration(self.ConfigFile)\r
 \r
@@ -152,7 +186,7 @@ class Ecc(object):
                     EdkLogger.quiet("Parsing %s" % Filename)\r
                     Op.write("%s\r" % Filename)\r
                     #Dsc(Filename, True, True, EccGlobalData.gWorkspace, EccGlobalData.gDb)\r
-                    self.MetaFile = DscParser(Filename, MODEL_FILE_DSC, MetaFileStorage(EccGlobalData.gDb.TblDsc.Cur, Filename, MODEL_FILE_DSC, True))\r
+                    self.MetaFile = DscParser(PathClass(Filename, Root), MODEL_FILE_DSC, MetaFileStorage(EccGlobalData.gDb.TblDsc.Cur, Filename, MODEL_FILE_DSC, True))\r
                     # alwasy do post-process, in case of macros change\r
                     self.MetaFile.DoPostProcess()\r
                     self.MetaFile.Start()\r
index fc29bafc58eeedf1933535d8fbea731afdf8eb7a..9ca00f043bc9199b6f923a6393bc2c1af0d5ceeb 100644 (file)
@@ -770,13 +770,13 @@ class DscParser(MetaFileParser):
     def Start(self):
         Content = ''
         try:
-            Content = open(str(self.MetaFile), 'r').readlines()
+            Content = open(str(self.MetaFile.Path), 'r').readlines()
         except:
             EdkLogger.error("Parser", FILE_READ_FAILURE, ExtraData=self.MetaFile)
         #
         # Insert a record for file
         #
-        Filename = NormPath(self.MetaFile)
+        Filename = NormPath(self.MetaFile.Path)
         FileID = self.TblFile.GetFileId(Filename)
         if FileID:
             self.FileID = FileID
@@ -1162,6 +1162,8 @@ class DscParser(MetaFileParser):
             self._IdMapping[Id] = self._LastItem
 
         RecordList = self._Table.GetAll()
+        self._Table.Drop()
+        self._RawTable.Drop()
         for Record in RecordList:
             EccGlobalData.gDb.TblDsc.Insert(Record[1],Record[2],Record[3],Record[4],Record[5],Record[6],Record[7],Record[8],Record[9],Record[10],Record[11],Record[12],Record[13],Record[14])
         GlobalData.gPlatformDefines.update(self._FileLocalMacros)
@@ -1300,7 +1302,7 @@ class DscParser(MetaFileParser):
             #
             elif "ECP_SOURCE" in GlobalData.gCommandLineDefines.keys():
                 __IncludeMacros['ECP_SOURCE'] = GlobalData.gCommandLineDefines['ECP_SOURCE']
-
+                
             __IncludeMacros['EFI_SOURCE'] = GlobalData.gGlobalDefines['EFI_SOURCE']
             __IncludeMacros['EDK_SOURCE'] = GlobalData.gGlobalDefines['EDK_SOURCE']
             #
index bdb7a777707bc0e9f8443c6112673e81d2e1ffac..7a569e88dd79803b5fd49c358d36fd97f56a91ab 100644 (file)
@@ -679,7 +679,7 @@ class FdfParser:
                     PreIndex = 0\r
                     StartPos = CurLine.find('$(', PreIndex)\r
                     EndPos = CurLine.find(')', StartPos+2)\r
-                    while StartPos != -1 and EndPos != -1:\r
+                    while StartPos != -1 and EndPos != -1 and not (self.__Token == '!ifdef' or self.__Token == '!ifndef'):\r
                         MacroName = CurLine[StartPos+2 : EndPos]\r
                         MacorValue = self.__GetMacroValue(MacroName)\r
                         if MacorValue != None:\r
index fd5ad0e9ac382f104a8a249bec7529dc940ca52f..6c7a0503cfa61ac1a31ffec2fc340a4dd614597c 100644 (file)
@@ -316,7 +316,7 @@ class FV (FvClassObject):
                         Buffer += pack('B', int(ByteList[Index1], 16))\r
 \r
             Guid = self.FvNameGuid.split('-')\r
-            Buffer = pack('LHHBBBBBBBBL', \r
+            Buffer = pack('=LHHBBBBBBBBL', \r
                         int(Guid[0], 16), \r
                         int(Guid[1], 16), \r
                         int(Guid[2], 16), \r
index fc3239135cd175a87d23486a98b74eafa5573e62..bd5876dd5c48755f16352c668f0d0e638e9fc842 100644 (file)
@@ -1,3 +1,20 @@
-#This file is for build version number auto generation\r
+## @file\r
 #\r
-gBUILD_VERSION = "Build 2460"\r
+# This file is for build version number auto generation\r
+#\r
+# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# This program and the accompanying materials are licensed and made available \r
+# under the terms and conditions of the BSD License which accompanies this \r
+# 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
+#\r
+\r
+'''\r
+Build version information\r
+'''\r
+\r
+gBUILD_VERSION = "Build 2474"\r
index 1c75dad80b1684cb5072fc3fe47affef61eaa0fb..776196e8ea8b44a684c64f265ce6c8f043995343 100644 (file)
@@ -403,7 +403,7 @@ def Main(Options = None):
         DestFile = os.path.normpath(os.path.join(DestDir, DistFileName))\r
         if os.path.exists(DestFile):\r
             FileName, Ext = os.path.splitext(DistFileName)\r
-            NewFileName = FileName + '_' + DistPkg.Header.GetGuid() + '_' + DistPkg.Header.GetVersion() + '.' + Ext\r
+            NewFileName = FileName + '_' + DistPkg.Header.GetGuid() + '_' + DistPkg.Header.GetVersion() + Ext\r
             DestFile = os.path.normpath(os.path.join(DestDir, NewFileName))\r
             if os.path.exists(DestFile):\r
                 #\r
index 8efb56a61ab1c4aa939a398a87a8b79196f8b6f2..860fb4f1dcdfa3fa797809d729557be7b40d80d9 100644 (file)
@@ -286,7 +286,7 @@ def IsValidInstallPath(Path):
         if os.path.isabs(Path):\r
             return False\r
     else:\r
-        if Path[1:2] == ':' or Path.find('\\') >=0:\r
+        if Path[1:2] == ':':\r
             return False\r
         if os.path.isabs(Path):\r
             return False\r
index 526b2e66b4e01f89264eec1397c4531026a55a5d..2c5853ca934bf33c2b3a9a551c0dbceabae8a2ec 100644 (file)
@@ -643,35 +643,6 @@ def ConvertToSqlString(StringList):
 def ConvertToSqlString2(String):\r
     return String.replace("'", "''")\r
 \r
-## RemoveBlockComment\r
-#\r
-# Remove comment block\r
-#\r
-# @param Lines: Block Comment Lines  \r
-#\r
-def RemoveBlockComment(Lines):\r
-    IsFindBlockComment = False\r
-    ReservedLine = ''\r
-    NewLines = []\r
-\r
-    for Line in Lines:\r
-        Line = Line.strip()\r
-        #\r
-        # Remove comment block\r
-        #\r
-        if Line.find(DataType.TAB_COMMENT_EDK1_START) > -1:\r
-            ReservedLine = GetSplitList(Line, DataType.TAB_COMMENT_EDK1_START, 1)[0]\r
-            IsFindBlockComment = True\r
-        if Line.find(DataType.TAB_COMMENT_EDK1_END) > -1:\r
-            Line = ReservedLine + GetSplitList(Line, DataType.TAB_COMMENT_EDK1_END, 1)[1]\r
-            ReservedLine = ''\r
-            IsFindBlockComment = False\r
-        if IsFindBlockComment:\r
-            NewLines.append('')\r
-            continue\r
-        NewLines.append(Line)\r
-    return NewLines\r
-\r
 ## GetStringOfList\r
 #\r
 # Get String of a List\r
index 79f71448eecbae98897bb914cd9c611933afc859..fb90c396f74c9746b72707f20b3e686d382f3a25 100644 (file)
@@ -339,7 +339,7 @@ class InfParser(InfSectionParser):
         #\r
         # Found the first section, No file header.\r
         #\r
-        if not DefineSectionParsedFlag:\r
+        if DefineSectionParsedFlag and not HeaderCommentEnd:\r
             Logger.Error("InfParser", \r
                          FORMAT_INVALID, \r
                          ST.ERR_INF_PARSER_HEADER_MISSGING, \r
index 20daff0d3293daf502accf88daf8b793f1129e2b..a4a3107366ea9dd17519bd0c46919a4eb9b75291 100644 (file)
@@ -750,7 +750,6 @@ class InfPomAlignment(ModuleObject):
         BinaryObj = self.Parser.InfBinariesSection.GetBinary()\r
 \r
         BinaryData = BinaryObj.keys()\r
-        BinaryData.sort()\r
 \r
         #\r
         # If the INF file does not contain a [Sources] section, and the INF file does contain a [Binaries] section, \r
index a8452a9f8442387e037691b7c873dddcde725089..6ff33db329cdf819c960ef6ee3932c62baaec392 100644 (file)
@@ -383,10 +383,21 @@ class DscBuildData(PlatformBuildClassObject):
                 self._LoadFixAddress = int (self._LoadFixAddress, 0)\r
             except:\r
                 EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS %s is not valid dec or hex string" % (self._LoadFixAddress))\r
-            if self._LoadFixAddress < 0:\r
-                EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS is set to the invalid negative value %s" % (self._LoadFixAddress))\r
-            if self._LoadFixAddress != 0xFFFFFFFFFFFFFFFF and self._LoadFixAddress % 0x1000 != 0:\r
-                EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS is set to the invalid unaligned 4K value %s" % (self._LoadFixAddress))\r
+         \r
+        #\r
+        # If command line defined, should override the value in DSC file.\r
+        #\r
+        if 'FIX_LOAD_TOP_MEMORY_ADDRESS' in GlobalData.gCommandLineDefines.keys():\r
+            try:\r
+                self._LoadFixAddress = int(GlobalData.gCommandLineDefines['FIX_LOAD_TOP_MEMORY_ADDRESS'], 0)\r
+            except:\r
+                EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS %s is not valid dec or hex string" % (GlobalData.gCommandLineDefines['FIX_LOAD_TOP_MEMORY_ADDRESS']))\r
+                \r
+        if self._LoadFixAddress < 0:\r
+            EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS is set to the invalid negative value 0x%x" % (self._LoadFixAddress))\r
+        if self._LoadFixAddress != 0xFFFFFFFFFFFFFFFF and self._LoadFixAddress % 0x1000 != 0:\r
+            EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS is set to the invalid unaligned 4K value 0x%x" % (self._LoadFixAddress))\r
+            \r
         return self._LoadFixAddress\r
 \r
     ## Retrieve RFCLanguage filter\r
index 4abf611a0eb06fa808bf342a1c20ec548444cb30..ef52162ea15162ae2fb0ba028b32946b6a7247e8 100644 (file)
@@ -745,17 +745,8 @@ class Build():
         EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_PATH", os.environ["EDK_TOOLS_PATH"]))\r
 \r
         EdkLogger.info("")\r
-        if self.ArchList:\r
-            EdkLogger.info('%-16s = %s' % ("Architecture(s)", ' '.join(self.ArchList)))\r
-        EdkLogger.info('%-16s = %s' % ("Build target", ' '.join(self.BuildTargetList)))\r
-        EdkLogger.info('%-16s = %s' % ("Toolchain", ' '.join(self.ToolChainList)))\r
-\r
-        EdkLogger.info('\n%-16s = %s' % ("Active Platform", self.PlatformFile))\r
-        if self.ModuleFile:\r
-            EdkLogger.info('%-16s = %s' % ("Active Module", self.ModuleFile))\r
 \r
         os.chdir(self.WorkspaceDir)\r
-        self.Progress.Start("\nProcessing meta-data")\r
 \r
     ## Load configuration\r
     #\r
@@ -1241,7 +1232,8 @@ class Build():
                         self.FvList,\r
                         self.CapList,\r
                         self.SkuId,\r
-                        self.UniFlag\r
+                        self.UniFlag,\r
+                        self.Progress\r
                         )\r
                 self.Fdf = Wa.FdfFile\r
                 self.LoadFixAddress = Wa.Platform.LoadFixAddress\r
@@ -1316,7 +1308,9 @@ class Build():
                         self.FvList,\r
                         self.CapList,\r
                         self.SkuId,\r
-                        self.UniFlag\r
+                        self.UniFlag,\r
+                        self.Progress,\r
+                        self.ModuleFile\r
                         )\r
                 self.Fdf = Wa.FdfFile\r
                 self.LoadFixAddress = Wa.Platform.LoadFixAddress\r
@@ -1401,7 +1395,8 @@ class Build():
                         self.FvList,\r
                         self.CapList,\r
                         self.SkuId,\r
-                        self.UniFlag\r
+                        self.UniFlag,\r
+                        self.Progress\r
                         )\r
                 self.Fdf = Wa.FdfFile\r
                 self.LoadFixAddress = Wa.Platform.LoadFixAddress\r