[edk2] [PATCH V2] BaseTools:GenMakeFile Complete the task using CC Tool multithreading

2019-04-03 Thread Fan, ZhijuX
CC_FLAGS "/Mp" enables multithreading with CC Tool. In order to adapt to this change, I made some changes to other tools Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Conf/build_rule.template | 2 +-

[edk2] [PATCH] BaseTools:Coding problems caused by special characters

2019-03-28 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1670 During BaseTools compiling under Chinese or Japanese language Windows, python exception occurring. UnicodeDecodeError: 'ascii' codec can't decode byte 0xbd in position 3528: ordinal not in range(128) Cc: Bob Feng Cc: Liming Gao

[edk2] [PATCH V3] BaseTools:Trim will trig exception when input asl UTF8 format file

2019-03-27 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1641 The command trim --asl-file -o test.i UTF8.asl will trig the exception. There's a problem with the encoding of the file,it only appears in python3. I changed the way I opened it to support reading this file Cc: Bob Feng Cc: Liming Gao

[edk2] [PATCH V2] BaseTools:Trim will trig exception when input asl UTF8 format file

2019-03-27 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1641 The command trim --asl-file -o test.i UTF8.asl will trig the exception. Trim tool should report error message for unsupported UTF8 file instead of the exception. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution

[edk2] [PATCH] BaseTools:Trim will trig exception when input asl UTF8 format file

2019-03-22 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1641 The command trim --asl-file -o test.i UTF8.asl will trig the exception. Trim tool should report error message for unsupported UTF8 file instead of the exception. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution

[edk2] FW: [PATCH] BaseTools:Guid.xref will change after increment build

2019-03-05 Thread Fan, ZhijuX
st Regards Fan Zhiju -Original Message- From: Feng, Bob C Sent: Tuesday, March 5, 2019 5:48 PM To: Fan, ZhijuX ; edk2-devel@lists.01.org Cc: Gao, Liming Subject: RE: [edk2][PATCH] BaseTools:Guid.xref will change after increment build Hi Zhiju, Since you changed a set() to a list, I thi

[edk2] [PATCH] BaseTools:Guid.xref will change after increment build

2019-03-05 Thread Fan, ZhijuX
the order of the data may change if set() is used Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Workspace/DscBuildData.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[edk2] [PATCH V2] BaseTools:Run packagedoc_cli.py to generate doc failed

2019-02-28 Thread Fan, ZhijuX
The reason for this problem is that the file was opened incorrectly. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- .../plugins/EdkPlugins/edk2/model/doxygengen.py| 7 --- 1 file changed, 4

[edk2] [PATCH] BaseTools:Run packagedoc_cli.py to generate doc failed

2019-02-28 Thread Fan, ZhijuX
The reason for this problem is that the file was opened incorrectly. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- .../plugins/EdkPlugins/edk2/model/doxygengen.py| 10 +++--- 1 file changed, 7

[edk2] [PATCH] BaseTools:Some StructurePcd DecValue is redundant.

2019-02-26 Thread Fan, ZhijuX
Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _), then set "SKUID_Defines" to ALL, for FixedAtBuild gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case, its value should get from "Default" SKU, not from "_" SKU, but we does not set value in SKU "_" in dsc, so Test401 should only

[edk2] [PATCH] BaseTools:The BOM character is processed when python reads a file

2019-02-25 Thread Fan, ZhijuX
When python3 reads an XML file it will parse the file in error if the file has a BOM Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py | 3 ++- 1 file changed, 2 insertions(+), 1

[edk2] [PATCH V2] BaseTools:PackageDocumentTools import lib error occurs.

2019-02-24 Thread Fan, ZhijuX
Steps: 1. Download edk2 tree 2. Build BaseTools 3. Go to edk2\BaseTools\Scripts\PackageDocumentTools to run packagedoc_cli.py An error occurs if relative imports are used when running a file alone Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1

[edk2] [PATCH] BaseTools:PackageDocumentTools import lib error occurs.

2019-02-21 Thread Fan, ZhijuX
Steps: 1. Download edk2 tree 2. Build BaseTools 3. Go to edk2\BaseTools\Scripts\PackageDocumentTools to run packagedoc_cli.py An error occurs if relative imports are used when running a file alone Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1

[edk2] [PATCH] BaseTools:Some build generated files content are not ordered on linux

2019-02-20 Thread Fan, ZhijuX
If the WORKSPACE environment variable has been set,The variables that control stable sorting will not be set. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- edksetup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[edk2] [PATCH] BaseTools:Build fail if define [DEPEX] in library inf

2019-02-20 Thread Fan, ZhijuX
When define [DEPEX] in lib inf to build, it will fail and report" gUefiOvmfPkgTokenSpaceGuid.test1 used in [Depex] section should be used as FixedAtBuild type and VOID* datum type in the module." But we define this PCD to FixedAtBuild type and VOID* datum type indeed. DEC: [PcdsFixedAtBuild]

[edk2] [PATCH] BaseTools:Build fail if define [DEPEX] in library inf

2019-02-19 Thread Fan, ZhijuX
When define [DEPEX] in lib inf to build, it will fail and report" gUefiOvmfPkgTokenSpaceGuid.test1 used in [Depex] section should be used as FixedAtBuild type and VOID* datum type in the module." But we define this PCD to FixedAtBuild type and VOID* datum type indeed. DEC: [PcdsFixedAtBuild]

[edk2] [PATCH] BaseTools:Fixed build failure when specifying multiple BUILDTARGET

2019-02-19 Thread Fan, ZhijuX
With Python3, the dict.value() method returns an iterator. If a dictionary is updated while an iterator on its keys is used, a RuntimeError is generated. Converting the iterator to a list() forces a copy of the mutable keys in an immutable list which can be safely iterated. Cc: Bob Feng Cc:

[edk2] [PATCH V3] BaseTools:BaseTools supports to the driver combination.

2019-02-19 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1520 To save the image size without the compression, more than one drivers can be combined into single one. When more than one drivers are combined, their depex will be AND together. Below is the example to combine BootManagerPolicyDxe into

[edk2] [PATCH] BaseTools:PCD value error in structure pcd sku case.

2019-02-18 Thread Fan, ZhijuX
Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _), then set "SKUID_Defines" to ALL, for FixedAtBuild gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case, its value should get from "Default" SKU, not from "_" SKU, but we does not set value in SKU "_" in dsc, so Test401 should only

[edk2] [PATCH] BaseTools:Fix a ECC issue

2019-02-17 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1522 A property error occurred because the property of the function was not defined. a property is now redefined. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan ---

[edk2] [PATCH V2] BaseTools:BaseTools supports to the driver combination.

2019-02-17 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1520 To save the image size without the compression, more than one drivers can be combined into single one. When more than one drivers are combined, their depex will be AND together. Below is the example to combine BootManagerPolicyDxe into

[edk2] [PATCH] BaseTools:BaseTools supports to the driver combination.

2019-02-14 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1520 To save the image size without the compression, more than one drivers can be combined into single one. When more than one drivers are combined, their depex will be AND together. Below is the example to combine BootManagerPolicyDxe into

[edk2] FW: [PATCH] BaseTools:Function application error

2019-02-14 Thread Fan, ZhijuX
-Original Message- From: Carsey, Jaben Sent: Thursday, February 14, 2019 11:31 PM To: Fan, ZhijuX ; edk2-devel@lists.01.org Cc: Gao, Liming Subject: RE: [PATCH] BaseTools:Function application error I am really confused by this patch and how it ever worked. I see that you remove the import

[edk2] [PATCH] BaseTools:Function application error

2019-02-14 Thread Fan, ZhijuX
Error due to incorrect function parameters and attributes FileWrite() The first argument it needs is a list, not a file This patch abandons this function and saves the file independently Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan

[edk2] [PATCH V2] BaseTools: PCD value incorrect in structure pcd sku case.

2019-01-31 Thread Fan, ZhijuX
Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _), then set "SKUID_Defines" to ALL, for FixedAtBuild gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case, its value should get from "Default" SKU, not from "_" SKU, but we does not set value in SKU "_" in dsc, so Test401 should only

[edk2] [PATCH] BaseTools: PCD value incorrect in structure pcd sku case.

2019-01-31 Thread Fan, ZhijuX
Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _), then set "SKUID_Defines" to ALL, for FixedAtBuild gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case, its value should get from "Default" SKU, not from "_" SKU, but we does not set value in SKU "_" in dsc, so Test401 should only

[edk2] [PATCH] BaseTools:StructurePCD value display incorrect in "Not used" section.

2019-01-31 Thread Fan, ZhijuX
StructurePCD value display incorrect in "Not used" section, that the value defined in structure does not show. StructurePCD will not display in "Not Used" section if main structure not define in dsc and pcd not in inf Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution

[edk2] [PATCH] BaseTools:Define Macro in Inf file, the pcdvalue Can't convert

2019-01-25 Thread Fan, ZhijuX
Define Macro in Inf file, the pcdvalue Can't convert in dec: gUefiOvmfPkgGuid.test1|"ddd"|VOID*|0x3c in inf: DEFINE ABC=PATH gUefiOvmfPkgTokenSpaceGuid.test1|$(ABC) Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan ---

[edk2] [PATCH V2] BaseTools: Fix Pcd Array changes build report issue.

2019-01-17 Thread Fan, ZhijuX
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1472 The Pcd Array feature changes the Pcd Default value data structure which is used by build report. This patch is going to update build report to adapt that change. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution

[edk2] [PATCH] BaseTools: Fix Pcd Array changes build report issue.

2019-01-17 Thread Fan, ZhijuX
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1472 The Pcd Array feature changes the Pcd Default value data structure which is used by build report. This patch is going to update build report to adapt that change. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution

[edk2] [PATCH] BaseTools:Evaluation of undefined macros in dsc files

2019-01-15 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=989 doc:If macro that is not defined is used in locations that are not expressions (where the tools would just do macro expansion as in C flags in a [BuildOptions] section), nothing will be emitted. This is in fact not what happens.Instead, the

[edk2] [PATCH] BaseTools:The BuildOptionPcd value is wrong

2019-01-15 Thread Fan, ZhijuX
In GenFds.py, Due to the second assignment, the value is wrong Its value should a list, not a string.and this line is not required Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/GenFds/GenFds.py | 1 - 1

[edk2] [PATCH] BaseTools:build break if the Path contains SingleFile.Ext

2019-01-15 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1325 if SingleFile.Path = "/foo/bar.Sap/yada/source.S" and SingleFile.Ext = ".S". Then key would end up "/foo/bar" instead of "/foo/bar.Sap/yada/source" as intended. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution

[edk2] [PATCH V2] BaseTools:Build fail when PCD use in the [DEPEX] section of INF files

2019-01-15 Thread Fan, ZhijuX
Update _FixedPcdVoidTypeDict to FixedVoidTypePcds '_FixedPcdVoidTypeDict' no longer exists because edk2 version (b23414f6). 'ModuleAutoGen' object has no attribute '_FixedPcdVoidTypeDict'. Build fail when PCD use in the [DEPEX] section of INF files Cc: Bob Feng Cc: Liming Gao Contributed-under:

[edk2] [PATCH] BaseTools:Build fail when PCD use in the [DEPEX] section of INF files

2019-01-14 Thread Fan, ZhijuX
https://vthsd.intel.com/hsd/tiano/tracker/default.aspx?tracker_id=223983 1. Define one fixedatbuild PCD in dec: [PcdsFixedAtBuild] gUefiOvmfPkgTokenSpaceGuid.test1| {0x01, 0x02}|VOID*|0x3c 2. Define this PCD point to a depex GUID in dsc: MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {