[edk2] [Patch] BaseTools: Fix the build error caused by eca980

2018-04-10 Thread Yonghong Zhu
Roll back the fixed at build pcd collection to include the pcd in Module and Library. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools

[edk2] [PATCH] BaseTools: Support DSC component !include PCD items

2018-04-18 Thread Yonghong Zhu
From: Yunhua Feng DSC format: [Components] TestPkg/TestDriver.inf { !include TestPkg/Test.txt } Test.txt content: PcdToken.PcdCName | 0x123 Per spec we should support this usage. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/S

[edk2] [PATCH] BaseTools: Parse DSC component !include file report error issue

2018-04-18 Thread Yonghong Zhu
From: Yunhua Feng DSC format: [Components] !include TestPkg/Test.dsc if the Test.dsc have a INF, and the INF not exist, current the error message is not clearly. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng

[edk2] [Patch] BaseTools: Fix one invalid change in 6be94743

2018-04-24 Thread Yonghong Zhu
From: Yunhua Feng Roll back one change in 6be94743, it was updated incorrect. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[edk2] [PATCH] BaseTools: Fix regression issue by 1eb72acddd61

2018-04-26 Thread Yonghong Zhu
From: Yunhua Feng Fix regression issue by 1eb72acddd61 secRe not replace by secReGeneral Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 2 +- 1 file changed

[edk2] [PATCH] BaseTools: Fix regression bug by 3378782691af

2018-04-27 Thread Yonghong Zhu
From: Yunhua Feng Fix regression bug by 3378782691af that cause build failure for platforms using hierarchical dsc. Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=941 Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng

[edk2] [Patch] BaseTools: Correct the variable name

2018-05-06 Thread Yonghong Zhu
the commit bff74750 introduce a undefined variable name 'scope' cause build failure, it should use 'Scope'. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FdfParser.py | 2 +- 1 file changed, 1 inse

[edk2] [Patch] BaseTools: Fix generating array's size is incorrect in AutoGen.c

2018-05-09 Thread Yonghong Zhu
_PcdName[2] = {0x41,0x42,0x43,0x44}; Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=950 Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/AutoGen/GenC.py | 25 + 1 file c

[edk2] [Patch] BaseTools: Remove the redundant code

2018-05-09 Thread Yonghong Zhu
the ArraySize and Array already be got in line 1093, so this code are redundant. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/GenC.py | 10 -- 1 file changed, 10 deletions(-) diff --git a/BaseTools/Source/Python

[edk2] [Patch] BaseTools: Enhance error message when file is not exist for Gensec

2018-05-13 Thread Yonghong Zhu
under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FvImageSection.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py index 57ecea0..3a

[edk2] [Patch] BaseTools: Fix bug PCD type in component is not same with Pcd section

2018-05-20 Thread Yonghong Zhu
[PcdsFixedAtBuild] section, it is not permitted to list it in a sub-section of an INF file. but current code doesn't report error for this case. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=951 Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 S

[edk2] [Patch] BaseTools: Library PCD type will inherit from the driver

2018-05-20 Thread Yonghong Zhu
From: Yunhua Feng If a PCD is not referenced in global PCD section of DSC file at all, but is referenced in module scope, then the default PCD type for libs should be the module scoped PCD type. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=901 Cc: Liming Gao Cc: Yonghong Zhu

[edk2] [Patch] BaseTools: Report more clear error message when PCD type mismatch

2018-05-20 Thread Yonghong Zhu
/TestDriver.inf { PcdToken.PcdCName | "B" } Library: [Pcd] PcdToken.PcdCName Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/AutoGen/AutoGen.py | 20 1 file changed, 12 i

[edk2] [Patch] Build spec: Add module scoped `` section override scope statement

2018-05-22 Thread Yonghong Zhu
Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 8_pre-build_autogen_stage/82_auto-generation_process.md | 7 ++- README.md | 1 + 2 files changed, 7

[edk2] [Patch] BaseTools/GenFds: Remove redundant GetRealFileLine call

2018-05-24 Thread Yonghong Zhu
: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zurcher, Christopher J --- BaseTools/Source/Python/GenFds/FdfParser.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools

[edk2] [Patch 1/5] Build Spec: Add !error statement support

2018-05-30 Thread Yonghong Zhu
Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 8_pre-build_autogen_stage/82_auto-generation_process.md | 6 ++ README.md | 3 ++- 2 files changed, 8

[edk2] [Patch 3/5] DSC Spec: Add !error statement support

2018-05-30 Thread Yonghong Zhu
Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 2_dsc_overview/22_build_description_file_format.md | 21 +--- .../33_platform_dsc_definition.md | 28

[edk2] [Patch 4/5] FDF Spec: Add !error statement support

2018-05-30 Thread Yonghong Zhu
Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- .../22_flash_description_file_format.md| 17 +++- 3_edk_ii_fdf_file_format/32_fdf_definition.md | 30

[edk2] [Patch 5/5] INF Spec: !error statement is not permitted in INF file

2018-05-30 Thread Yonghong Zhu
Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 2_inf_overview/22_information_file_general_rules.md | 8 ++-- 3_edk_ii_inf_file_format/32_component_inf_definition.md | 8 ++-- README.md

[edk2] [Patch 2/5] DEC Spec: !error statement is not permitted in DEC file

2018-05-30 Thread Yonghong Zhu
Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 2_dec_file_overview/22_declaration_file_format.md | 6 +- 3_edk_ii_dec_file_format/32_package_declaration_dec_definitions.md | 6

[edk2] [Patch] BaseTools: support building the same INF more than once with -m option

2017-06-08 Thread Yonghong Zhu
Currently DSC file [Components] Section can support building the same INF more than once for the same arch, this patch support build with -m option to generate multiple instances. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools

[edk2] [Patch] BaseTools: Enhance the report to not show the empty section

2017-06-08 Thread Yonghong Zhu
Enhance the report to not show the empty section, eg: Module Library Sub-section, if there is nothing in this section, we will not show it in the report. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/build

[edk2] [Patch 0/2] Add /Gw to CC_FLAGS for VS 2013 and higher tool chains

2017-06-13 Thread Yonghong Zhu
MdePkg to check the _MSC_VER and define GLOBAL_REMOVE_IF_UNREFERENCED to nothing for VS2013 and higher tool chain tags. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=583 Cc: Michael D Kinney Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu

[edk2] [Patch 1/2] BaseTools: add /Gw to CC_FLAGS for VS2013 and higher tool chain tags

2017-06-13 Thread Yonghong Zhu
: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Conf/tools_def.template | 110 +++--- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 04a1bcb

[edk2] [Patch 2/2] MdePkg: update Base.h in MdePkg to check the _MSC_VER

2017-06-13 Thread Yonghong Zhu
update Base.h in MdePkg to check the _MSC_VER and define GLOBAL_REMOVE_IF_UNREFERENCED to nothing for VS2013 and higher tool chain tags. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- MdePkg/Include/Base.h | 2 +- 1 file changed, 1

[edk2] [Patch 1/2 V2] BaseTools: add /Gw to CC_FLAGS for VS2013 and higher tool chain tags

2017-06-14 Thread Yonghong Zhu
: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Conf/tools_def.template | 96 +++ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 04a1bcb

[edk2] [Patch] BaseTools: Fix the bug that use '|' or '||' in DSC file's Pcd value

2017-06-20 Thread Yonghong Zhu
From: Yunhua Feng Fix the bug to support use '|' or '||' in DSC file's Pcd value. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/Common/String.py | 7 ++- 1 file ch

[edk2] [Patch] BaseTools: Enhance DEC Defines section format check

2017-06-22 Thread Yonghong Zhu
= Nt32Pkg Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py

[edk2] [Patch] BaseTools: report error HiiString in HII format PCD must not be empty

2017-06-22 Thread Yonghong Zhu
Add a check that HiiString field in the HII format PCD entry must not be an empty string. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 7 +++ 1 file changed, 7 insertions

[edk2] [PATCH] BaseTools: suppress usage instructions with rebuild options

2017-06-29 Thread Yonghong Zhu
From: Chris Ruffin When using edksetup.bat Rebuild, the script outputs usage instructions to the console, when no usage error is encountered. Update the usage instructions and suppress these usage instructions when using the Rebuild, ForceRebuild options. Change-Id: Ica98e19f3d5198df2519106e4c5

[edk2] [PATCH] BaseTools: Add PCDs conditional operator function

2017-07-03 Thread Yonghong Zhu
From: Yunhua Feng Parse PCDS value like A >B ? C :D if A > B is True, the result is C, else the result is D Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/Common/Expression.p

[edk2] [PATCH] BaseTools: Fix FDF file parse !include file issue

2017-07-03 Thread Yonghong Zhu
From: Yunhua Feng when FDF file use "!include" format to include the other file, and the end line of the file not end with '\n', the include file parse error. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua

[edk2] [Patch] BaseTools: Fix the bug that warn() function with only 1 argument

2017-07-24 Thread Yonghong Zhu
In the definition, the warn() function takes at least 2 arguments. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/build/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source

[edk2] [Patch] BaseTools: add some comment for .PrebuildEnv file's usage

2017-07-24 Thread Yonghong Zhu
This patch add some comments to explain why we use .PrebuildEnv file to save environment variable settings set by the prebuild script. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/build/build.py | 5 + 1 file

[edk2] [Patch 0/6] BaseTools: Fix some segmentation fault in Tools

2017-07-26 Thread Yonghong Zhu
Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Yonghong Zhu (6): BaseTools/Split: Fix the segmentation fault in GetSplitValue() BaseTools/GenSec: Fix a segmentation fault in main() BaseTools/GenFfs: Fix a segmentation fault from vsprintf

[edk2] [Patch 1/6] BaseTools/Split: Fix the segmentation fault in GetSplitValue()

2017-07-26 Thread Yonghong Zhu
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=538 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/Split/Split.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/C

[edk2] [Patch 2/6] BaseTools/GenSec: Fix a segmentation fault in main()

2017-07-26 Thread Yonghong Zhu
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=537 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/GenSec/GenSec.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C

[edk2] [Patch 3/6] BaseTools/GenFfs: Fix a segmentation fault from vsprintf()/vfprintf()

2017-07-26 Thread Yonghong Zhu
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=536 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/GenFfs/GenFfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/C/GenFfs

[edk2] [Patch 4/6] BaseTools/EfiRom: Fix a segmentation fault from vsprintf()/vfprintf()

2017-07-26 Thread Yonghong Zhu
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=534 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/EfiRom/EfiRom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/C/EfiRom

[edk2] [Patch 6/6] BaseTools/GenCrc32: Fix a bug to hand empty file for decode

2017-07-26 Thread Yonghong Zhu
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=535 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/GenCrc32/GenCrc32.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C

[edk2] [Patch 5/6] BaseTools/EfiLdrImage: Fix a segmentation fault from vfprintf()

2017-07-26 Thread Yonghong Zhu
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=533 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools

[edk2] [Patch] BaseTools: Fix the bug to correctly check Pcd type that in FDF file

2017-07-26 Thread Yonghong Zhu
We set Pcd value in FDF and used this Pcd as PatchableInModule type in module, it cause build report generate failure. because we incorrectly set the Pcd type during check whether the Pcd is used. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu

[edk2] [edk2-DSCSpecification Patch] DSC Spec: Remove Restriction on Using NULL in [LibraryClasses] Section

2017-08-02 Thread Yonghong Zhu
https://bugzilla.tianocore.org/show_bug.cgi?id=645 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 2_dsc_overview/27_[libraryclasses]_section_processing.md | 5 - README.md

[edk2] [Patch 0/4] Fix Xcode 9 Beta treating 32-bit left shift as undefined behavior

2017-08-02 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Yonghong Zhu (4): BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined IntelFrameworkModulePkg: Fix Xcode 9 Beta treating 32-bit left shift as

[edk2] [Patch 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined

2017-08-02 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- BaseTools/Source/C/Common/Decompress.c | 4 ++-- BaseTools/Source/C/TianoCompress/TianoCompress.c | 4 ++-

[edk2] [Patch 3/4] IntelFrameworkModulePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined

2017-08-02 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao Cc: Michael D Kinney Cc: Jeff Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- .../BaseUefiTianoCustomDecompressLib.c| 4 ++-- 1 file changed, 2 ins

[edk2] [Patch 2/4] DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined

2017-08-02 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Ruiyu Ni Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- DuetPkg/EfiLdr/TianoDecompress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DuetPkg/EfiLdr/TianoDe

[edk2] [Patch 4/4] MdePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined

2017-08-02 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[edk2] [Patch V2 0/4] Fix Xcode 9 Beta treating 32-bit left shift as undefined behavior

2017-08-03 Thread Yonghong Zhu
V2: Fix build MdeModulePkg failure by use LShiftU64() rather than << operator. Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Yonghong Zhu (4): BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as und

[edk2] [Patch V2 2/4] DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined

2017-08-03 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Ruiyu Ni Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- DuetPkg/EfiLdr/TianoDecompress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DuetPkg/EfiLdr/Tiano

[edk2] [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined

2017-08-03 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- BaseTools/Source/C/Common/Decompress.c | 4 ++-- BaseTools/Source/C/TianoCompress/TianoCompress.c | 4 ++-

[edk2] [Patch V2 3/4] IntelFrameworkModulePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined

2017-08-03 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao Cc: Michael D Kinney Cc: Jeff Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- .../BaseUefiTianoCustomDecompressLib.c | 6 +++--- 1 file changed, 3 ins

[edk2] [Patch V2 4/4] MdePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined

2017-08-03 Thread Yonghong Zhu
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish --- MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletio

[edk2] [Patch] BaseTools: Fix Segmentation fault: 11 when build AppPkg with XCODE5

2017-08-06 Thread Yonghong Zhu
it is a bug in mtoc setting the size of the debug directory entry to the size of the .debug section, not the size of the EFI_IMAGE_DEBUG_DIRECTORY_ENTRY. It was causing a loop to iterate and get bogus EFI_IMAGE_DEBUG_DIRECTORY_ENTRY data and pass that to memset() and boom. Cc: Liming Gao Cc: Mich

[edk2] [Patch] MdePkg: Adjust the loops in PeCoffLoaderGetImageInfo()

2017-08-07 Thread Yonghong Zhu
It looks like mtoc images will iterate in this loop and reload the .debug section sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY) ImageContext->ImageRead() in the loop. Bail out after the 1st read (it is already in the .debug section). Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=663 Cc: Liming G

[edk2] [Patch] BaseTools: Don't need to add extra quotes when UI string from file

2017-08-10 Thread Yonghong Zhu
From: Bin Wang when the UI string is read from files, we don't need to add the extra quotes. Otherwise, it will cause UI name has this extra quotes. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bin Wang --- BaseTools/Source/P

[edk2] [Patch] BaseTools: Support TabSpace between section tag in DEC file

2017-08-10 Thread Yonghong Zhu
From: Yanyan Zhang Per DEC spec, multiple section tag use to separate, and it can support Tab, so this patch fix the bug to use Tab. ::= {} {} ::= * Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yanyan Zhang --- BaseTools/Source

[edk2] [Patch] BaseTools/EfiRom: Add multiple device id support

2017-08-22 Thread Yonghong Zhu
From: Daniel Verkamp This is a patch to implement writing and dumping of PCI 3.0 Device ID lists in EFI option ROMs in the EfiRom tool. Using this modification, multiple space-delimited device IDs can be specified after -i. The first device in the list is used for the main PCI ROM header Device

[edk2] [Patch] DSC Spec: Add multi-arg support to PREBUILD/POSTBUILD

2017-08-30 Thread Yonghong Zhu
fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=669 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 2_dsc_overview/23_[defines]_section_processing.md | 22

[edk2] [Patch] Build Spec: Add multi-arg support to PREBUILD/POSTBUILD

2017-08-30 Thread Yonghong Zhu
fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=669 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- .../106_post_build_processing.md | 22 +++--- .../82_auto

[edk2] [Patch] BaseTools: update help info for -Y option to include 'HASH'

2017-09-03 Thread Yonghong Zhu
Per build spec,the default set of flags for -Y option include 'HASH', so this patch to update the help info. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/build/build.py | 2 +- 1 file changed, 1 inser

[edk2] [Patch] BaseTools: Not show *B when Pcd value in build option same with DEC

2017-09-04 Thread Yonghong Zhu
Per build spec, If the value obtained from either a build option, the DSC or FDF is the same as the value in the DEC, then *B , *P or *F will not be shown in the report. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source

[edk2] [Patch] Build spec: add description for build with binary cache

2017-09-04 Thread Yonghong Zhu
fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=689 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- .../82_auto-generation_process.md| 20 README.md

[edk2] [Patch] BaseTools: add support for BIOS build with binary cache

2017-09-04 Thread Yonghong Zhu
. Otherwise, build tool will compile the source files and generate the binary files. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 161 +-- BaseTools/Source/Python/Common

[edk2] [Patch] DSC Spec: Hii type Pcd VariableName is NOT allowed to be empty string

2017-09-04 Thread Yonghong Zhu
fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=597 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 2_dsc_overview/29_pcd_sections.md| 4 3_edk_ii_dsc_file_format

[edk2] [Patch] BaseTools: Fix the bug that same region print twice in the build log

2017-09-05 Thread Yonghong Zhu
This patch fixed the bug that same region print twice in the build log. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/Fd.py | 58 1 file changed, 32 insertions(+), 26

[edk2] [Patch] BaseTools: Change source files to DOS format.

2016-03-08 Thread Yonghong Zhu
From: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- BaseTools/Source/C/BootSectImage/bootsectimage.c | 14 +++--- BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c | 18 +- BaseTools/Source/C/Split/Split.c

[edk2] [Patch] BaseTools: report warning if VOID* PCD with {} value is not 8-byte aligned

2016-03-09 Thread Yonghong Zhu
For VOID* Pcd with {} value, If platform developer wants to put in a specific hex offset value that is not 8-byte aligned for VOID * then we allow it with a warning message. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen

[edk2] [Patch] BaseTools: Add two macros into AutoGenObject macro dict

2016-03-11 Thread Yonghong Zhu
Add DEST_DIR_OUTPUT and DEST_DIR_DEBUG into AutoGenObject macro dict. Because some module (eg: BaseUefiCpuLib) may use this macro in the make file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 ++ 1 file

[edk2] [Patch] BaseTools/BPDG: Fix the bug to get the PCD Size

2016-03-13 Thread Yonghong Zhu
The original bug is only consider int format of PcdSize, but forgot the Hex format. The fix is use the already exist variable PCD.PcdBinSize which done to translate PCD size cover both format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools

[edk2] [Patch] BaseTools: Fix nmake failure due to command-line length limitation

2016-03-15 Thread Yonghong Zhu
content of the response file is combine from the FLAGS option and INC option. 4. When build failure, it would print out the response file's file location and its content. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Au

[edk2] [Patch] BaseTools: Extend the RAW format to support multiple binary files

2016-03-21 Thread Yonghong Zhu
$(PLATFORM_PACKAGE)/Binaries/File2.pdb Align=16 $(PLATFORM_PACKAGE)/Binaries/File3.pdb } Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FdfParser.py| 49 +- BaseTools/Source/Python/GenFds

[edk2] [Patch] BaseTools: replace not defined macro to ' ' when generate response file

2016-03-22 Thread Yonghong Zhu
replace the not defined macro to ' ', but not report error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/GenMake.py | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) di

[edk2] [Patch v2] BaseTools: not include the undefined macro in response file

2016-03-23 Thread Yonghong Zhu
dict 2. For the undefined macros which used in the Make file, when we generate the response file, we not include this macro, let make phase to handle. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 6

[edk2] [Patch] BaseTools: Add two new sections for PCD in the build report

2016-03-23 Thread Yonghong Zhu
conditional directive statements. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Common/Expression.py | 6 +- BaseTools/Source/Python/Common/GlobalData.py | 3 + BaseTools/Source/Python/build/BuildReport.py | 112

[edk2] [Patch] BaseTools: generate alignment when the FV content come from the filesystem

2016-03-23 Thread Yonghong Zhu
-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FvImageSection.py | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py index caf8de1..b577de2 100644 --- a

[edk2] [Patch] BaseTools: Remove the unnecessary check for RAW File

2016-03-27 Thread Yonghong Zhu
Because the __VerifyFile function already checked whether the file is valid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FdfParser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/BaseTools

[edk2] [Patch] BaseTools: cache the defined Guid tool to improve the performance

2016-03-28 Thread Yonghong Zhu
ff-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 3 ++- BaseTools/Source/Python/GenFds/GuidSection.py | 8 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/G

[edk2] [Patch] BaseTools/GenFds: Fix the bug for wrong alignment generate for RAW file

2016-04-01 Thread Yonghong Zhu
: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FdfParser.py| 11 - BaseTools/Source/Python/GenFds/FfsFileStatement.py | 26 +--- BaseTools/Source/Python/GenFds/Fv.py | 28 -- 3 files

[edk2] [Patch] BaseTools: Enhance --Pcd which override by build option

2016-04-04 Thread Yonghong 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 --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 ++ BaseTools/Sou

[edk2] [Patch] BaseTools: Add support to merge Prebuild and Postbuild into build Process

2016-04-05 Thread Yonghong Zhu
Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Common/BuildToolError.py | 4 +- BaseTools/Source/Python/Common/DataType.py | 5 +- BaseTools/Source/Python/Common/DscClassObject.py | 17 +- BaseTools/Source/Python/Common/GlobalData.py

[edk2] [Patch 0/2] Tool generate hash value for each output EFI image

2016-04-06 Thread Yonghong Zhu
Build Tool add new report type 'HASH' to generate hash value in the build report. VolInfo Tool add new option --hash to use openssl to generate hash value for each PE image. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Yonghong Zhu (2): BaseToo

[edk2] [Patch 2/2] BaseTools: generate hash value in build report for each output EFI image

2016-04-06 Thread Yonghong 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 --- BaseTools/Source/Python/build/BuildReport.py | 53 +++- BaseTools/Source/Py

[edk2] [Patch 1/2] BaseTools/VolInfo: generate HASH value for each PE image

2016-04-06 Thread Yonghong 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

[edk2] [Patch] BaseTools: add the support for --pcd feature to patch the binary efi

2016-04-11 Thread Yonghong 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 --- BaseTools/Source

[edk2] [Patch] BaseTools: Add mixed PCD support feature

2016-04-11 Thread Yonghong Zhu
gned-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 205 +++-- BaseTools/Source/Python/AutoGen/GenC.py| 122 ++-- BaseTools/Source/Python/AutoGen/GenPcdDb.py| 22 ++- BaseTools/Source/Python/Common/GlobalData.py |

[edk2] BaseTools: fix PLATFORM_DIR variable value for multiple workspace

2016-04-12 Thread Yonghong 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools

[edk2] [Patch] BaseTools: fix the bug for [BuildOptions] of multiple workspace support

2016-04-12 Thread Yonghong Zhu
Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 12 1 file changed, 12 insertions(+) diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py index

[edk2] [Patch v2] BaseTools: fix the bug for [BuildOptions] of multiple workspace support

2016-04-13 Thread Yonghong Zhu
: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Common/MultipleWorkspace.py | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/Common/MultipleWorkspace.py b/BaseTools/Source/Python/Common

[edk2] [Patch 0/2] BaseTools: Update tool to handle PE image with .code section only

2016-04-13 Thread Yonghong 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Yonghong Zhu (2): BaseTools/GenFw: Update to handle PE image

[edk2] [Patch 1/2] BaseTools/GenFw: Update to handle PE image with .code section only

2016-04-13 Thread Yonghong 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/GenFw/GenFw.c | 7

[edk2] [Patch 2/2] BaseTools/VolInfo: Update to handle PE image with .code section only

2016-04-13 Thread Yonghong 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/VolInfo/VolInfo.c | 7 --- 1 file

[edk2] [Patch] BaseTools: fix a bug for PEI VPD Pcd collection

2016-04-14 Thread Yonghong 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py

[edk2] [Patch] BaseTools: Fix the bug to correctly handle the [BuildOptions]

2016-04-14 Thread 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 Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Common

[edk2] [Patch] BaseTools: enhance error handling for DSC file

2016-04-15 Thread Yonghong Zhu
Add logic for DSC file validation for Prebuild init. Add logic to detect error for DSC parser when '{' is missing. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/MetaFileParser.py| 2 ++

[edk2] [Patch] BaseTools/GenFds: remove the old logic since ActivePlatform is abs. path

2016-04-18 Thread Yonghong Zhu
we don't need this old logic to change the abs. path to relative. Cc: Liming Gao Cc: Marvin Haeuser Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/GenFds.py | 10 +- 1 file changed, 1 insertion(+), 9 dele

[edk2] [Patch v2] BaseTools: fix a bug for PEI VPD Pcd collection

2016-04-18 Thread Yonghong 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py

[edk2] [Patch] BaseTools: Update FMP Capsule support to follow FDF spec

2016-04-21 Thread Yonghong Zhu
: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FdfParser.py | 60 - 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools

[edk2] [Patch] BaseTools: Fix the bug for .aml to use ASL binary type in Asbuilt inf

2016-04-22 Thread Yonghong Zhu
: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 37 +- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py

[edk2] [Patch] BaseTools: fix the bug for FMP to support use Macro as path description

2016-04-28 Thread Yonghong 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FdfParser.py | 5

<    1   2   3   4   5   6   >