summaryrefslogtreecommitdiff
path: root/BaseTools/Source
AgeCommit message (Collapse)Author
2016-07-26BaseTools: Fix a bug for FixedPcd value generation in AutoGen fileYonghong Zhu
If the library is listed in [Components] section for build only, its used FixedPcd Value is not generated into AutoGen code. This patch cover this case to generate the FixedPcd Value in AutoGen 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 c9da41b235eaf34248c92839924650f071079dc8)
2016-07-26BaseTools: Update the FV region name as upper letterYonghong Zhu
Since in the GenFds phase, the FV is generated as upper letter. This patch update the FV region name as upper letter, it can fix the build report generate failure on case sensitive file system. 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> Reviewed-by: Andrew Fish <afish@apple.com> (cherry picked from commit 0199377c0d634218d0e06478ca766b7d891651c5)
2016-07-26BaseTools/GenFds: unbreak Region.PadBufferLaszlo Ersek
In its current form, Region.PadBuffer() fills every second byte with 0x20, the default separator string of Python's string.join(): https://docs.python.org/2/library/string.html#string.join This corrupts some firmware because (a) 0x20 never corresponds to any ErasePolarity, (b) the PadData produced are actually longer than Size. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Fixes: bd907fb6386560e621112beca7b7d381d0003967 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> (cherry picked from commit a78b518b6eddef545fa440822bec315b31e4e987)
2016-07-26BaseTools/GenFds: speed up Region.PadBuffer()Laszlo Ersek
The current implementation calls both pack() and Buffer.write() Size times. The new implementation calls both of these methods only once; the full data to write are constructed locally [1]. The range() function is replaced by xrange() because the latter is supposed to be faster / lighter weight [2]. On my laptop, I tested the change as follows: I pre-built the series at [3] with build -a X64 -p OvmfPkg/OvmfPkgX64.dsc -t GCC48 -b DEBUG \ -D HTTP_BOOT_ENABLE -D SECURE_BOOT_ENABLE (The series at [3] is relevant because it increases the size of one of the padded regions by 8.5 MB, slowing down the build quite a bit.) With all source code already compiled, repeating the above command takes approximately 45 seconds. With the patch applied, it goes down to 29 seconds. [1] http://stackoverflow.com/questions/27384093/fastest-way-to-write-huge-data-in-file [2] https://docs.python.org/2/library/functions.html?highlight=xrange#xrange [3] http://thread.gmane.org/gmane.comp.bios.edk2.devel/14214 We can also measure the impact with a synthetic test: > import timeit > > test_old = """ > import struct, string, StringIO > Size = (8 * 1024 + 512) * 1024 > Buffer = StringIO.StringIO() > PadData = 0xFF > for i in range(0, Size): > Buffer.write(struct.pack('B', PadData)) > """ > > test_new = """ > import struct, string, StringIO > Size = (8 * 1024 + 512) * 1024 > Buffer = StringIO.StringIO() > PadByte = struct.pack('B', 0xFF) > PadData = string.join(PadByte for i in xrange(0, Size)) > Buffer.write(PadData) > """ > > print(timeit.repeat(stmt=test_old, number=1, repeat=3)) > print(timeit.repeat(stmt=test_new, number=1, repeat=3)) The output is [8.231637001037598, 8.81188416481018, 8.948754072189331] [0.5503702163696289, 0.5461571216583252, 0.578315019607544] Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit bd907fb6386560e621112beca7b7d381d0003967)
2016-07-26BaseTools/GenFds: factor out Region.PadBuffer() methodLaszlo Ersek
The same logic is used in five places; factor it out to a common method. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 5588565f4845d8138888f436218bc8334c0be54f)
2016-07-13BaseTools: Add support for $(FAMILY) macroYonghong Zhu
Build spec mentions $(FAMILY) macro be used in DSC/FDF to specify the tool chain family, like GCC, MSFT. This patch add the support for this macro. 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 40b4e21dbc6c4c3ba2a1748be97bf90acb3b45b8)
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: 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: 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: 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)
2016-07-13BaseTools/GenFds: Fix the bug for wrong alignment generate for RAW fileYonghong Zhu
When do the multiple raw file support feature, it cause the regression that the raw file section alignment value was wrongly overridden by the single raw file. this patch: 1) fix the wrong overridden bug. 2) remove the duplicate code for combine multiple raw file into one. 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 cfaaf99bdd412139ca7b9724e678429b2f2fb45f)
2016-07-13BaseTools: Add two new sections for PCD in the build reportYonghong Zhu
Build Spec updated to add two new sections for PCD in the build report. 1.Conditional directives section:If the DSC or FDF file contains conditional directive statements. 2.Unused PCDs section: If the DSC or FDF file define values for PCDs that are not used by any module and are not used in conditional directive statements. 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 c8d07c5eeb481e777ad48dc1737d1ab1be67bd44)