[edk2] [Patch] BaseTools:remove the redundant directories for '-f' with absolute path.

2015-10-25 Thread Yonghong Zhu
when the absolute path is given to '-f', it would create some redundant empty directories. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- Source/C/Split/Split.c | 25 +++-- 1 file changed, 15 insertions(

[edk2] [Patch] BaseTools:remove the redundant directories for '-f' with absolute path.

2015-10-25 Thread Yonghong Zhu
when the absolute path is given to '-f', it would create some redundant empty directories. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- Source/C/Split/Split.c | 24 ++-- 1 file changed, 14 insertions(

[edk2] [Patch] BaseTools/GenFw: add new option to not zero PE/COFF optional header fields

2015-11-08 Thread Yonghong Zhu
Add new option --keepoptionalheader and that flag does not zero PE/COFF optional header fields including the version fields. It can support the case that the PE/COFF optional header would be kept. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yongh

[edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space

2015-11-12 Thread Yonghong Zhu
when the path contains space, it will report error for PATH Environment update. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- toolsetup.bat | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff

[edk2] [Patch] BaseTools: Fix two warning reported in the make phase.

2015-11-12 Thread Yonghong Zhu
when we make BaseTools, it report warnings about VfrError.cpp and VolInfo, so this patch fix this warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- Source/C/VfrCompile/VfrError.cpp | 2 +- Source/C/VolInfo/Vol

[edk2] [Patch] BaseTools: Allow decimal values in the EDK II meta-data file.

2015-11-02 Thread Yonghong Zhu
Because the EDK II meta-data specifications already allow using decimal values in the EDK II Meta-data file [Defines] section, this patch update code to allow this usage. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> ---

[edk2] [Patch] BaseTools: Enhance GenFv Tool to report error message

2015-12-02 Thread Yonghong Zhu
When two vtf files in one FV image, no FV file can be generated, but it report the stack trace info. so we enhance the tool to report error message directly but not the stack trace info. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.

[edk2] [Patch] BaseTools: process the files by the priority in BUILDRULEORDER

2015-12-02 Thread Yonghong Zhu
1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- Source/Python/AutoGen/AutoGen.py | 27 +++ 1 file changed, 27 insertions(+) diff --git a/Source/Python/AutoGen/AutoGen.py b/Source/Python/AutoGen/AutoGen.py index fe56574..263224b 100644 --- a/Source/Python/A

[edk2] [Patch] BaseTools: Fix a bug in the VPD report generation

2015-12-02 Thread Yonghong Zhu
Changed the if condition to check whether current Region is FD VPD region to fix a bug in the VPD report generation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- Source/Python/build/BuildReport.py | 6 +++--- 1 file chan

[edk2] [Patch] BaseTools: Fix one bug in FD region for multiple workspace support

2015-12-17 Thread Yonghong Zhu
Update the os.path.join to mws.join for FILE/INF/CAPSULE/FV region type. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/GenFds/Region.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[edk2] [Patch] BaseTools: Add support for INF statement in FD region

2015-11-30 Thread Yonghong Zhu
FD region today can be file or data, but not a patched image.Add support for an INF statement in an FD region, so the binary from the INF can be patched prior to being added to the FD region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yongh

[edk2] [Patch] BaseTools: Fix a bug when apply patches to SEC use the FILE_GUID override

2015-11-30 Thread Yonghong Zhu
: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- Source/Python/GenFds/FfsInfStatement.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Python/GenFds/FfsInfStatement.py b/Source/Python/GenFds/FfsInfStatement.py

[edk2] [Patch] BaseTools: Add a VPD report subsection of FLASH to the Report

2015-11-26 Thread Yonghong Zhu
Build Spec already added a VPD report subsection of FLASH to the Report chapter, it provide a simple way for user to determine where the VPD region and VPD PCDs are located in the fd file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.

[edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space

2015-11-20 Thread Yonghong Zhu
-by: Yonghong Zhu <yonghong@intel.com> --- toolsetup.bat | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/toolsetup.bat b/toolsetup.bat index 310ddd0..76fd8bb 100755 --- a/toolsetup.bat +++ b/toolsetup.bat @@ -320,28 +320,17 @@ goto end if not d

[edk2] [Patch] BaseTools: Add build error detection for Dynamic PCD name conflict

2015-11-23 Thread Yonghong Zhu
. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- Source/Python/AutoGen/GenC.py | 52 ++- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/Source/Python/AutoGen/GenC.py b/Source/

[edk2] [Patch 0/2] VOID* PCDs in VPD region must be aligned based on value type

2016-01-11 Thread Yonghong Zhu
of the PCD value,If the developer assigns offset values in the DSC file not follow the align rule, build tool break with an error. Yonghong Zhu (2): BaseTools: VOID* PCDs in VPD region must be aligned based on value type BaseTools: VPD Tool to allocate VPD region be aligned based on value

[edk2] [Patch 1/2] BaseTools: VOID* PCDs in VPD region must be aligned based on value type

2016-01-11 Thread Yonghong Zhu
on the syntax of the PCD value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 28 1 file changed, 28 insertions(+) diff --git a/BaseTools/Source/Python/A

[edk2] [Patch 2/2] BaseTools: change $(INC) to @$(INC_LIST) in the build rule

2016-01-11 Thread Yonghong Zhu
options followed by include search path into a file (inc.lst) just as object files and static library files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Conf/build_rule.templat

[edk2] [Patch 0/2] fix NMAKE fails due to command-line length limitation

2016-01-11 Thread Yonghong Zhu
and put all -I or /I options followed by include search path into a file (inc.lst) just as object files and static library files. Yonghong Zhu (2): BaseTools: Generate inc.lst for every module BaseTools: change $(INC) to @$(INC_LIST) in the build rule BaseTools/Conf/build_rule.template

[edk2] [Patch 1/2] BaseTools: Generate inc.lst for every module

2016-01-11 Thread Yonghong Zhu
for every module. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/GenMake.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake

[edk2] [Patch V2] BaseTools: fix the bug to build a compressed ROM image via .INF file

2016-06-02 Thread Yonghong 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@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Py

[edk2] [Patch V2] BaseTools: Add error handling for current_dir is not exist

2016-06-02 Thread Yonghong Zhu
Add the error handling to cover the case that current_dir is not exist. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/GenMake.py | 9 + 1

[edk2] [Patch] BaseTools: ignore the binary LIB file in gen_libs

2016-06-13 Thread Yonghong 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@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Py

[edk2] [Patch] BaseTools: Add error handling for current_dir is not exist

2016-06-01 Thread Yonghong Zhu
Add the error handling to cover the case that current_dir is not exist. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/GenMake.py | 2 ++ 1 fil

[edk2] [Patch] BaseTools: fix the bug to build a compressed ROM image via .INF file

2016-06-01 Thread Yonghong 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@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Py

[edk2] [Patch] BaseTools: process the files by the priority in BUILDRULEORDER

2016-01-17 Thread Yonghong Zhu
1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py

[edk2] [Patch 1/2] BaseTools/GenFw: Exit with error when header lookup fails

2016-01-28 Thread Yonghong Zhu
the null pointer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael LeMay <michael.le...@intel.com> Reviewed-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/C/GenFw/Elf32Convert.c | 10 +++--- BaseTools/Source/C/GenFw/Elf64Convert.c | 7

[edk2] [Patch 2/2] BaseTools/GenFw: Enhance error message for bad symbol definitions

2016-01-28 Thread Yonghong Zhu
x > mEhdr->e_shnum' to 'Sym->st_shndx >= mEhdr->e_shnum' for consistency with the test in GetShdrByIndex. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael LeMay <michael.le...@intel.com> Reviewed-by: Yonghong Zhu <yonghong@intel.com> --- Bas

[edk2] [Patch 0/2] BaseTools/GenFw: improve error messages and fix some bugs

2016-01-28 Thread Yonghong Zhu
These patches improve GenFw's error messages and fix some bugs. Yonghong Zhu (2): BaseTools/GenFw: Exit with error when header lookup fails BaseTools/GenFw: Enhance error message for bad symbol definitions BaseTools/Source/C/GenFw/Elf32Convert.c | 72

[edk2] [Patch] BaseTools: Update BaseTools to pass VS2015 compiler

2016-01-26 Thread Yonghong Zhu
Fix some errors to pass VS2015 compiler. 1. warning C4456: declaration of xxx hides previous local declaration 2. warning C4005: 'UINT8_MAX': macro redefinition Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/So

[edk2] [Patch] BaseTools: Fix a bug for VpdOffset calculate

2016-01-26 Thread Yonghong Zhu
The VpdOffset value in the DSC both support integer and Hex value, so we fix the bug to support both format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 18 --

[edk2] [Patch] BaseTools: fix LzmaCompress VS2013 make failure

2016-02-28 Thread Yonghong Zhu
when make BaseTools by VS2013, LzmaEnc.c report warning C4127: conditional expression is constant, so this patch fix this issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc

[edk2] [Patch] BaseTools: add new command line option to support override PCD value

2016-02-25 Thread Yonghong Zhu
ifferent TokenSpaceGuid Report error if PCD value syntax is incorrect Report error if void* type PCD value exceed its max size Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 99 +++

[edk2] [Patch] BaseTools: Fix the bug when no FD section in the FDF file

2016-01-24 Thread Yonghong Zhu
Check if the Fdf.CurrentFdName is not None and in Fdf.Profile.FdDict before using it which fix a crash issue when no FD section in FDF file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/Auto

[edk2] [Patch] BaseTools/GenFw: Fix a bug for GCC build

2016-02-17 Thread Yonghong Zhu
current GCC build report error: 'for' loop initial declarations are only allowed in C99 or C11 mode, the patch fix this failure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/C/GenFw/Elf32Convert

[edk2] [Patch] BaseTools/VolInfo: add some generic options

2016-02-17 Thread Yonghong Zhu
The Help information provided by VolInfo does not follow the EDK II Tools Design doc, so this patch update the help text and add the generic options: -d, -v, -q, -s. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/

[edk2] [Patch] BaseTools: report an error message when failed to start build command

2016-02-17 Thread Yonghong Zhu
when build.py was failing to build packages but was not providing any error message except for “Failed to start command.” this patch provide the error message. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/

[edk2] [Patch] BaseTools/Trim: Fix the bug for stripping when no line directive in file

2016-02-17 Thread Yonghong Zhu
when no line directive in file, the tool still need to strip the typedef statement (eg: typedef struct, typedef union ..). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/Trim/Trim.p

[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 +-

[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 <yonghong@intel.com> --- BaseTools/Source/Python/A

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

2016-03-15 Thread Yonghong Zhu
. The 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 <yonghong@intel.com> --- Bas

[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 <yongh

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

2016-04-07 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 <yongh

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

2016-04-07 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@intel.com> Yongho

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

2016-04-07 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 <yonghong@intel.com> --- BaseTools/Source/Python/build/BuildReport.py | 53 +++- Bas

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

2016-04-13 Thread Yonghong Zhu
com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/Common/MultipleWorkspace.py | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/P

[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 <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yongho

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

2016-04-13 Thread Yonghong Zhu
com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 12 1 file changed, 12 insertions(+) diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py

[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 <yonghong@intel.

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

2016-04-11 Thread Yonghong Zhu
gned-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 205 +++-- BaseTools/Source/Python/AutoGen/GenC.py| 122 ++-- BaseTools/Source/Python/AutoGen/GenPcdDb.py| 22 ++- BaseTools/Source/Pyt

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

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

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

2016-03-23 Thread Yonghong Zhu
-off-by: Yonghong Zhu <yonghong@intel.com> --- 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

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

2016-03-23 Thread Yonghong Zhu
in conditional directive statements. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/Common/Expression.py | 6 +- BaseTools/Source/Python/Common/GlobalData.py | 3 + BaseTools/Source/Python/build/BuildRep

[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 <yonghong@intel.com> --- BaseTools/Source/Python/GenFds/FdfParser.py| 49 +- BaseTools/

[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 <yonghong@intel.com> --- BaseTools/Source/Python/A

[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 <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/Aut

[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 <yonghong@intel.com> --- BaseTools/Source/Python/Common/BuildToolError.py | 4 +- BaseTools/Source/Python/Common/DataType.py | 5 +- BaseTools/Source/Python/Common/DscClassObject.py | 17 +- BaseTools/Source/Python/

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

2016-03-28 Thread Yonghong Zhu
-by: Yonghong Zhu <yonghong@intel.com> --- 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

[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 <yonghong@intel.com> --- BaseTools/Source/Python/GenFds/FdfParser.py| 11 - BaseTools/Source/Python/GenFds/FfsFileStatement.py | 26 +--- BaseTools/Source/Python/GenFds/Fv.py

[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 <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> Yon

[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 <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@

[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 <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --

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

2016-04-22 Thread Yonghong Zhu
com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 37 +- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/A

[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 <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@

[edk2] [Patch] BaseTools: Support \x####\ in UNI files to specify non-ascii characters

2016-04-28 Thread Yonghong Zhu
UNI spec updated to allow using \x\ to specify non-ascii characters, # is a hex digit. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/UniClassOb

[edk2] [Patch] BaseTools/GenFds: enhance INF built arch filter

2016-05-11 Thread Yonghong Zhu
odules use FILE_GUIDmodule.inf as key which cause __GetPlatformArchList__ return empty. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/GenFds/FfsInfStatement.py |

[edk2] [Patch] BaseTools: Fix bug to not mix comment into Asbuilt inf Depex section

2016-05-11 Thread Yonghong Zhu
<liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/A

[edk2] [Patch] BaseTools/GenFds: enhance to get TOOL_CHAIN_TAG and TARGET value

2016-05-10 Thread Yonghong Zhu
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@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <

[edk2] [Patch] BaseTools/GenFw: enhance to use Magic Field to identify the image

2016-05-12 Thread Yonghong 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@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <

[edk2] [Patch] BaseTools: add error condition for Variable PACKAGES_PATH

2016-05-17 Thread Yonghong Zhu
This patch adds error condition 1)if PACKAGES_PATH is not exist, 2) if space is exist in the PACKAGES_PATH. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/

[edk2] [Patch] BaseTools: fix a bug for uni file \x####\ format handling

2016-05-10 Thread Yonghong Zhu
It should start from the last '\x' position + 1 to find next '\x' character. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/UniClassObject.py |

[edk2] [Patch] BaseTools: support private package definition

2016-05-10 Thread Yonghong Zhu
. 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@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --

[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 <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@

[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 <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/S

[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 <liming@intel.com> Cc: Laszlo Ersek <ler...@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by:

[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 <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@

[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 <liming@intel.com> Cc: Marvin Haeuser <marvin.haeu...@outlook.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/So

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

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

[edk2] [Patch] BaseTools: Keep the Pcd order in the Asbuilt Inf is same with Source

2016-07-26 Thread Yonghong Zhu
The original behavior is that in the Asbuilt inf Pcd's order is base on the Pcd's offset. Now we change the order to keep it is same with the Pcd order in the source inf file. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yongho

[edk2] [Patch] BaseTools: Add build info for binary modules that only list in FDF file

2016-07-14 Thread Yonghong Zhu
on Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 BaseTools/Source/Python/GenFds/FdfParser.py | 12 +++- BaseTools/Source/Python/build/BuildReport.py | 18 +- 3 files changed, 32 insertions(+)

[edk2] [Patch V2] BaseTools: Add build info for binary modules that only list in FDF file

2016-07-27 Thread Yonghong Zhu
on Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 BaseTools/Source/Python/build/BuildReport.py | 18 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/A

[edk2] [Patch] BaseTools: Allow string token identifier to use lower case letters

2016-08-02 Thread Yonghong Zhu
This patch is to align the code behavior with UNI spec that string token identifier can use upper case and lower case letters. Cc: Liming Gao <liming@intel.com> Cc: Felix <fel...@ami.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Z

[edk2] [Patch] BaseTools: Fix the bug when use FILE_GUID override the module in DSC

2016-08-03 Thread Yonghong Zhu
In last commit 2502b73, it doesn't cover the case that in the DSC file use FILE_GUID to override the module. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Py

[edk2] [Patch 1/3] BaseTools: Add the PKCS7 tool

2016-08-15 Thread Yonghong Zhu
Provide the PKCS7 Tool to support the CertType - EFI_CERT_TYPE_PKCS7_GUID, then user can use this tool to add EFI_FIRMWARE_IMAGE_AUTHENTICATION for a binary. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao

[edk2] [Patch 3/3] BaseTools: FMP capsule add the support to generate auth info

2016-08-15 Thread Yonghong Zhu
Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/GenFds/Capsule.py | 80 +-- BaseTools/Source/Python/GenFds/CapsuleData.py | 4 +- BaseTools/S

[edk2] [Patch 2/3] BaseTools: Rsa2048Sha256Sign add new option to support Monotonic count

2016-08-15 Thread Yonghong Zhu
ed-off-by: Yonghong Zhu <yonghong@intel.com> --- .../Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py | 31 +- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py b/BaseTools/Source/Python/Rsa20

[edk2] [Patch 0/3] BaseTools: Add the support for FMP capsule generate auth info

2016-08-15 Thread Yonghong Zhu
-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> Yonghong Zhu (3): BaseTools: Add the PKCS7 tool BaseTools: Rsa2048Sha256Sign add new option to support Monotonic count BaseTools: FMP capsule add the support to generate auth info Ba

[edk2] [Patch 1/3 V2] BaseTools: Add the PKCS7 tool

2016-08-15 Thread Yonghong Zhu
Provide the PKCS7 Tool to support the CertType - EFI_CERT_TYPE_PKCS7_GUID, then user can use this tool to add EFI_FIRMWARE_IMAGE_AUTHENTICATION for a binary. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao

[edk2] [Patch] BaseTools: report error if source module INF is only list in FDF file

2016-07-20 Thread Yonghong Zhu
noCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 28 BaseTools/Source/Python/GenFds/FdfParser.py | 15 +++ 2 files changed, 43 insertions(+) diff --git a/BaseTools/S

[edk2] [Patch] Update edksetup.bat to check NASM system environment variable

2016-07-15 Thread Yonghong Zhu
If the NASM_PREFIX variable is not set, it would report warning message. If there exist the C:\nasm\nasm.exe file, it would set the NASM_PREFIX variable to C:\nasm\. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <

[edk2] [Patch] BaseTools: Fix a bug for FixedPcd value generation in AutoGen file

2016-07-14 Thread Yonghong Zhu
nt 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/AutoGen/GenC.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index d25d371..29951e3 100644 --- a/Base

[edk2] [Patch] BaseTools: Update the FV region name as upper letter

2016-07-11 Thread Yonghong Zhu
Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/GenFds/FdfParser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 39f951a..56

[edk2] [Patch] BaseTools: Fix report generation failure on case sensitive file system

2016-07-07 Thread Yonghong Zhu
Since in GenFds phase, the generate FV all use upper letter. In the build report, we should use the upper letter FV name to combine the file path. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@

[edk2] [Patch] BaseTools: Add support for $(FAMILY) macro

2016-07-04 Thread Yonghong 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@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@

[edk2] [Patch] BaseTools: Fix a bug use 'COMMON' as CodeBase in BuildOptions section

2016-08-17 Thread Yonghong Zhu
kurt.kenn...@microsoft.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/Workspace/MetaFileTable.py | 8 +++- BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 3 ++- 2 files changed,

[edk2] [Patch] BaseTools: Fix the bug to parse the short varname in map file

2017-02-07 Thread Yonghong Zhu
ed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/Common/Misc.py | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 43d0818..1a5968a 100644 --- a/Base

[edk2] [Patch] BaseTools: Extend the Macro used in the FDF !include statement

2017-01-21 Thread Yonghong Zhu
ing@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/Python/GenFds/FdfParser.py | 41 + 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/BaseTools/Source/P

[edk2] [Patch] BaseTools: Convert incomplete expression with dangling while()

2017-01-21 Thread Yonghong Zhu
From: Nikolai SAOUKH <n...@otdel-1.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Nikolai SAOUKH <n...@otdel-1.org> Reviewed-by: Yonghong Zhu <yonghong@intel.com> --- BaseTools/Source/C/VfrCompile/VfrSyntax.g | 6 +++--- 1 file changed,

[edk2] [Patch] BaseTools: add error check for Macro usage in the INF file

2017-02-20 Thread Yonghong Zhu
Use of MACRO statements in the EDK II INF files is limited to local usage only; global or external macros are not permitted. This patch add the check for not defined macros. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yongho

[edk2] [Patch] BaseTools: Fix the regression issue caused by commit dc4c77

2017-02-22 Thread Yonghong Zhu
In the last commit dc4c77, the _GetHeaderInfo will be called more than once, which cause the self._ConstructorList.append(Value) append some duplicate value. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <

  1   2   3   4   5   6   >