summaryrefslogtreecommitdiff
path: root/BaseTools
AgeCommit message (Collapse)Author
2016-07-13BaseTools Scripts: Add MemoryProfileSymbolGen.pyStar Zeng
This tool depends on DIA2Dump.exe (VS) or nm (gcc) to parse debug entry. Usage: MemoryProfileSymbolGen.py [--version] [-h] [--help] [-i inputfile [-o outputfile]] Copyright (c) 2016, Intel Corporation. All rights reserved. Options: --version show program's version number and exit -h, --help show this help message and exit -i INPUTFILENAME, --inputfile=INPUTFILENAME The input memory profile info file output from MemoryProfileInfo application in MdeModulePkg -o OUTPUTFILENAME, --outputfile=OUTPUTFILENAME The output memory profile info file with symbol, MemoryProfileInfoSymbol.txt will be used if it is not Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 1d9869f9e91605f6c099237eeb3414887f1258a9)
2016-07-13BaseTools ConvertMasmToNasm: Don't try to reconvert .nasm filesJordan Justen
We now check to see if the destination .nasm file already exists. If it does, then we don't try to convert the .asm to .nasm. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit ad00b0452e0c6cf09aecfe1b0cf64d81f191a507)
2016-07-13BaseTools ConvertMasmToNasm: Support preserving assembly filesJordan Justen
In the first stage of conversion, we need to preserve the AT&T style .s assembly files for use with OS X toolchains. This change allows '--keep=s' to be used with the script to preserve these files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 5de927b54b9f4b314ec65bd2ae1d1908ceabd423)
2016-07-13BaseTools ConvertMasmToNasm: put filter/map result in tuple for python3Jordan Justen
Python 3's filter and map functions returns an iterator which you can't call len() on. Since we'll want to use len() later, we put the filter results into a tuple. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 90694f121865073c93123c41046349ca84eb1a25)
2016-07-13BaseTools ConvertMasmToNasm: Support ASM_PFX in .asm filesJordan Justen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit c8102434ba8703ff3bd18d8f53675c2de3830f97)
2016-07-13BaseTools: ignore the binary LIB file in gen_libsYonghong Zhu
For single module build, it would call gen_libs target. then if it use binary LIB file, it cause build failure. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 8832c79d6439adc09d7cc89b22268899026ff7f8)
2016-07-13BaseTools: fix the bug to build a compressed ROM image via .INF fileYonghong Zhu
Fix the bug that always use the '-e' as OPTROM_FLAGS even the .INF file has statement 'PCI_COMPRESS = TRUE'. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 9ccb26bc99465e16c00fa5cf5e5f43b12dc73f46)
2016-07-13BaseTools: Add error handling for current_dir is not existYonghong Zhu
Add the error handling to cover the case that current_dir is not exist. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 570ae1ebc857d27e73210e034fef0082df17dc29)
2016-07-13BaseTools: Bash script fix for PosixLike/LzmaF86CompressThomas Palmer
Add missing "done" token needed to complete the for loop. Tested in Ubuntu 14.04 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit f285d0213b135e14419833df0aa760e3748e8182)
2016-07-13BaseTools: Fix bad macro expansion during tools_def.txt parsingMichael Zimmermann
this is something I missed in 8ac46e4 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 6608330d76d50746aeba63a032d85a5389164a54)
2016-07-13BaseTools: add '!include' support to tools_def.txt parserMichael Zimmermann
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 8ac46e4ef76ee56778430bb3dbcc545cce49d208)
2016-07-13BaseTools: Fix comments about return value of 'LoadToolDefFile'Michael Zimmermann
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 8b14b35b192dc57eb01e091b7bf32af3b0e960b3)
2016-07-13BaseTools: Fix GenFds issue to wrongly get file without postfix.Liming Gao
GenFds GenSection will search the output file based on the file extension. If the output file has no extension, it should be skip. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> (cherry picked from commit 483b01d2da22bab88f0815a2f01025ea6b9333f5)
2016-07-13BaseTools/GenFds: enhance to get TOOL_CHAIN_TAG and TARGET valueYonghong Zhu
when user don't set TOOL_CHAIN_TAG and TARGET by –D Flag, then GenFds would report failure for format: FILE DATA = $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/testfile so this patch enhance to get the TOOL_CHAIN_TAG and TARGET value by following priority (high to low): 1. the Macro value set by -D Flag; 2. Get the value by the -t/-b option. 3. get the value from target.txt file. Besides, this patch also remove the error checking for missing -t/-b option. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit e4979beee9e5d334d97fd8e2c79670ad08587bc6)
2016-07-13BaseTools: Add error condition for the path in PACKAGES_PATH envZhu, Yonghong
This patch adds two error conditions: 1) if one path in PACKAGES_PATH doesn't exist. 2) if the space exists in the PACKAGES_PATH. In V2, highlight one path in PACKAGES_PATH env doesn't exist. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed by: Andrew Fish <afish@apple.com> (cherry picked from commit f6190a01c13a6b4dd01a1765b28964db7dc58e35)
2016-07-13BaseTools: Eliminate two shift-negative-value in FvLib.cZenith432
clang 3.8 flags -Wshift-negative-value warning, which turns fatal due to use of -Werror. Fixes: https://github.com/tianocore/edk2/issues/49 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith432@users.sourceforge.net> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit d3bb711834acd3eda35a07d0be7911bc3dbb9e6f)
2016-07-13BaseTools: support private package definitionYonghong Zhu
EDKII build spec and DEC spec updated to support private package definition. If GUID, Protocol or PPI is listed in a DEC file, where the Private modifier is used in the section tag ([Guids.common.Private] for example), only modules within the package are permitted to use the GUID, Protocol or PPI. If a module or library instance outside of the package attempts to use the item, the build must fail with an appropriate error message. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit c28d2e1047816164ffec552e4a3375122cbcc6b6)
2016-07-13BaseTools: Add HII definitions from UEFI 2.6Samer El-Haj-Mahmoud
Add HII definitions from UEFI 2.6 for HII Image Variability and PNG Blocks Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> (cherry picked from commit 7b1fe7acdca15be49a9421156b799ed7394f7bac)
2016-07-13BaseTools/GenFw: enhance to use Magic Field to identify the imageYonghong Zhu
Original use the File Header Machine Field to identify EFI_IMAGE_OPTIONAL_HEADER32 or EFI_IMAGE_OPTIONAL_HEADER64, it cannot correctly handle EBC arch PE32 image. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 849e54aa6400b220fad8af32d3d329117e0ceac8)
2016-07-13BaseTools/GenFds: enhance INF built arch filterYonghong Zhu
The bug is use FILE_GUID override to build the same module more than once, GenFds report warning "xxx NOT found in DSC file; Is it really a binary module?". The root cause is the module path with FILE_GUID overridden has the file name FILE_GUIDmodule.inf, then PlatformDataBase.Modules use FILE_GUIDmodule.inf as key which cause __GetPlatformArchList__ return empty. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 4ce415e55d93a9ae9fa1fbd6b40080877ae5f23b)
2016-07-13BaseTools: Fix bug to not mix comment into Asbuilt inf Depex sectionYonghong Zhu
in the generated Asbuilt inf would include the driver's complete dependency expression, and it would be wrote as comment format. Original bug is mix the depex expression with real comment in the depex section. this patch is ignore the real comment, and list the depex expression. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 518aebe2f7ab2ca7376f450a07439b5741e65503)
2016-07-13BaseTools: Fix bug in GenFds to handle FV image alignmentYonghong Zhu
Cover the case that .fv file in the [Binaries] section. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 321151fedb3013fe3a588ee7a4fe6639ceb29c7e)
2016-07-13BaseTools: fix a bug for uni file \x####\ format handlingYonghong Zhu
It should start from the last '\x' position + 1 to find next '\x' character. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit ad319b9307aaf37ffaf27890ae03dcbfd12087ce)
2016-07-13BaseTools: Support \x####\ in UNI files to specify non-ascii charactersYonghong Zhu
UNI spec updated to allow using \x####\ to specify non-ascii characters, # is a hex digit. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 314e2fb1752679392e9fe386564ef04d99680a93)
2016-07-13BaseTools/Build: Better DSC arch filteringThomas Palmer
Description: When building for any specific architecture, the build script today is loading DSC sections for other architectures not in the build. The build process should disregard DSC sections that are not relevant to the build. My previous patch only fixed issue for one section type (Components). This patch will handle all section types by updating the MetaFileParser class, which now takes a Arch argument and will filter the DSC table results as they are returned from the database. The database still contains all information from DSCs for when builds support multiple arch's Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> (cherry picked from commit cdd1b5e5486460ac96f44cddf1edfda25b1fdce9)
2016-07-13BaseTools: fix the bug for FMP to support use Macro as path descriptionYonghong Zhu
Fix the bug for FMP image to support to use Macro as path description, eg: FILE DATA = $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/test.efi Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 35217a337cb6d262d4a3b5165bd86ba150a6c088)
2016-07-13BaseTools: Fix the bug for .aml to use ASL binary type in Asbuilt infYonghong Zhu
Per build spec, the .aml file should use ASL binary type in the Asbuilt inf file. the original bug is .aml file may use BIN as binary type when the module type is not BASE or USER_DEFINED. This patch 1) fix this bug. 2) fix some indent coding style issue. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 481252bbc9c0883e444bcbedd990d8164d10cf89)
2016-07-13BaseTools: Update FMP Capsule support to follow FDF specYonghong Zhu
Current the FMP Capsule feature is supported, but its format has a little different with FDF spec. so this patch 1) Align the FMP Capsule with FDF spec. 2) fix some style issue, eg: Tab. 3) Add a SectionParser function to check the section header info since this method is used in 7 places. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit df81077f77f91b43f32f70e06950b86e20f711da)
2016-07-13BaseTools/UPT: UPT to Support UTF-8Hess Chen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> (cherry picked from commit 4a21fb3b67a0ef1655b43e9368b6b697bbf327af)
2016-07-13BaseTools/ECC: Remove UNI checkpoint from ECCHess Chen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> (cherry picked from commit b739e14d7fbfce5b58411bf214a33bbcb7cf4102)
2016-07-13Update ECC to support more doxygen keywordsHess Chen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> (cherry picked from commit f8895c2ad4fe0191732aa376333eaf49649e3760)
2016-07-13BaseTools: add the support for --pcd feature to patch the binary efiYonghong Zhu
the original --pcd feature can override the Pcd value when build the source driver, while it missed the binary driver. this patch add the support to patch the binary efi for --pcd feature. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 6b17c11b6f45b4196adb8a9fcbdba5576a0d872b)
2016-07-13BaseTools: Add mixed PCD support featureYonghong Zhu
Problem statement: The current build system requires that a PCD must use the same access method for all modules. A Binary Module may use a different PCD access method than: 1.A source tree build it is integrated into. 2.Other Binary Modules in platform build that use the same PCD. Solution: 1. Source build: No change. PCDs must use the same access method for building all Source Modules. 2. Mixed Source & Binary Builds or Binary Only Builds: 1) Source Modules - No changes 2) Module that is interpreted as a Binary Module a.DSC file may optionally override default value of PatchableInModule PCDs in scope of Binary Module. b.DSC file must declare DynamicEx PCD subtype for all DynamicEx PCDs from Binary Modules. c.FDF file must list Binary Module INF Build update: 1. PCDs in a binary module are permitted to use the PatchableInModule or DynamicEx access methods (the Binary INF clearly identifies the PCD access method for each PCD). The build must support binary modules that use the same or different PCD access method than the Source INFs or other Binary INFs. 2. Build report list PCDs that have mixed PCD access methods. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 2a29017e3e305a10ee1003354c0d0c037923341d)
2016-07-13BaseTools: fix a bug for PEI VPD Pcd collectionYonghong Zhu
When a PEI phase VPD PCD only list in the DSC IA32 arch, then build X64 arch image, it missed to collect this PEI VPD pcd into VPD Pcd map file. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 61ee1dff160dabbb0855d56c925985030af702bc)
2016-07-13BaseTools/GenFds: remove the old logic since ActivePlatform is abs. pathYonghong Zhu
We can support the DSC file out of workspace. this old logic first make the absolute path to relative path and strips the leading slash off, then append it to workspace. it cause GenFds failure on Linux when the DSC file is out of workspace. Since we make sure the ActivePlatform is abs. path, so we don't need this old logic to change the abs. path to relative. Cc: Liming Gao <liming.gao@intel.com> Cc: Marvin Haeuser <marvin.haeuser@outlook.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit e642ceb8a586571b506a1ae4c00674b291f8395d)
2016-07-13BaseTools: enhance error handling for DSC fileYonghong Zhu
Add logic for DSC file validation for Prebuild init. Add logic to detect error for DSC parser when '{' is missing. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit d429fcd0d25936ff5861e9c6e37f7cf9285217b2)
2016-07-13BaseTools/Build: Consider only build-specified architecturesThomas Palmer
When building for any specific architecture, the build script today is loading DSC sections for other architectures not in the build. The build process should disregard DSC sections that are not relevant to the build. This fixes scenario whereby a build occurs in a source tree that was been cleaned of non-essential directories. For instance, X64 builds do not require the ArmPkg directory to build a firmware image. This condition (build break when ArmPkg is absent) occurs when included DSCs have sections for multiple architectures. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> (cherry picked from commit 77177984087654ff2888e182d40c20480da29811)
2016-07-13BaseTools: Fix PLATFORM_DIR variable value.Marvin.Haeuser@outlook.com
In commit 017fb1cd4c5e3c8b914eb217ac1760223687dad7, the PLATFORM_DIR macro has been updated to resolve to the correct path. However, it is incorrectly accessed via curved rather than curly braces by GenMake. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> (cherry picked from commit 7a5f1426c57bcaaa87c5c9a86c5ab2090c890453)
2016-07-13BaseTools/VolInfo: Update to handle PE image with .code section onlyYonghong Zhu
rebase the image which only has .code section, but no other section, the tool return error. this patch fix this bug to support it. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 670bf6a7223125cf48c52a2ab272195fbc59e68a)
2016-07-13BaseTools/GenFw: Update to handle PE image with .code section onlyYonghong Zhu
current GenFw rebase the image which only has .code section, but no other section, the tool return error. this patch fix this bug to support it. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 3c4db2dfe2f1ea2cf8529671765111319bbadca4)
2016-07-13BaseTools: Fix the bug to correctly handle the [BuildOptions]Yonghong Zhu
the last fix call os.path.normpath() function, which removes the trailing slash character, it cause NASM failure for ResetVector driver. Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 67a69059f714c0728676d13d97f10bd12730b378)
2016-07-13BaseTools: fix the bug for [BuildOptions] of multiple workspace supportYonghong Zhu
when enable Multiple workspace and there have other option(eg: -I) before $(WORKSPACE), handleWsMacro cannot return correct which cause the ArmVirtPkg build failure. example: [BuildOptions] *_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmVirtPkg/Include Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 2b1c08acfceb94326c67b7d8f9fe5d8ab4cb7f61)
2016-07-13BaseTools: fix PLATFORM_DIR variable value for multiple workspaceYonghong Zhu
when enable the multiple workspace, the PLATFORM_DIR still is $(WORKSPACE)\AnyPkg, even though it is in a PACKAGES_PATH folder. this patch fix this issue to use the real path. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 017fb1cd4c5e3c8b914eb217ac1760223687dad7)
2016-07-13BaseTools: use unsigned chars on ARM architecturesLeif Lindholm
By default, the ARM architectures have unsigned chars, whereas the other architectures supported by EDK2 by default have signed chars. However, EDK2 uses -funsigned-chars on those architectures to change the default behaviour. Unfortunately, the ARM architectures explicitly break their default behaviour by specifying -fsigned-chars (I presume in a pre-emptive attempt at avoiding incompatibility). Since this situation is already confusing enough, switch the ARM architectures to also specify -funsigned-chars explicitly rather than just dropping the current parameter. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 3f7f28717892d8c82065f25070d36ba7eca3dccd)
2016-07-13BaseTools: generate hash value in build report for each output EFI imageYonghong Zhu
Build report add new report type 'HASH' to include the hash value for each output EFI image. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit eca5be7a7d813c78fbeed14736776a774a72cd45)
2016-07-13BaseTools/VolInfo: generate HASH value for each PE imageYonghong Zhu
VolInfo Tool add new option --hash to use openssl to generate hash value for each PE image. If the image base address is not zero, we will rebase its base address to zero before generate hash value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 9947f5769f457c6efd4e917da0bddd702a82de69)
2016-07-13BaseTools: Remove /Oi from Visual Studio tool chains.Cinnamon Shia
Remove /Oi from Visual Studio tool chains. because of the following reasons: 1. Intrinsic is Compiler-dependent. 2. Adding /Oi (Generate Intrinsic Functions) doesn't promise 100% replacing the function call with inline functions. /Oi is only a request, but doesn't force, the compilers to use the intrinsic. The visual studio optimizer can still use the library version. 3. Since EDK2 doesn't include Visual Studio header files, intrinsic function should not be used. Built Nt32Pkg, OvmfPkg, ShellPkg, MdeModulePkg and CryptoPkg successfully. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> (cherry picked from commit 716132efb1a650586d5d1f1fde9dd9d183f45bc8)
2016-07-13BaseTools: Add support to merge Prebuild and Postbuild into build ProcessYonghong Zhu
This feature is enhance build tool to incorporate execution of prebuild and postbuild. 1.Prebuild script a.DEFINE PREBUILD in DSC [Defines] section b.Build command -D PREBUILD to override the one in DSC [Defines] section 1)If PREBUILD is a file, then this file will be used as prebuild script. 2)If PREBUILD is empty, then prebuild script will be disabled. 3)If PREBUILD is not defined in [Defines] section and not passed in on command line, then prebuild script is also disabled. 2.Prebuild option a.All options of build tool b.TARGET, ARCH and TOOL_CHAIN_TAG value, Those value will be from target.txt file if they are not in build command line. c.Additional options following prebuild definition. Quotes are needed when these additional options are present. d.Quotes would also be required if the path to the prebuild command contains space or special characters. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit f0dc69e61bf2316dcf7cc75eb7e4ba374a5b2832)
2016-07-13BaseTools: Enhance --Pcd which override by build optionYonghong Zhu
This patch 1) enhance the help info for --pcd to use " but not '. 2) Add the condition statements for build option Pcd type check. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit d7cd335681d6b1b5791b4e8ef4e311f39469a8c0)
2016-07-13BaseTools: cache the defined Guid tool to improve the performanceYonghong Zhu
Current GenFds Tool class GuidSection() is parsing the tools_def.txt for every GUID'ed section that has a GUID defined tool, it cause a bad performance. so this patch cache the defined Guid tool to improve the performance. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 213ae07750fc7532e8ba62a234e958388d1f0359)