]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Sync EDKII BaseTools to BaseTools project r1911.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Mar 2010 05:29:52 +0000 (05:29 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Mar 2010 05:29:52 +0000 (05:29 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10177 6f19259b-4bc3-4df7-8a09-765794883524

28 files changed:
BaseTools/Bin/Win32/BootSectImage.exe
BaseTools/Bin/Win32/EfiLdrImage.exe
BaseTools/Bin/Win32/EfiRom.exe
BaseTools/Bin/Win32/GenBootSector.exe
BaseTools/Bin/Win32/GenCrc32.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/GenSec.exe
BaseTools/Bin/Win32/GenVtf.exe
BaseTools/Bin/Win32/LzmaCompress.exe
BaseTools/Bin/Win32/Split.exe
BaseTools/Bin/Win32/TianoCompress.exe
BaseTools/Bin/Win32/VfrCompile.exe
BaseTools/Bin/Win32/VolInfo.exe
BaseTools/Bin/Win32/build.exe
BaseTools/Conf/build_rule.template
BaseTools/Conf/tools_def.template
BaseTools/ReadMe.txt
BaseTools/Source/Python/Common/FdfParserLite.py
BaseTools/Source/Python/GenFds/FdfParser.py
BaseTools/Source/Python/GenFds/GenFds.py
BaseTools/Source/Python/Workspace/MetaFileParser.py
BaseTools/Source/Python/build/BuildReport.py
BaseTools/Source/Python/build/build.py
BaseTools/gcc/mingw-gcc-build.py

index 06cdd4e0f35b441ed356426ab460f4b199a90f01..cb7cf6a44c338cc13bf3fd1ca8ba8083d1dda715 100755 (executable)
Binary files a/BaseTools/Bin/Win32/BootSectImage.exe and b/BaseTools/Bin/Win32/BootSectImage.exe differ
index 6c80b40eb4e10f61829e9917e6a6dd8dea0e0f49..558b09a694fe57ed9b024a7ce9c6573415bc33ff 100755 (executable)
Binary files a/BaseTools/Bin/Win32/EfiLdrImage.exe and b/BaseTools/Bin/Win32/EfiLdrImage.exe differ
index a36b64accb17e29fd6c4fc31c135d2dc07c19b29..5967c544138b80b0c8a6ebe0ef4aacbdbbd081be 100755 (executable)
Binary files a/BaseTools/Bin/Win32/EfiRom.exe and b/BaseTools/Bin/Win32/EfiRom.exe differ
index 7d3b3980d647cad885bc84e1f3f22ca8ff397b55..3542bacbee9142c98f27894d0a724e7e8f5d5885 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenBootSector.exe and b/BaseTools/Bin/Win32/GenBootSector.exe differ
index a77006e7630f2d80087451d431d0bfde19d685b4..8c8d0184424417c0228238e1ea592afd10183048 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenCrc32.exe and b/BaseTools/Bin/Win32/GenCrc32.exe differ
index d9b51693c5ddbf36f64bf0ae91ceadc61dd92246..6dcfc846983c109270c1b4e16a6f948cc5e63b13 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFds.exe and b/BaseTools/Bin/Win32/GenFds.exe differ
index 32c813992e6cf9d682e61f844b36c4930c36b3a1..272ae2640986fe668798bbe47284a0f6a4390d80 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFfs.exe and b/BaseTools/Bin/Win32/GenFfs.exe differ
index df202d399b59282f5c290bfd0c4aed0f63020c34..1eefa3aaa36aabae3d084032c3a1e25e580345ff 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFv.exe and b/BaseTools/Bin/Win32/GenFv.exe differ
index 7a816a2e9de49e350cd4f02ce24d9b268afcb7a1..8773b715c5bdf5fcfa49cd18def7037c23293330 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFw.exe and b/BaseTools/Bin/Win32/GenFw.exe differ
index 0dd72b849a449cfcf23a4eea12ea58cbd65b4726..8a3005c1fda598c1a862cb7ab7926104b3ca140d 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenPage.exe and b/BaseTools/Bin/Win32/GenPage.exe differ
index 62b04ee013e6d74d50ce08d47c25b60671820048..b3a7bc26b7007ebd6043252afac20c6a3ffc0468 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenSec.exe and b/BaseTools/Bin/Win32/GenSec.exe differ
index ee60e62d324e720340660fe623705acecc410733..d0ba8e18074a7f04d17750444503987408d51b32 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenVtf.exe and b/BaseTools/Bin/Win32/GenVtf.exe differ
index 5397a5c5e5e438df86f76b8c81ef5d552ebf5d49..f34c530eff9bf18f626dedbc963a2cedfa770b8e 100644 (file)
Binary files a/BaseTools/Bin/Win32/LzmaCompress.exe and b/BaseTools/Bin/Win32/LzmaCompress.exe differ
index ce172e92d6d4d8be9454270226e88bd27d2ea3aa..0dc4b743384c1822d240fe5708fa9a88f195e2d8 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Split.exe and b/BaseTools/Bin/Win32/Split.exe differ
index 58afbabc3ac7e533041ace32c88aa6aba12e243e..2789735c04d7fdac136a7c0fde388b7ea5ada7e3 100755 (executable)
Binary files a/BaseTools/Bin/Win32/TianoCompress.exe and b/BaseTools/Bin/Win32/TianoCompress.exe differ
index dfbff8c173d00c9e3ec7f3d810f310a5f1aed8f2..1431841561210bed85cd27f9dda1a0c8b7192d42 100755 (executable)
Binary files a/BaseTools/Bin/Win32/VfrCompile.exe and b/BaseTools/Bin/Win32/VfrCompile.exe differ
index 915ec6540f2df8df245dcfc5f32476d9081ba40b..1ce534e43b0889c1d179f8271325a33a1d02acc7 100755 (executable)
Binary files a/BaseTools/Bin/Win32/VolInfo.exe and b/BaseTools/Bin/Win32/VolInfo.exe differ
index 5bf71358a9a0c5109c765a1044396290a6fe35f5..0803c85e5288be225c009b151314a8ff6f5f0fef 100755 (executable)
Binary files a/BaseTools/Bin/Win32/build.exe and b/BaseTools/Bin/Win32/build.exe differ
index 0f2921c7149ac8bae7cadc34e8b4ba09a1e41cef..8a7663db27504001523cf5e7e7bc3ffbf2199e4e 100644 (file)
         "$(MTOC)" -subsystem $(MODULE_TYPE)  $(MTOC_FLAGS)  ${src}  $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff\r
         # create symbol file for GDB debug\r
         -$(DSYMUTIL) ${src}\r
         "$(MTOC)" -subsystem $(MODULE_TYPE)  $(MTOC_FLAGS)  ${src}  $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff\r
         # create symbol file for GDB debug\r
         -$(DSYMUTIL) ${src}\r
-        GenFw -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff \r
+        GenFw --xip -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff \r
         $(CP) ${dst} $(OUTPUT_DIR)\r
         $(CP) ${dst} $(BIN_DIR)\r
         -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
         $(CP) ${dst} $(OUTPUT_DIR)\r
         $(CP) ${dst} $(BIN_DIR)\r
         -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
index e797f15c53b92e82081ecd706638c0c2a114c8a5..2dbc776d94ca55cd8636c100353771c33a6779de 100644 (file)
@@ -137,8 +137,8 @@ DEFINE ICC_WIN_ASLCC_FLAGS     = /Y- /TC /WX- /Od /Dmain=ReferenceAcpiTable
 DEFINE ICC_WIN_ASLDLINK_FLAGS  = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:CONSOLE /NODEFAULTLIB:libmmt /NODEFAULTLIB:libirc\r
 \r
 DEFINE IPHONE_TOOLS            = /Developer/Platforms/iPhoneOS.platform/Developer\r
 DEFINE ICC_WIN_ASLDLINK_FLAGS  = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:CONSOLE /NODEFAULTLIB:libmmt /NODEFAULTLIB:libirc\r
 \r
 DEFINE IPHONE_TOOLS            = /Developer/Platforms/iPhoneOS.platform/Developer\r
-DEFINE RVCT31_TOOLS_PATH       = c:/Program Files/ARM/RVCT/Programs/3.1/569/win_32-pentium\r
-DEFINE RVCT31CYGWIN_TOOLS_PATH = /cygdrive/c/Program Files/ARM/RVCT/Programs/3.1/569/win_32-pentium\r
+DEFINE RVCT31_TOOLS_PATH       = c:/Program Files/ARM/RVCT/Programs/3.1/761/win_32-pentium\r
+DEFINE RVCT31CYGWIN_TOOLS_PATH = /cygdrive/c/Program Files/ARM/RVCT/Programs/3.1/761/win_32-pentium\r
 \r
 # Update to the location of the gcc executables\r
 DEFINE ARMGCC_BIN              = /\r
 \r
 # Update to the location of the gcc executables\r
 DEFINE ARMGCC_BIN              = /\r
@@ -1745,6 +1745,7 @@ DEFINE GCC44_ASM_FLAGS               = DEF(GCC_ASM_FLAGS)
 *_CYGGCC_IA32_ASLPP_PATH         = DEF(CYGWIN_BINIA32)gcc\r
 *_CYGGCC_IA32_ASLDLINK_PATH      = DEF(CYGWIN_BINIA32)ld\r
 *_CYGGCC_IA32_RC_PATH            = DEF(CYGWIN_BINIA32)objcopy\r
 *_CYGGCC_IA32_ASLPP_PATH         = DEF(CYGWIN_BINIA32)gcc\r
 *_CYGGCC_IA32_ASLDLINK_PATH      = DEF(CYGWIN_BINIA32)ld\r
 *_CYGGCC_IA32_RC_PATH            = DEF(CYGWIN_BINIA32)objcopy\r
+*_CYGGCC_IA32_OBJECT_PATH        = DEF(CYGWIN_BINIA32)objcopy\r
 \r
 *_CYGGCC_IA32_CC_FLAGS           = DEF(GCC_IA32_CC_FLAGS)\r
 *_CYGGCC_IA32_RC_FLAGS           = DEF(GCC_IA32_RC_FLAGS)\r
 \r
 *_CYGGCC_IA32_CC_FLAGS           = DEF(GCC_IA32_CC_FLAGS)\r
 *_CYGGCC_IA32_RC_FLAGS           = DEF(GCC_IA32_RC_FLAGS)\r
@@ -1763,6 +1764,7 @@ DEFINE GCC44_ASM_FLAGS               = DEF(GCC_ASM_FLAGS)
 *_CYGGCC_X64_ASLPP_PATH          = DEF(CYGWIN_BINX64)gcc\r
 *_CYGGCC_X64_ASLDLINK_PATH       = DEF(CYGWIN_BINX64)ld\r
 *_CYGGCC_X64_RC_PATH             = DEF(CYGWIN_BINX64)objcopy\r
 *_CYGGCC_X64_ASLPP_PATH          = DEF(CYGWIN_BINX64)gcc\r
 *_CYGGCC_X64_ASLDLINK_PATH       = DEF(CYGWIN_BINX64)ld\r
 *_CYGGCC_X64_RC_PATH             = DEF(CYGWIN_BINX64)objcopy\r
+*_CYGGCC_X64_OBJECT_PATH         = DEF(CYGWIN_BINX64)objcopy\r
 \r
 *_CYGGCC_X64_CC_FLAGS            = DEF(GCC_X64_CC_FLAGS)\r
 *_CYGGCC_X64_RC_FLAGS            = DEF(GCC_X64_RC_FLAGS)\r
 \r
 *_CYGGCC_X64_CC_FLAGS            = DEF(GCC_X64_CC_FLAGS)\r
 *_CYGGCC_X64_RC_FLAGS            = DEF(GCC_X64_RC_FLAGS)\r
@@ -1782,6 +1784,7 @@ DEFINE GCC44_ASM_FLAGS               = DEF(GCC_ASM_FLAGS)
 *_CYGGCC_IPF_OBJCOPY_PATH        = DEF(CYGWIN_BINIPF)objcopy\r
 *_CYGGCC_IPF_SYMRENAME_PATH      = DEF(CYGWIN_BINIPF)objcopy\r
 *_CYGGCC_IPF_RC_PATH             = DEF(CYGWIN_BINIPF)objcopy\r
 *_CYGGCC_IPF_OBJCOPY_PATH        = DEF(CYGWIN_BINIPF)objcopy\r
 *_CYGGCC_IPF_SYMRENAME_PATH      = DEF(CYGWIN_BINIPF)objcopy\r
 *_CYGGCC_IPF_RC_PATH             = DEF(CYGWIN_BINIPF)objcopy\r
+*_CYGGCC_IPF_OBJECT_PATH         = DEF(CYGWIN_BINIPF)objcopy\r
 \r
 *_CYGGCC_IPF_CC_FLAGS             = DEF(GCC_IPF_CC_FLAGS)\r
 *_CYGGCC_IPF_DLINK_FLAGS          = DEF(GCC_IPF_DLINK_FLAGS)\r
 \r
 *_CYGGCC_IPF_CC_FLAGS             = DEF(GCC_IPF_CC_FLAGS)\r
 *_CYGGCC_IPF_DLINK_FLAGS          = DEF(GCC_IPF_DLINK_FLAGS)\r
@@ -2757,8 +2760,8 @@ RELEASE_XCODE32_ARM_CC_FLAGS   = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-inter
 #\r
 # Use default values, or override in DSC file\r
 #\r
 #\r
 # Use default values, or override in DSC file\r
 #\r
-*_RVCT31_ARM_ARCHCC_FLAGS    = --thumb --cpu 7-A\r
-*_RVCT31_ARM_ARCHASM_FLAGS   = --cpu 7-A\r
+*_RVCT31_ARM_ARCHCC_FLAGS    = --thumb --cpu ARM1176JZF-S\r
+*_RVCT31_ARM_ARCHASM_FLAGS   = --cpu ARM1176JZF-S\r
 *_RVCT31_ARM_ARCHDLINK_FLAGS = \r
 *_RVCT31_ARM_PLATFORM_FLAGS  =\r
 \r
 *_RVCT31_ARM_ARCHDLINK_FLAGS = \r
 *_RVCT31_ARM_PLATFORM_FLAGS  =\r
 \r
@@ -2771,8 +2774,8 @@ RELEASE_RVCT31_ARM_DLINK_FLAGS     = $(ARCHDLINK_FLAGS) --entry $(IMAGE_ENTRY_PO
 *_RVCT31_ARM_VFRPP_FLAGS     = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E  -DVFRCOMPILE --preinclude $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h\r
 *_RVCT31_ARM_MAKE_PATH       = nmake\r
 *_RVCT31_ARM_SLINK_FLAGS     = --partial -o\r
 *_RVCT31_ARM_VFRPP_FLAGS     = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E  -DVFRCOMPILE --preinclude $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h\r
 *_RVCT31_ARM_MAKE_PATH       = nmake\r
 *_RVCT31_ARM_SLINK_FLAGS     = --partial -o\r
-  DEBUG_RVCT31_ARM_CC_FLAGS  = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -g -Ospace -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_warning 167\r
-RELEASE_RVCT31_ARM_CC_FLAGS  = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90    -Ospace -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_warning 167\r
+  DEBUG_RVCT31_ARM_CC_FLAGS  = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -c -g -O2 --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_warning 167\r
+RELEASE_RVCT31_ARM_CC_FLAGS  = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_warning 167\r
 \r
 ##################\r
 # ARM definitions\r
 \r
 ##################\r
 # ARM definitions\r
@@ -2807,8 +2810,8 @@ RELEASE_RVCT31_ARM_CC_FLAGS  = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90    -Ospac
 #\r
 # Use default values, or override in DSC file\r
 #\r
 #\r
 # Use default values, or override in DSC file\r
 #\r
-*_RVCT31CYGWIN_ARM_ARCHCC_FLAGS    = --thumb --cpu 7-A\r
-*_RVCT31CYGWIN_ARM_ARCHASM_FLAGS   = --cpu 7-A\r
+*_RVCT31CYGWIN_ARM_ARCHCC_FLAGS    = --thumb --cpu ARM1176JZF-S\r
+*_RVCT31CYGWIN_ARM_ARCHASM_FLAGS   = --cpu ARM1176JZF-S\r
 *_RVCT31CYGWIN_ARM_ARCHDLINK_FLAGS = \r
 *_RVCT31CYGWIN_ARM_PLATFORM_FLAGS  =\r
 \r
 *_RVCT31CYGWIN_ARM_ARCHDLINK_FLAGS = \r
 *_RVCT31CYGWIN_ARM_PLATFORM_FLAGS  =\r
 \r
@@ -2820,8 +2823,8 @@ RELEASE_RVCT31CYGWIN_ARM_DLINK_FLAGS     = "$(DLINKPATH_FLAG)" $(ARCHDLINK_FLAGS
 *_RVCT31CYGWIN_ARM_VFRPP_FLAGS     = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E  -DVFRCOMPILE --preinclude `cygpath -m $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h`\r
 *_RVCT31CYGWIN_ARM_MAKE_PATH       = make\r
 *_RVCT31CYGWIN_ARM_SLINK_FLAGS     = "$(SLINKPATH_FLAG)" --partial -o\r
 *_RVCT31CYGWIN_ARM_VFRPP_FLAGS     = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E  -DVFRCOMPILE --preinclude `cygpath -m $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h`\r
 *_RVCT31CYGWIN_ARM_MAKE_PATH       = make\r
 *_RVCT31CYGWIN_ARM_SLINK_FLAGS     = "$(SLINKPATH_FLAG)" --partial -o\r
-  DEBUG_RVCT31CYGWIN_ARM_CC_FLAGS  = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -c -g -Ospace --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --preinclude AutoGen.h --diag_warning 167\r
-RELEASE_RVCT31CYGWIN_ARM_CC_FLAGS  = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -c    -Ospace --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --preinclude AutoGen.h --diag_warning 167\r
+  DEBUG_RVCT31CYGWIN_ARM_CC_FLAGS  = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -c -g -O2 --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --preinclude AutoGen.h --diag_warning 167\r
+RELEASE_RVCT31CYGWIN_ARM_CC_FLAGS  = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --preinclude AutoGen.h --diag_warning 167\r
 \r
 ##################\r
 # ARM definitions\r
 \r
 ##################\r
 # ARM definitions\r
index 82b3d5883f72cdeb9f9e362a6a7791851a871b89..37691e98fd985b01d06e72ccb5347a1238ddf8aa 100644 (file)
@@ -66,7 +66,7 @@ Notes:
         or modules because the AutoGen.* files have been be removed. The "makefile" itself\r
         cannot generate AutoGen.* files. Only "build" command can.\r
 3) All .exe binary file including C and python tools are generated from:\r
         or modules because the AutoGen.* files have been be removed. The "makefile" itself\r
         cannot generate AutoGen.* files. Only "build" command can.\r
 3) All .exe binary file including C and python tools are generated from:\r
-    r1707 <buildtools_project>\BaseTools\Source\ + r1707 VfrCompiler tool update\r
+    r1911 <buildtools_project>\BaseTools\Source\.\r
 \r
 Brief usage for Migration Tool MigrationMsa2Inf.exe:\r
 1. Command line format:\r
 \r
 Brief usage for Migration Tool MigrationMsa2Inf.exe:\r
 1. Command line format:\r
@@ -125,30 +125,7 @@ Brief usage for Migration Tool MigrationMsa2Inf.exe:
    f. When tool generates [LibraryClasses] section, the recommended library instances are lost. (No impact to build)\r
  \r
 7. Pyton Source\r
    f. When tool generates [LibraryClasses] section, the recommended library instances are lost. (No impact to build)\r
  \r
 7. Pyton Source\r
-   r682 <buildtools_project>\BaseTools\Source\Python\MigrationMsa2Inf\r
-\r
-\r
-Brief Usage for PcdSyntax Update:\r
-Usage:\r
-  PcdSyntaxUpdate.exe <directory_name>\r
-It searches all INF, DEC and DSC file under <directory_name> and update them with the following rules:\r
-1. Update INF files to conform to INF spec 0.44: \r
-   a. Rename PCD section name: e.g. [PcdsFeatureFlag] -> [FeaturePcd]\r
-   b. Adjust PCD section item format: e.g. PcdDebugClearMemoryValue|gEfiMdePkgTokenSpaceGuid -> gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue\r
-   c. Update the syntax of binary INF file (not PCD related) \r
-2. Update DEC files to confirm to DEC spec 0.36\r
-   Adjust PCD section item format: e.g. PcdWinNtPhysicalDisk|0x00001000|gEfiNt32PkgTokenSpaceGuid|VOID*|L"E:RW;245760;512"-> gEfiNt32PkgTokenSpaceGuid.PcdWinNtFlashFvRecoverySize|0x0|UINT32|0x00001011\r
-3. Update DSC files to confirm to DSC spec \r
-   a. Adjust string/array typed PCD item format: e.g. PcdWinNtMemorySizeForSecMain|gEfiNt32PkgTokenSpaceGuid|L"64!64"|12 -> gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySizeForSecMain|L"64!64"|VOID*|12\r
-   b. Adjust non-string/array typed PCD item format: e.g. PcdWinNtBootMode|gEfiNt32PkgTokenSpaceGuid|1 -> gEfiNt32PkgTokenSpaceGuid.PcdWinNtBootMode|1\r
-   c. Update the override library class in [Components] section: e.g.\r
-   <LibraryClass> {\r
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-   }\r
-   To \r
-   <LibraryClasses> {\r
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-   }\r
+   BaseTools\Source\Python\MigrationMsa2Inf\r
 \r
 Brief usage for Migration Tool Spd2Dec.exe:\r
 1. Command line format:\r
 \r
 Brief usage for Migration Tool Spd2Dec.exe:\r
 1. Command line format:\r
@@ -164,7 +141,7 @@ Brief usage for Migration Tool Spd2Dec.exe:
    Example a & b are equivalent to migrate Nt32 package SPD file from EDKII to EDKII' snytax.\r
   \r
 6. Pyton Source\r
    Example a & b are equivalent to migrate Nt32 package SPD file from EDKII to EDKII' snytax.\r
   \r
 6. Pyton Source\r
-   r777 <buildtools_project>\BaseTools\Source\Python\spd2Dec\r
+   BaseTools\Source\Python\spd2dec\r
 \r
 Brief usage for Migration Tool Fpd2Dsc.exe:\r
 1. Command line format:\r
 \r
 Brief usage for Migration Tool Fpd2Dsc.exe:\r
 1. Command line format:\r
@@ -188,6 +165,6 @@ Brief usage for Migration Tool Fpd2Dsc.exe:
    b. If MSA file which is corresponds to module guid could not be found in currect workspace, tool will dump the module guid.\r
  \r
 7. Pyton Source\r
    b. If MSA file which is corresponds to module guid could not be found in currect workspace, tool will dump the module guid.\r
  \r
 7. Pyton Source\r
-   r767 <buildtools_project>\BaseTools\Source\Python\Fpd2Dsc\r
+   BaseTools\Source\Python\fpd2dsc\r
 \r
 \r
-10-Sep-2009\r
+4-Mar-2010\r
index e9b69ff1b9a92a512c7dc8401e647c1fa0035a20..eb7b0d75146665ef80814940af79e1bb13b7f16a 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # parse FDF file\r
 #\r
 ## @file\r
 # parse FDF file\r
 #\r
-#  Copyright (c) 2007, Intel Corporation\r
+#  Copyright (c) 2007 - 2010, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -383,7 +383,22 @@ class FdfParser(object):
         while Offset <= EndPos[1]:\r
             self.Profile.FileLinesList[EndPos[0]][Offset] = Value\r
             Offset += 1\r
         while Offset <= EndPos[1]:\r
             self.Profile.FileLinesList[EndPos[0]][Offset] = Value\r
             Offset += 1\r
-            \r
+\r
+\r
+    def __GetMacroName(self):\r
+        if not self.__GetNextToken():\r
+            raise Warning("expected Macro name", self.FileName, self.CurrentLineNumber)\r
+        MacroName = self.__Token\r
+        NotFlag = False\r
+        if MacroName.startswith('!'):\r
+            NotFlag = True\r
+            MacroName = MacroName[1:].strip()\r
+         \r
+        if not MacroName.startswith('$(') or not MacroName.endswith(')'):\r
+            raise Warning("Macro name expected(Please use '$(%(Token)s)' if '%(Token)s' is a macro.)" % {"Token" : MacroName},\r
+                          self.FileName, self.CurrentLineNumber)\r
+        MacroName = MacroName[2:-1]\r
+        return MacroName, NotFlag\r
     \r
     ## PreprocessFile() method\r
     #\r
     \r
     ## PreprocessFile() method\r
     #\r
@@ -554,14 +569,7 @@ class FdfParser(object):
                 IfList.append([IfStartPos, None, None])\r
                 CondLabel = self.__Token\r
                 \r
                 IfList.append([IfStartPos, None, None])\r
                 CondLabel = self.__Token\r
                 \r
-                if not self.__GetNextToken():\r
-                    raise Warning("expected Macro name At Line ", self.FileName, self.CurrentLineNumber)\r
-                MacroName = self.__Token\r
-                NotFlag = False\r
-                if MacroName.startswith('!'):\r
-                    NotFlag = True\r
-                    MacroName = MacroName[1:]\r
-\r
+                MacroName, NotFlag = self.__GetMacroName() \r
                 NotDefineFlag = False\r
                 if CondLabel == '!ifndef':\r
                     NotDefineFlag = True\r
                 NotDefineFlag = False\r
                 if CondLabel == '!ifndef':\r
                     NotDefineFlag = True\r
@@ -615,14 +623,7 @@ class FdfParser(object):
                     self.__WipeOffArea.append((IfList[-1][0], ElseStartPos))\r
                     IfList[-1] = [ElseStartPos, True, IfList[-1][2]]\r
                     if self.__Token == '!elseif':\r
                     self.__WipeOffArea.append((IfList[-1][0], ElseStartPos))\r
                     IfList[-1] = [ElseStartPos, True, IfList[-1][2]]\r
                     if self.__Token == '!elseif':\r
-                        if not self.__GetNextToken():\r
-                            raise Warning("expected Macro name At Line ", self.FileName, self.CurrentLineNumber)\r
-                        MacroName = self.__Token\r
-                        NotFlag = False\r
-                        if MacroName.startswith('!'):\r
-                            NotFlag = True\r
-                            MacroName = MacroName[1:]\r
-\r
+                        MacroName, NotFlag = self.__GetMacroName() \r
                         if not self.__GetNextOp():\r
                             raise Warning("expected !endif At Line ", self.FileName, self.CurrentLineNumber)\r
                     \r
                         if not self.__GetNextOp():\r
                             raise Warning("expected !endif At Line ", self.FileName, self.CurrentLineNumber)\r
                     \r
index 4ce276124318613d88e2335bfbb69520e1f04698..92d6ab64ba842ee13ff59422c0ed2d5584be714a 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # parse FDF file\r
 #\r
 ## @file\r
 # parse FDF file\r
 #\r
-#  Copyright (c) 2007, Intel Corporation\r
+#  Copyright (c) 2007 - 2010, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -415,6 +415,21 @@ class FdfParser:
             Offset += 1\r
 \r
 \r
             Offset += 1\r
 \r
 \r
+    def __GetMacroName(self):\r
+        if not self.__GetNextToken():\r
+            raise Warning("expected Macro name", self.FileName, self.CurrentLineNumber)\r
+        MacroName = self.__Token\r
+        NotFlag = False\r
+        if MacroName.startswith('!'):\r
+            NotFlag = True\r
+            MacroName = MacroName[1:].strip()\r
+         \r
+        if not MacroName.startswith('$(') or not MacroName.endswith(')'):\r
+            raise Warning("Macro name expected(Please use '$(%(Token)s)' if '%(Token)s' is a macro.)" % {"Token" : MacroName},\r
+                          self.FileName, self.CurrentLineNumber)\r
+        MacroName = MacroName[2:-1]\r
+        return MacroName, NotFlag\r
+    \r
     ## PreprocessFile() method\r
     #\r
     #   Preprocess file contents, replace comments with spaces.\r
     ## PreprocessFile() method\r
     #\r
     #   Preprocess file contents, replace comments with spaces.\r
@@ -545,6 +560,7 @@ class FdfParser:
 \r
         self.Rewind()\r
 \r
 \r
         self.Rewind()\r
 \r
+    \r
     ## PreprocessIncludeFile() method\r
     #\r
     #   Preprocess file contents, replace !include statements with file contents.\r
     ## PreprocessIncludeFile() method\r
     #\r
     #   Preprocess file contents, replace !include statements with file contents.\r
@@ -583,15 +599,8 @@ class FdfParser:
                 IfStartPos = (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - len(self.__Token))\r
                 IfList.append([IfStartPos, None, None])\r
                 CondLabel = self.__Token\r
                 IfStartPos = (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - len(self.__Token))\r
                 IfList.append([IfStartPos, None, None])\r
                 CondLabel = self.__Token\r
-\r
-                if not self.__GetNextToken():\r
-                    raise Warning("expected Macro name", self.FileName, self.CurrentLineNumber)\r
-                MacroName = self.__Token\r
-                NotFlag = False\r
-                if MacroName.startswith('!'):\r
-                    NotFlag = True\r
-                    MacroName = MacroName[1:]\r
-\r
+                \r
+                MacroName, NotFlag = self.__GetMacroName() \r
                 NotDefineFlag = False\r
                 if CondLabel == '!ifndef':\r
                     NotDefineFlag = True\r
                 NotDefineFlag = False\r
                 if CondLabel == '!ifndef':\r
                     NotDefineFlag = True\r
@@ -645,14 +654,7 @@ class FdfParser:
                     self.__WipeOffArea.append((IfList[-1][0], ElseStartPos))\r
                     IfList[-1] = [ElseStartPos, True, IfList[-1][2]]\r
                     if self.__Token == '!elseif':\r
                     self.__WipeOffArea.append((IfList[-1][0], ElseStartPos))\r
                     IfList[-1] = [ElseStartPos, True, IfList[-1][2]]\r
                     if self.__Token == '!elseif':\r
-                        if not self.__GetNextToken():\r
-                            raise Warning("expected Macro name", self.FileName, self.CurrentLineNumber)\r
-                        MacroName = self.__Token\r
-                        NotFlag = False\r
-                        if MacroName.startswith('!'):\r
-                            NotFlag = True\r
-                            MacroName = MacroName[1:]\r
-\r
+                        MacroName, NotFlag = self.__GetMacroName() \r
                         if not self.__GetNextOp():\r
                             raise Warning("expected !endif", self.FileName, self.CurrentLineNumber)\r
 \r
                         if not self.__GetNextOp():\r
                             raise Warning("expected !endif", self.FileName, self.CurrentLineNumber)\r
 \r
index 1285103f5e1d5a359dcd1c13fd72901460e92af5..d5863461681bf2062537aae97f1fc7fb7e198af6 100644 (file)
@@ -196,10 +196,8 @@ def main():
 
         if (Options.outputDir):
             OutputDirFromCommandLine = GenFdsGlobalVariable.ReplaceWorkspaceMacro(Options.outputDir)
 
         if (Options.outputDir):
             OutputDirFromCommandLine = GenFdsGlobalVariable.ReplaceWorkspaceMacro(Options.outputDir)
-            if not os.path.isabs (Options.outputDir):
-                Options.outputDir = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, Options.outputDir)
-            if os.path.normcase (Options.outputDir).find(Workspace) != 0:
-                EdkLogger.error("GenFds", FILE_NOT_FOUND, "OutputDir doesn't exist in Workspace!")
+            if not os.path.isabs (OutputDirFromCommandLine):
+                OutputDirFromCommandLine = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, OutputDirFromCommandLine)
             for Arch in ArchList:
                 GenFdsGlobalVariable.OutputDirDict[Arch] = OutputDirFromCommandLine
         else:
             for Arch in ArchList:
                 GenFdsGlobalVariable.OutputDirDict[Arch] = OutputDirFromCommandLine
         else:
index cf165ff507a03b7234db696927feaf6e54dd4640..4c7ea035169cbe8cb05a8d2d803f29131186b300 100644 (file)
@@ -1,7 +1,7 @@
 ## @file
 # This file is used to parse meta files
 #
 ## @file
 # This file is used to parse meta files
 #
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008 - 2010, Intel Corporation
 # All rights reserved. This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
 # which accompanies this distribution.  The full text of the license may be found at
 # All rights reserved. This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
 # which accompanies this distribution.  The full text of the license may be found at
@@ -40,6 +40,28 @@ class MetaFileParser(object):
     # data type (file content) for specific file type
     DataType = {}
 
     # data type (file content) for specific file type
     DataType = {}
 
+    # Parser objects used to implement singleton
+    MetaFiles = {}
+
+    ## Factory method
+    #
+    # One file, one parser object. This factory method makes sure that there's
+    # only one object constructed for one meta file.
+    #
+    #   @param  Class           class object of real AutoGen class
+    #                           (InfParser, DecParser or DscParser)
+    #   @param  FilePath        The path of meta file
+    #   @param  *args           The specific class related parameters
+    #   @param  **kwargs        The specific class related dict parameters
+    #
+    def __new__(Class, FilePath, *args, **kwargs):
+        if FilePath in Class.MetaFiles:
+            return Class.MetaFiles[FilePath]
+        else:
+            ParserObject = super(MetaFileParser, Class).__new__(Class)
+            Class.MetaFiles[FilePath] = ParserObject
+            return ParserObject
+
     ## Constructor of MetaFileParser
     #
     #  Initialize object of MetaFileParser
     ## Constructor of MetaFileParser
     #
     #  Initialize object of MetaFileParser
@@ -52,6 +74,9 @@ class MetaFileParser(object):
     #   @param      From            ID from which the data comes (for !INCLUDE directive)
     #
     def __init__(self, FilePath, FileType, Table, Macros=None, Owner=-1, From=-1):
     #   @param      From            ID from which the data comes (for !INCLUDE directive)
     #
     def __init__(self, FilePath, FileType, Table, Macros=None, Owner=-1, From=-1):
+        # prevent re-initialization
+        if hasattr(self, "_Table"):
+            return
         self._Table = Table
         self._FileType = FileType
         self.MetaFile = FilePath
         self._Table = Table
         self._FileType = FileType
         self.MetaFile = FilePath
@@ -596,7 +621,9 @@ class DscParser(MetaFileParser):
                 continue
             self._CurrentLine = Line
             self._LineIndex = Index
                 continue
             self._CurrentLine = Line
             self._LineIndex = Index
-
+            if self._InSubsection and self._Owner == -1:
+                self._Owner = self._LastItem
+            
             # section header
             if Line[0] == TAB_SECTION_START and Line[-1] == TAB_SECTION_END:
                 self._SectionHeaderParser()
             # section header
             if Line[0] == TAB_SECTION_START and Line[-1] == TAB_SECTION_END:
                 self._SectionHeaderParser()
@@ -644,8 +671,6 @@ class DscParser(MetaFileParser):
             if self._InSubsection:
                 SectionType = self._SubsectionType
                 SectionName = self._SubsectionName
             if self._InSubsection:
                 SectionType = self._SubsectionType
                 SectionName = self._SubsectionName
-                if self._Owner == -1:
-                    self._Owner = self._LastItem
             else:
                 SectionType = self._SectionType
                 SectionName = self._SectionName
             else:
                 SectionType = self._SectionType
                 SectionName = self._SectionName
@@ -774,13 +799,24 @@ class DscParser(MetaFileParser):
             else:
                 self._Enabled = len(self._Eval)
 
             else:
                 self._Enabled = len(self._Eval)
 
-    ## Evaludate the value of expression in "if/ifdef/ifndef" directives
+    ## Evaluate the Token for its value; for now only macros are supported.
+    def _EvaluateToken(self, TokenName, Expression):
+        if TokenName.startswith("$(") and TokenName.endswith(")"):
+            Name = TokenName[2:-1]
+            return self._Macros.get(Name)
+        else:
+            EdkLogger.error('Parser', FORMAT_INVALID, "Unknown operand '%(Token)s', "
+                            "please use '$(%(Token)s)' if '%(Token)s' is a macro" % {"Token" : TokenName},
+                            File=self.MetaFile, Line=self._LineIndex+1, ExtraData=Expression)
+    
+    ## Evaluate the value of expression in "if/ifdef/ifndef" directives
     def _Evaluate(self, Expression):
         TokenList = Expression.split()
         TokenNumber = len(TokenList)
         # one operand, guess it's just a macro name
         if TokenNumber == 1:
     def _Evaluate(self, Expression):
         TokenList = Expression.split()
         TokenNumber = len(TokenList)
         # one operand, guess it's just a macro name
         if TokenNumber == 1:
-            return TokenList[0] in self._Macros
+            TokenValue =  self._EvaluateToken(TokenList[0], Expression)
+            return TokenValue != None
         # two operands, suppose it's "!xxx" format
         elif TokenNumber == 2:
             Op = TokenList[0]
         # two operands, suppose it's "!xxx" format
         elif TokenNumber == 2:
             Op = TokenList[0]
@@ -794,8 +830,8 @@ class DscParser(MetaFileParser):
             return self._OP_[Op](Value)
         # three operands
         elif TokenNumber == 3:
             return self._OP_[Op](Value)
         # three operands
         elif TokenNumber == 3:
-            Name = TokenList[0]
-            if Name not in self._Macros:
+            TokenValue = self._EvaluateToken(TokenList[0], Expression)
+            if TokenValue == None:
                 return False
             Value = TokenList[2]
             if Value[0] in ["'", '"'] and Value[-1] in ["'", '"']:
                 return False
             Value = TokenList[2]
             if Value[0] in ["'", '"'] and Value[-1] in ["'", '"']:
@@ -804,7 +840,7 @@ class DscParser(MetaFileParser):
             if Op not in self._OP_:
                 EdkLogger.error('Parser', FORMAT_INVALID, "Unsupported operator [%s]" % Op, File=self.MetaFile,
                                 Line=self._LineIndex+1, ExtraData=Expression)
             if Op not in self._OP_:
                 EdkLogger.error('Parser', FORMAT_INVALID, "Unsupported operator [%s]" % Op, File=self.MetaFile,
                                 Line=self._LineIndex+1, ExtraData=Expression)
-            return self._OP_[Op](self._Macros[Name], Value)
+            return self._OP_[Op](TokenValue, Value)
         else:
             EdkLogger.error('Parser', FORMAT_INVALID, File=self.MetaFile, Line=self._LineIndex+1,
                             ExtraData=Expression)
         else:
             EdkLogger.error('Parser', FORMAT_INVALID, File=self.MetaFile, Line=self._LineIndex+1,
                             ExtraData=Expression)
index 23e819e5cab1a9d01aded9624e7551137292295f..eac21d14950de27b0ecff7482a6a255d4f1124e5 100644 (file)
@@ -667,31 +667,31 @@ class PcdReport(object):
                         if DecDefaultValue == None:\r
                             DecMatch = True\r
                         else:\r
                         if DecDefaultValue == None:\r
                             DecMatch = True\r
                         else:\r
-                            DecMatch = (DecDefaultValue == PcdValue)\r
+                            DecMatch = (DecDefaultValue.strip() == PcdValue.strip())\r
 \r
                         if InfDefaultValue == None:\r
                             InfMatch = True\r
                         else:\r
 \r
                         if InfDefaultValue == None:\r
                             InfMatch = True\r
                         else:\r
-                            InfMatch = (InfDefaultValue == PcdValue)\r
+                            InfMatch = (InfDefaultValue.strip() == PcdValue.strip())\r
 \r
                         if DscDefaultValue == None:\r
                             DscMatch = True\r
                         else:\r
 \r
                         if DscDefaultValue == None:\r
                             DscMatch = True\r
                         else:\r
-                            DscMatch = (DscDefaultValue == PcdValue)\r
+                            DscMatch = (DscDefaultValue.strip() == PcdValue.strip())\r
 \r
                     #\r
                     # Report PCD item according to their override relationship\r
                     #\r
                     if DecMatch and InfMatch:\r
 \r
                     #\r
                     # Report PCD item according to their override relationship\r
                     #\r
                     if DecMatch and InfMatch:\r
-                        FileWrite(File, '    %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))\r
+                        FileWrite(File, '    %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue.strip()))\r
                     else:\r
                         if DscMatch:\r
                             if (Pcd.TokenCName, Key) in self.FdfPcdSet:\r
                     else:\r
                         if DscMatch:\r
                             if (Pcd.TokenCName, Key) in self.FdfPcdSet:\r
-                                FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))\r
+                                FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue.strip()))\r
                             else:\r
                             else:\r
-                                FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))\r
+                                FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue.strip()))\r
                         else:\r
                         else:\r
-                            FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))\r
+                            FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue.strip()))\r
                     \r
                     if TypeName in ('DYNHII', 'DEXHII', 'DYNVPD', 'DEXVPD'):\r
                         for SkuInfo in Pcd.SkuInfoList.values():\r
                     \r
                     if TypeName in ('DYNHII', 'DEXHII', 'DYNVPD', 'DEXVPD'):\r
                         for SkuInfo in Pcd.SkuInfoList.values():\r
@@ -701,13 +701,13 @@ class PcdReport(object):
                                 FileWrite(File, '%*s' % (self.MaxLen + 4, SkuInfo.VpdOffset))\r
                                \r
                     if not DscMatch and DscDefaultValue != None:\r
                                 FileWrite(File, '%*s' % (self.MaxLen + 4, SkuInfo.VpdOffset))\r
                                \r
                     if not DscMatch and DscDefaultValue != None:\r
-                        FileWrite(File, '    %*s = %s' % (self.MaxLen + 19, 'DSC DEFAULT', DscDefaultValue))\r
+                        FileWrite(File, '    %*s = %s' % (self.MaxLen + 19, 'DSC DEFAULT', DscDefaultValue.strip()))\r
 \r
                     if not InfMatch and InfDefaultValue != None:\r
 \r
                     if not InfMatch and InfDefaultValue != None:\r
-                        FileWrite(File, '    %*s = %s' % (self.MaxLen + 19, 'INF DEFAULT', InfDefaultValue))\r
+                        FileWrite(File, '    %*s = %s' % (self.MaxLen + 19, 'INF DEFAULT', InfDefaultValue.strip()))\r
 \r
                     if not DecMatch and DecDefaultValue != None:\r
 \r
                     if not DecMatch and DecDefaultValue != None:\r
-                        FileWrite(File, '    %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', DecDefaultValue))\r
+                        FileWrite(File, '    %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', DecDefaultValue.strip()))\r
 \r
                     if ModulePcdSet == None:\r
                         ModuleOverride = self.ModulePcdOverride.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName), {})\r
 \r
                     if ModulePcdSet == None:\r
                         ModuleOverride = self.ModulePcdOverride.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName), {})\r
@@ -717,10 +717,10 @@ class PcdReport(object):
                                 ModulePcdDefaultValueNumber = int(ModuleDefault.strip(), 0)\r
                                 Match = (ModulePcdDefaultValueNumber == PcdValueNumber)\r
                             else:\r
                                 ModulePcdDefaultValueNumber = int(ModuleDefault.strip(), 0)\r
                                 Match = (ModulePcdDefaultValueNumber == PcdValueNumber)\r
                             else:\r
-                                Match = (ModuleDefault == PcdValue)\r
+                                Match = (ModuleDefault.strip() == PcdValue.strip())\r
                             if Match:\r
                                 continue\r
                             if Match:\r
                                 continue\r
-                            FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, ModuleDefault))\r
+                            FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, ModuleDefault.strip()))\r
 \r
         if ModulePcdSet == None:\r
             FileWrite(File, gSectionEnd)\r
 \r
         if ModulePcdSet == None:\r
             FileWrite(File, gSectionEnd)\r
@@ -1283,8 +1283,9 @@ class PlatformReport(object):
     #\r
     # @param self            The object pointer\r
     # @param Wa              Workspace context information\r
     #\r
     # @param self            The object pointer\r
     # @param Wa              Workspace context information\r
+    # @param MaList          The list of modules in the platform build\r
     #\r
     #\r
-    def __init__(self, Wa, ReportType):\r
+    def __init__(self, Wa, MaList, ReportType):\r
         self._WorkspaceDir = Wa.WorkspaceDir\r
         self.PlatformName = Wa.Name\r
         self.PlatformDscPath = Wa.Platform\r
         self._WorkspaceDir = Wa.WorkspaceDir\r
         self.PlatformName = Wa.Name\r
         self.PlatformDscPath = Wa.Platform\r
@@ -1299,7 +1300,7 @@ class PlatformReport(object):
             self.PcdReport = PcdReport(Wa)\r
 \r
         self.FdReportList = []\r
             self.PcdReport = PcdReport(Wa)\r
 \r
         self.FdReportList = []\r
-        if "FLASH" in ReportType and Wa.FdfProfile:\r
+        if "FLASH" in ReportType and Wa.FdfProfile and MaList == None:\r
             for Fd in Wa.FdfProfile.FdDict:\r
                 self.FdReportList.append(FdReport(Wa.FdfProfile.FdDict[Fd], Wa))\r
 \r
             for Fd in Wa.FdfProfile.FdDict:\r
                 self.FdReportList.append(FdReport(Wa.FdfProfile.FdDict[Fd], Wa))\r
 \r
@@ -1308,9 +1309,13 @@ class PlatformReport(object):
             self.PredictionReport = PredictionReport(Wa)\r
 \r
         self.ModuleReportList = []\r
             self.PredictionReport = PredictionReport(Wa)\r
 \r
         self.ModuleReportList = []\r
-        for Pa in Wa.AutoGenObjectList:\r
-            for ModuleKey in Pa.Platform.Modules:\r
-                self.ModuleReportList.append(ModuleReport(Pa.Platform.Modules[ModuleKey].M, ReportType))\r
+        if MaList != None:\r
+            for Ma in MaList:\r
+                self.ModuleReportList.append(ModuleReport(Ma, ReportType))\r
+        else:\r
+            for Pa in Wa.AutoGenObjectList:\r
+                for ModuleKey in Pa.Platform.Modules:\r
+                    self.ModuleReportList.append(ModuleReport(Pa.Platform.Modules[ModuleKey].M, ReportType))\r
 \r
 \r
 \r
 \r
 \r
 \r
@@ -1386,10 +1391,11 @@ class BuildReport(object):
     #\r
     # @param self            The object pointer\r
     # @param Wa              Workspace context information\r
     #\r
     # @param self            The object pointer\r
     # @param Wa              Workspace context information\r
+    # @param MaList          The list of modules in the platform build\r
     #\r
     #\r
-    def AddPlatformReport(self, Wa):\r
+    def AddPlatformReport(self, Wa, MaList=None):\r
         if self.ReportFile:\r
         if self.ReportFile:\r
-            self.ReportList.append(Wa)\r
+            self.ReportList.append((Wa, MaList))\r
 \r
     ##\r
     # Generates the final report.\r
 \r
     ##\r
     # Generates the final report.\r
@@ -1407,8 +1413,8 @@ class BuildReport(object):
             except IOError:\r
                 EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)\r
             try:\r
             except IOError:\r
                 EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)\r
             try:\r
-                for Wa in self.ReportList:\r
-                    PlatformReport(Wa, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)\r
+                for (Wa, MaList) in self.ReportList:\r
+                    PlatformReport(Wa, MaList, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)\r
                 EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))\r
             except IOError:\r
                 EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)\r
                 EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))\r
             except IOError:\r
                 EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)\r
index 9705097606b8ae4836ce255d9e85735335d433a2..e3a3dd9f3fc3368f3e5d726f51fe588b3111f27a 100644 (file)
@@ -738,6 +738,16 @@ class Build():
         # parse target.txt, tools_def.txt, and platform file\r
         #self.RestoreBuildData()\r
         self.LoadConfiguration()\r
         # parse target.txt, tools_def.txt, and platform file\r
         #self.RestoreBuildData()\r
         self.LoadConfiguration()\r
+        \r
+        #\r
+        # @attention Treat $(TARGET) in meta data files as special macro when it has only one build target.\r
+        # This is not a complete support for $(TARGET) macro as it can only support one build target in ONE\r
+        # invocation of build command. However, it should cover the frequent usage model that $(TARGET) macro\r
+        # is used in DSC files to specify different libraries & PCD setting for debug/release build.\r
+        #\r
+        if len(self.BuildTargetList) == 1:\r
+            self.Db._GlobalMacros.setdefault("TARGET", self.BuildTargetList[0])\r
+        \r
         self.InitBuild()\r
 \r
         # print current build environment and configuration\r
         self.InitBuild()\r
 \r
         # print current build environment and configuration\r
@@ -1336,7 +1346,6 @@ class Build():
                         self.FvList,\r
                         self.SkuId\r
                         )\r
                         self.FvList,\r
                         self.SkuId\r
                         )\r
-                self.BuildReport.AddPlatformReport(Wa)\r
                 Wa.CreateMakeFile(False)\r
                 self.Progress.Stop("done!")\r
                 MaList = []\r
                 Wa.CreateMakeFile(False)\r
                 self.Progress.Stop("done!")\r
                 MaList = []\r
@@ -1345,6 +1354,8 @@ class Build():
                     if Ma == None: continue\r
                     MaList.append(Ma)\r
                     self._Build(self.Target, Ma)\r
                     if Ma == None: continue\r
                     MaList.append(Ma)\r
                     self._Build(self.Target, Ma)\r
+\r
+                self.BuildReport.AddPlatformReport(Wa, MaList)\r
                 if MaList == []:\r
                     EdkLogger.error(\r
                                 'build',\r
                 if MaList == []:\r
                     EdkLogger.error(\r
                                 'build',\r
index f01bedc7bc92c3363c2ba0cd6519bbb4d5875b34..4133feb25607d4c566f1c800d3c03ee8b631ed2d 100755 (executable)
@@ -225,10 +225,10 @@ class SourceFiles:
         'mingw_hdr': {
             'url': 'http://sourceforge.net/projects/' + \
                    'mingw-w64/files/mingw-w64/mingw-w64-snapshot/' + \
         'mingw_hdr': {
             'url': 'http://sourceforge.net/projects/' + \
                    'mingw-w64/files/mingw-w64/mingw-w64-snapshot/' + \
-                   'mingw-w64-trunk-snapshot-$version.tar.bz2/download',
-            'extract-dir': os.path.join('trunk', 'mingw-w64-headers'),
-            'version': '20091222',
-            'md5': 'fbcf282d1a05df121088d775e02095d6',
+                   'mingw-w64-v1.0-snapshot-$version.tar.bz2/download',
+            'extract-dir': os.path.join('mingw-w64-v1.0-$version', 'mingw-w64-headers'),
+            'version': '20100223',
+            'md5': '700b9f54e740b1b962c8a3a0f52b7c04',
             },
         }
 
             },
         }