[edk2] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-22 Thread Gary Lin
s BmMatchPartitionDevicePathNode() to iterate all nested partitions so that the above boot option could work. v2 - Simplify the node matching logic Cc: Ruiyu Ni Cc: Star Zeng Cc: Jian J Wang Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin --- .../L

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-22 Thread Gary Lin
On Wed, Jan 23, 2019 at 03:49:16AM +, Ni, Ray wrote: > > > > -Original Message- > > From: Ni, Ray > > Sent: Wednesday, January 23, 2019 11:48 AM > > To: 'Gary Lin' > > Cc: edk2-devel@lists.01.org; Zeng, Star ; Wang, Jian J > >

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-22 Thread Gary Lin
ad of using a > loop. In this new way, you might be able to save some code. Since my targets are the partition nodes after a partition, loop brings a bit better performance by skipping the non-partition node check and saves the overhead of function call. If you prefer recursive call, I'll mo

Re: [edk2] [patch] MdePkg/BasePeCoffLib: Correct the address of RelocBaseEnd

2019-01-18 Thread Gary Lin
RelocBaseEnd. > > Cc: Michael D Kinney > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Dandan Bi Thanks for the patch. Tested-by: Gary Lin > --- > MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 2 +- > 1 file changed

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-15 Thread Gary Lin
On Tue, Jan 15, 2019 at 12:58:10PM +0100, Laszlo Ersek wrote: > On 01/15/19 10:45, Gary Lin wrote: > > In some cases, such as MD RAID1 in Linux, the bootloader may be in a > > nested EFI system partition partition. For example, sda1 and sdb1 are > > combined as md0 and the f

[edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Match the nested partitions

2019-01-15 Thread Gary Lin
s BmMatchPartitionDevicePathNode() to iterate all nested partitions so that the above boot option could work. Cc: Ruiyu Ni Cc: Star Zeng Cc: Jian J Wang Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin --- .../Library/UefiBootManagerLib/BmBoot.c

Re: [edk2] [RFC] Edk2 BaseTools Python3 Migration Update

2019-01-02 Thread Gary Lin
n the latest git branch. Thanks! Gary Lin > Thanks > Liming > >-Original Message- > >From: Gary Lin [mailto:g...@suse.com] > >Sent: Friday, December 28, 2018 6:40 PM > >To: Gao, Liming > >Cc: edk2-devel@lists.01.org; Kinney, Michael D > >; Lasz

Re: [edk2] [RFC] Edk2 BaseTools Python3 Migration Update

2018-12-28 Thread Gary Lin
ls: Update windows and linux run scripts file to use Python3 Cheers, Gary Lin > But, we have no enough resource to fully verify Python2 and Python3 both. > We will focus on Python3 validation. If anyone can help verify Python2, it > will be great. And, if you meet with the issue on Pyth

Re: [edk2] [PATCH 1/1] MdePkg ACPI: fix the typos in Acpi61.h and Acpi62.h

2018-11-26 Thread Gary Lin
On Tue, Nov 20, 2018 at 02:37:44PM +, Gao, Liming wrote: > Reviewed-by: Liming Gao > Hi Liming, Would you mind to help to push to fix into the git repo? Thanks, Gary Lin > > -Original Message- > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Beh

[edk2] [PATCH 1/1] MdePkg ACPI: fix the typos in Acpi61.h and Acpi62.h

2018-11-19 Thread Gary Lin
The GUID for VIRTUAL_CD_REGION_PERSISTENT was using the closing square bracket mistakenly. Cc: Michael D Kinney Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin --- MdePkg/Include/IndustryStandard/Acpi61.h | 2 +- MdePkg/Include/IndustryStandard

[edk2] [PATCH 1/1] Vlv2TbltDevicePkg/SmBiosMiscDxe: fix the comparison of characters

2018-10-30 Thread Gary Lin
Dereference MatchLang before comparing it with a character. Cc: David Wei Cc: Mang Guo Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin --- .../SmBiosMiscDxe/MiscNumberOfInstallableLanguagesFunction.c| 2 +- 1 file changed, 1 insertion

Re: [edk2] [PATCH] MdeModulePkg/RegularExpressionDxe:omit unused variable

2018-10-08 Thread Gary Lin
On Mon, Oct 08, 2018 at 03:56:48PM +0800, Dongao Guo wrote: > > comment unused variable to avoid warning,and modify inf build option. > Why not just remove the variables altogether instead of commenting them out? Is it on purpose? Gary Lin > Cc: Liming Gao > Contributed-u

[edk2] [PATCH] BaseTools/edksetup.sh: Handle the return value from grep

2018-10-01 Thread Gary Lin
dling some cases, e.g. "python3:". This commit adds `|| true` to the grep command to make sure the command never returns 1 in any condition. [NOTE: For the python3 branch] Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin Cc: Liming Gao Cc: Yonghong Zhu

Re: [edk2] [Patch] BaseTools Python: Migrate Python27 to Python36

2018-10-01 Thread Gary Lin
should I send the patch? to the edk2-devel mailinglist directly? or a pull request in github? Thanks, Gary Lin > Current we still in doing some validation for this migration, and not finish > the update for UPT, ECC, EOT, Tests those tools and scripts. > We already did following on th

[edk2] [PATCH 1/1] OvmfPkg: link Sha384 and Sha512 support into Tcg2Pei and Tcg2Dxe

2018-08-14 Thread Gary Lin
Sha384 and Sha512 were added to HashInstanceLib recently. To make them available in Tcg2Pei and Tcg2Dxe, we have to link both libraries. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Laszlo Ersek Cc: Marc-André Lureau Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin

Re: [edk2] [PATCH 1/1] OvmfPkg: Resolve HashInstanceLibSha384 and HashInstanceLibSha512

2018-08-14 Thread Gary Lin
On Tue, Aug 14, 2018 at 06:37:51PM +0200, Laszlo Ersek wrote: > Hi Gary, > > (+ Marc-André) > > On 08/14/18 09:36, Gary Lin wrote: > > Sha384 and Sha512 were added to HashInstanceLib recently. Resolve those > > two libraries to enable SHA384 and SHA512 support in TPM.

[edk2] [PATCH 1/1] OvmfPkg: Resolve HashInstanceLibSha384 and HashInstanceLibSha512

2018-08-14 Thread Gary Lin
Sha384 and Sha512 were added to HashInstanceLib recently. Resolve those two libraries to enable SHA384 and SHA512 support in TPM. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin --- OvmfPkg/OvmfPkgIa32.dsc

[edk2] [PATCH v2 16/16] BaseTools: Use absolute import in Scripts

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py | 3 ++- BaseTools/Sc

[edk2] [PATCH v2 15/16] BaseTools: Use absolute import in Workspace

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Workspace/DscBuildData.py | 9 + BaseTools/Source/Python/Work

[edk2] [PATCH v2 14/16] BaseTools: Use absolute import in UPT

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/UPT/Library/Parsing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[edk2] [PATCH v2 13/16] BaseTools: Use absolute import in Table

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Table/TableDataModel.py | 3 ++- BaseTools/Source/Python/Table/TableDec.py

[edk2] [PATCH v2 12/16] BaseTools: Use absolute import in Eot

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Eot/CParser.py | 5 +++-- BaseTools/Source/Python/Eot/CodeFragmentCollect

[edk2] [PATCH v2 11/16] BaseTools: Use absolute import in Ecc

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Ecc/CParser.py | 5 ++-- BaseTools/Source/Python/Ecc/Che

[edk2] [PATCH v2 09/16] BaseTools: Use absolute import in Common

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/Database.py | 8 BaseTools/Source/Python/Common/EdkLogg

[edk2] [PATCH v2 05/16] BaseTools: Move ImageBinDict to GenFdsGlobalVariable.py

2018-07-13 Thread Gary Lin
* GenFds.FdfParser => GenFds.Fd => GenFds.GenFds => GenFds.FdfParser * GenFds.FdfParser => GenFds.Fd => GenFds.Fv => GenFds.GenFds => GenFds.FdfParser Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- B

[edk2] [PATCH v2 10/16] BaseTools: Treat Ecc.py as a python module

2018-07-13 Thread Gary Lin
Since Ecc.py import modules from its own directory, add "-m" to the python parameters so that they can import its own modules after adopting absolute import. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Signed-off-by

[edk2] [PATCH v2 06/16] BaseTools: Use absolute import in AutoGen

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/AutoGen/AutoGen.py| 17 + BaseTools/Source/Python/AutoGen/Ge

[edk2] [PATCH v2 08/16] BaseTools: Use absolute import in BPDG

2018-07-13 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/BPDG/BPDG.py | 5 +++-- BaseTools/Source/Python/BPDG/GenVpd.py | 3 ++- 2 files chang

[edk2] [PATCH v2 01/16] BaseTools: Treat GenFds.py as a python module

2018-07-13 Thread Gary Lin
Since GenFds.py import modules from its own directory, add "-m" to the python parameters so that they can import its own modules after adopting absolute import. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin ---

[edk2] [PATCH v2 02/16] BaseTools: Use absolute import in GenFds

2018-07-13 Thread Gary Lin
GenFds.OptionRom => GenFds.GenFds => GenFds.FdfParser Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/GenFds/AprioriSection.py | 5 +- BaseTools/Source/Python/GenFds/Capsule.py

[edk2] [PATCH v2 07/16] BaseTools: Treat BPDG.py as a python module

2018-07-13 Thread Gary Lin
Since BPDG.py import modules from its own directory, add "-m" to the python parameters so that they can import its own modules after adopting absolute import. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin ---

[edk2] [PATCH v2 03/16] BaseTools: Move OverrideAttribs to OptRomInfStatement.py

2018-07-13 Thread Gary Lin
Move "class OverrideAttribs" to OptRomInfStatement.py to remove "import OptionRom" which may form a circular import: GenFds.OptionRom => GenFds.OptRomInfStatement => GenFds.OptionRom Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Ga

[edk2] [PATCH v2 00/16] BaseTools: Adopt absolute import

2018-07-13 Thread Gary Lin
tor the code in the follow-up patches to remove circular import completely. The patch set is also available in my github branch: https://github.com/lcp/edk2/tree/python3-absolute-import-v2 Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by:

[edk2] [PATCH v2 04/16] BaseTools: Move FindExtendTool to GenFdsGlobalVariable.py

2018-07-13 Thread Gary Lin
TAB_GUID => DataType.TAB_GUID TAB_TOD_DEFINES_TARGET => DataType.TAB_TOD_DEFINES_TARGET TAB_TOD_DEFINES_TOOL_CHAIN_TAG => DataType.TAB_TOD_DEFINES_TOOL_CHAIN_TAG TAB_TOD_DEFINES_TARGET_ARCH => DataType.TAB_TOD_DEFINES_TARGET_ARCH Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zh

Re: [edk2] [PATCH 07/14] BaseTools: Use absolute import in BPDG

2018-07-11 Thread Gary Lin
ueError: Attempted relative import in non-package > Hmmm, so BPDG also uses the module in its own directory. I'll modify BPDG in BinWrappers as GenFds. Thanks, Gary Lin > Best Regards, > Zhu Yonghong > > > -Original Message- > From: Gary Lin [mailto:g...@suse

[edk2] [PATCH 09/14] BaseTools: Use absolute import in ECC

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Ecc/CParser.py | 5 ++-- BaseTools/Source/Python/Ecc/Che

[edk2] [PATCH 13/14] BaseTools: Use absolute import in Workspace

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Workspace/DscBuildData.py | 9 + BaseTools/Source/Python/Work

[edk2] [PATCH 08/14] BaseTools: Use absolute import in Common

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/Database.py | 8 BaseTools/Source/Python/Common/EdkLogg

[edk2] [PATCH 11/14] BaseTools: Use absolute import in Table

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Table/TableDataModel.py | 3 ++- BaseTools/Source/Python/Table/TableDec.py

[edk2] [PATCH 10/14] BaseTools: Use absolute import in Eot

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Eot/CParser.py | 5 +++-- BaseTools/Source/Python/Eot/CodeFragmentCollect

[edk2] [PATCH 07/14] BaseTools: Use absolute import in BPDG

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/BPDG/BPDG.py | 5 +++-- BaseTools/Source/Python/BPDG/GenVpd.py | 3 ++- 2 files chang

[edk2] [PATCH 12/14] BaseTools: Use absolute import in UPT

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/UPT/Library/Parsing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[edk2] [PATCH 14/14] BaseTools: Use absolute import in Scripts

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py | 3 ++- BaseTools/Sc

[edk2] [PATCH 06/14] BaseTools: Use absolute import in AutoGen

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/AutoGen/AutoGen.py| 17 + BaseTools/Source/Python/AutoGen/Ge

[edk2] [PATCH 05/14] BaseTools: Move ImageBinDict to GenFdsGlobalVariable.py

2018-07-09 Thread Gary Lin
* GenFds.FdfParser => GenFds.Fd => GenFds.GenFds => GenFds.FdfParser * GenFds.FdfParser => GenFds.Fd => GenFds.Fv => GenFds.GenFds => GenFds.FdfParser Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- B

[edk2] [PATCH 02/14] BaseTools: Use absolute import in GenFds

2018-07-09 Thread Gary Lin
GenFds.OptionRom => GenFds.GenFds => GenFds.FdfParser Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/GenFds/AprioriSection.py | 5 +- BaseTools/Source/Python/GenFds/Capsule.py

[edk2] [PATCH 03/14] BaseTools: Move OverrideAttribs to OptRomInfStatement.py

2018-07-09 Thread Gary Lin
Move "class OverrideAttribs" to OptRomInfStatement.py to remove "import OptionRom" which may form a circular import: GenFds.OptionRom => GenFds.OptRomInfStatement => GenFds.OptionRom Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Ga

[edk2] [PATCH 04/14] BaseTools: Move FindExtendTool to GenFdsGlobalVariable.py

2018-07-09 Thread Gary Lin
TAB_GUID => DataType.TAB_GUID TAB_TOD_DEFINES_TARGET => DataType.TAB_TOD_DEFINES_TARGET TAB_TOD_DEFINES_TOOL_CHAIN_TAG => DataType.TAB_TOD_DEFINES_TOOL_CHAIN_TAG TAB_TOD_DEFINES_TARGET_ARCH => DataType.TAB_TOD_DEFINES_TARGET_ARCH Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zh

[edk2] [PATCH 01/14] BaseTools: Treat GenFds.py as a python module

2018-07-09 Thread Gary Lin
Since GenFds.py import modules from its own directory, add "-m" to the python parameters so that they can import its own modules after adopting absolute import. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin ---

[edk2] [PATCH 00/14] BaseTools: Adopt absolute import

2018-07-09 Thread Gary Lin
also available in my github branch: https://github.com/lcp/edk2/tree/python3-absolute-import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Gary Lin (14): BaseTools: Treat GenFds.py as a python module BaseTools: Use abs

Re: [edk2] [PATCH 3/3] BaseTools: Read the env variable PYTHON_DEFAULT

2018-07-05 Thread Gary Lin
the python3 migration:) Thanks, Gary Lin > Best Regards, > Zhu Yonghong > > > -Original Message- > From: Gary Lin [mailto:g...@suse.com] > Sent: Wednesday, June 27, 2018 6:08 PM > To: edk2-devel@lists.01.org > Cc: Zhu, Yonghong ; Gao, Liming > Subjec

Re: [edk2] [Patch v3] NetworkPkg/HttpDxe: Fix the bug when parsing HTTP(S) message body.

2018-07-03 Thread Gary Lin
so as to > confirm whether there is the next message header. But it doesn't record the > parsing message data/length correctly. > > This patch is refine the parsing logic so as to fix the potential failure. > > Cc: Ye Ting > Cc: Fu Siyuan > Cc: Gary Lin > Contr

Re: [edk2] [Patch v2] NetworkPkg/HttpDxe: Fix the bug when parsing HTTP(S) message body.

2018-07-02 Thread Gary Lin
first, then I will > try that. > Ah, ok. I'll send you the files privately. > > bootx64.efi: 1208528 bytes > > grub.efi: 1057792 bytes > > BTW, the issue only happened after applying this patches? > Yes. Without the patch, shim can download grub2 s

Re: [edk2] [Patch v2] NetworkPkg/HttpDxe: Fix the bug when parsing HTTP(S) message body.

2018-07-02 Thread Gary Lin
of bootx64.efi and grub.efi: bootx64.efi: 1208528 bytes grub.efi: 1057792 bytes Gary Lin > Thanks, > Jiaxin > > > > > > > -Original Message- > > > From: Gary Lin [mailto:g...@suse.com] > > > Sent: Monday, July 2, 2018 12:17 PM > &

Re: [edk2] [Patch v2] NetworkPkg/HttpDxe: Fix the bug when parsing HTTP(S) message body.

2018-07-01 Thread Gary Lin
the OVMF log: TcpInput: Discard a packet TcpSendIpPacket: No appropriate IpSender. This only happened with HTTPS. If I replace the HTTPS URL in dhcpd.conf with the HTTP URL, it works as expected. Gary Lin > Cc: Ye Ting > Cc: Fu Siyuan > Contributed-under: TianoCore Contribution

[edk2] [PATCH 1/3] BaseTools: Remove the old python "not-equal" in DscBuildData.py

2018-06-27 Thread Gary Lin
Replace "<>" with "!=" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- 1 file changed, 1 insertion(+), 1

[edk2] [PATCH 2/3] BaseTools: Unify long and int in Expression.py

2018-06-27 Thread Gary Lin
int' in python3. We can remove the workaround after moving to python3 completely. * long() is replaced with int() since int() returns a long when need. (*) https://www.python.org/dev/peps/pep-0237/ Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming

[edk2] [PATCH 0/3] python3 follow-up patches for BaseTools

2018-06-27 Thread Gary Lin
Please note that BaseTools is still not ready, so any error from python3 interpreter is expected. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Gary Lin (3): BaseTools: Remove the old python "not-equal" in DscBuildData.py

[edk2] [PATCH 3/3] BaseTools: Read the env variable PYTHON_DEFAULT

2018-06-27 Thread Gary Lin
./OvmfPkg/build.sh Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/BinWrappers/PosixLike/BPDG | 6 +- BaseTools/BinWrappers/PosixLike/Ecc | 6 +- BaseTools/BinWrappers

Re: [edk2] [Patch 2/2] SecurityPkg: Tpm2DeviceLib: Enable CapCRBIdleBypass support

2018-06-27 Thread Gary Lin
faceCrb && PcdGet8(PcdCRBIdleByPass) == 0xFF) { ^~~ PtpInterface I assume you mean Tpm2PtpInterfaceCrb? Cheers, Gary Lin > +IdleByPass = Tpm2GetIdleByPass((VOID *) (UI

Re: [edk2] [PATCH v4 00/20] BaseTools: One step toward python3

2018-06-25 Thread Gary Lin
On Mon, Jun 25, 2018 at 06:31:23PM +0800, Gary Lin wrote: > v4 changes: v4 is rebased to 3b03b5e990f8bb347dfdb91926d8ef015d0b607e > - Remove the range() patch since it needs python-future > - Remove the patch to unify long and int since it caused error in > windows. >

[edk2] [PATCH v4 13/13] BaseTools: Replace StringIO.StringIO with io.BytesIO

2018-06-25 Thread Gary Lin
Replace StringIO.StringIO with io.BytesIO to be compatible with python3. This commit also removes "import StringIO" from those python scripts that don't really use it. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin

[edk2] [PATCH v4 12/13] BaseTools: Fix old python2 idioms

2018-06-25 Thread Gary Lin
"while 1:" into "while True:". * Change both v = list(EXPR) v.sort() foo(v) and the more general v = EXPR v.sort() foo(v) into v = sorted(EXPR) foo(v) Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Ga

[edk2] [PATCH v4 08/13] BaseTools: Remove types.TypeType

2018-06-25 Thread Gary Lin
"types.TypeType" is now an alias of the built-in "type" and is not compatible with python 3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Tests/TestTools.py | 3 +-- 1 file changed, 1 inser

[edk2] [PATCH v4 09/13] BaseTools: Refactor python raise statement

2018-06-25 Thread Gary Lin
Make "raise" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/gcc/mingw-gcc-build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/gcc

[edk2] [PATCH v4 11/13] BaseTools: Migrate to the new octal literal

2018-06-25 Thread Gary Lin
Change the octal literals according to PEP3127 https://www.python.org/dev/peps/pep-3127/ Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/LongFilePathOs.py | 2 +- BaseTools/Source/Python/UPT

[edk2] [PATCH v4 00/20] BaseTools: One step toward python3

2018-06-25 Thread Gary Lin
uture.org/automatic_conversion.html#stage-1-safe-fixes Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Gary Lin (13): BaseTools: Fix a typo in ini.py BaseTools: Refactor python except statements BaseTools: Refactor python pr

[edk2] [PATCH v4 02/13] BaseTools: Refactor python except statements

2018-06-25 Thread Gary Lin
Convert "except ... ," to "except ... as" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_except" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Script

[edk2] [PATCH v4 06/13] BaseTools: Remove the deprecated hash_key()

2018-06-25 Thread Gary Lin
Replace "has_key()" with "in" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_has_key" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTool

[edk2] [PATCH v4 04/13] BaseTools: Remove the old python "not-equal"

2018-06-25 Thread Gary Lin
Replace "<>" with "!=" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- BaseT

[edk2] [PATCH v4 05/13] BaseTools: Remove tuple parameter in python scripts

2018-06-25 Thread Gary Lin
According to PEP3113, tuple parameter is removed in python 3. (PEP3113: https://www.python.org/dev/peps/pep-3113/) Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/VpdInfoFile.py | 3 ++- 1 file

[edk2] [PATCH v4 01/13] BaseTools: Fix a typo in ini.py

2018-06-25 Thread Gary Lin
"if mis not None:" => "if m is not None:" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Jaben Carsey Cc: Yonghong Zhu Cc: Liming Gao Reviewed-by: Jaben Carsey Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel

[edk2] [PATCH v4 07/13] BaseTools: Replace StandardError with Expression

2018-06-25 Thread Gary Lin
StandardError has been removed from python 3. Replace it with Exception. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/UPT/UPT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[edk2] [PATCH v4 03/13] BaseTools: Refactor python print statements

2018-06-25 Thread Gary Lin
Refactor print statements to be compatible with python 3. Based on "futurize -f libfuturize.fixes.fix_print_with_import" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_

Re: [edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions

2018-06-24 Thread Gary Lin
On Mon, Jun 25, 2018 at 05:58:42AM +, Zhu, Yonghong wrote: > You're correct, it is Patch 13 cause the 'long' type issue. > Thanks for the confirmation! I'll revert the patch in the next version. Gary Lin > Best Regards, > Zhu Yonghong > > > --

Re: [edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions

2018-06-24 Thread Gary Lin
reproduce the error, would you mind to bisect through patch 1~13 if reverting patch 13 doesn't work? Thanks, Gary Lin > Best Regards, > Zhu Yonghong > > > -Original Message- > From: Gary Lin [mailto:g...@suse.com] > Sent: Friday, June 22, 2018 5:48 PM > T

Re: [edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions

2018-06-22 Thread Gary Lin
ks, Gary Lin > Best Regards, > Zhu Yonghong > > > -Original Message- > From: Zhu, Yonghong > Sent: Friday, June 22, 2018 5:22 PM > To: 'Gary Lin' > Cc: edk2-devel@lists.01.org; Gao, Liming ; Zhu, > Yonghong > Subject: RE: [edk2] [PATCH v3

Re: [edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions

2018-06-22 Thread Gary Lin
#x27; or '/m' though. The goal is treat build and GenFds as modules to avoid the error you saw. Thanks, Gary Lin > Best Regards, > Zhu Yonghong > > > -Original Message- > From: Gary Lin [mailto:g...@suse.com] > Sent: Friday, June 22, 2018 4:46 PM &g

Re: [edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions

2018-06-22 Thread Gary Lin
On Fri, Jun 22, 2018 at 04:21:23PM +0800, Gary Lin wrote: > On Fri, Jun 22, 2018 at 05:29:21AM +, Zhu, Yonghong wrote: > > Hi Gary, > > > > Patch 03 used some Tab characters, Patch 17 has some Trailing whitespace. > > You can use the BaseTools\Scripts\PatchC

Re: [edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions

2018-06-22 Thread Gary Lin
uild OVMF platform, it directly report error: > from .BuildReport import BuildReport > ValueError: Attempted relative import in non-package > I didn't see this in my system. Will investigate what's wrong. Thanks, Gary Lin > Best Regards, > Zhu Yonghong > >

Re: [edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions

2018-06-21 Thread Gary Lin
ly from python-future. I'll revert this patch and post a new patchset. BTW, would you might review the first patch? It's just a typo fix and I just caught it while running the futurize script, so the patch is actually independent from this patch series. Thanks, Gary Lin > Best

Re: [edk2] [PATCH v3 02/20] BaseTools: Refactor python except statements

2018-06-20 Thread Gary Lin
On Thu, Jun 21, 2018 at 12:43:28PM +0800, Gary Lin wrote: > Convert "except ... ," to "except ... as" to be compatible with python3. > Based on "futurize -f lib2to3.fixes.fix_except" > > Contributed-under: TianoCore Contribution Agreement 1.1 > Cc: Yo

[edk2] [PATCH v3 18/20] BaseTools: Move OverrideAttribs to OptRomInfStatement.py

2018-06-20 Thread Gary Lin
Move "class OverrideAttribs" to OptRomInfStatement.py to remove "import OptionRom" which may form a circular import: GenFds.OptionRom => GenFds.OptRomInfStatement => GenFds.OptionRom Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Ga

[edk2] [PATCH v3 19/20] BaseTools: Move FindExtendTool to GenFdsGlobalVariable.py

2018-06-20 Thread Gary Lin
TAB_GUID => DataType.TAB_GUID TAB_TOD_DEFINES_TARGET => DataType.TAB_TOD_DEFINES_TARGET TAB_TOD_DEFINES_TOOL_CHAIN_TAG => DataType.TAB_TOD_DEFINES_TOOL_CHAIN_TAG TAB_TOD_DEFINES_TARGET_ARCH => DataType.TAB_TOD_DEFINES_TARGET_ARCH Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zh

[edk2] [PATCH v3 13/20] BaseTools: Unify long int and int in python scripts

2018-06-20 Thread Gary Lin
According to PEP237, long int and int are unified. https://www.python.org/dev/peps/pep-0237/ Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/Expression.py | 3 +-- 1 file changed, 1 insertion

[edk2] [PATCH v3 17/20] BaseTools: Adopt absolute import for python scripts

2018-06-20 Thread Gary Lin
GenFds.OptionRom => GenFds.GenFds => GenFds.FdfParser Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/packagedoc_cli.py | 5 +- BaseTools/Scripts/PackageDo

[edk2] [PATCH v3 16/20] BaseTools: Treat GenFds.py and build.py as python modules

2018-06-20 Thread Gary Lin
Since GenFds.py and build.py import modules from its own directory, add "-m" to the python parameters so that they can import its own modules. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/BinWrappers

[edk2] [PATCH v3 14/20] BaseTools: Fix old python2 idioms

2018-06-20 Thread Gary Lin
"while 1:" into "while True:". * Change both v = list(EXPR) v.sort() foo(v) and the more general v = EXPR v.sort() foo(v) into v = sorted(EXPR) foo(v) Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Ga

[edk2] [PATCH v3 20/20] BaseTools: Move ImageBinDict to GenFdsGlobalVariable.py

2018-06-20 Thread Gary Lin
* GenFds.FdfParser => GenFds.Fd => GenFds.GenFds => GenFds.FdfParser * GenFds.FdfParser => GenFds.Fd => GenFds.Fv => GenFds.GenFds => GenFds.FdfParser Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- B

[edk2] [PATCH v3 12/20] BaseTools: Migrate to the new octal literal

2018-06-20 Thread Gary Lin
Change the octal literals according to PEP3127 https://www.python.org/dev/peps/pep-3127/ Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/LongFilePathOs.py | 2 +- BaseTools/Source/Python/UPT

[edk2] [PATCH v3 10/20] BaseTools: Refactor python raise statement

2018-06-20 Thread Gary Lin
Make "raise" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/gcc/mingw-gcc-build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/gcc

[edk2] [PATCH v3 15/20] BaseTools: Replace StringIO.StringIO with io.BytesIO

2018-06-20 Thread Gary Lin
Replace StringIO.StringIO with io.BytesIO to be compatible with python3. This commit also removes "import StringIO" from those python scripts that don't really use it. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin

[edk2] [PATCH v3 02/20] BaseTools: Refactor python except statements

2018-06-20 Thread Gary Lin
Convert "except ... ," to "except ... as" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_except" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Script

[edk2] [PATCH v3 00/20] BaseTools: One step toward python3

2018-06-20 Thread Gary Lin
ror so far. (*) http://python-future.org/automatic_conversion.html#stage-1-safe-fixes Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Gary Lin (20): BaseTools: Fix a typo in ini.py BaseTools: Refactor python except statements

[edk2] [PATCH v3 04/20] BaseTools: Remove the old python "not-equal"

2018-06-20 Thread Gary Lin
Replace "<>" with "!=" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- BaseT

[edk2] [PATCH v3 08/20] BaseTools: Replace StandardError with Expression

2018-06-20 Thread Gary Lin
StandardError has been removed from python 3. Replace it with Exception. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/UPT/UPT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[edk2] [PATCH v3 07/20] BaseTools: Remove the deprecated hash_key()

2018-06-20 Thread Gary Lin
Replace "has_key()" with "in" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_has_key" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTool

[edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions

2018-06-20 Thread Gary Lin
Replace xrange() and range() with the newer range() function Based on "futurize -f libfuturize.fixes.fix_xrange_with_import" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/B

[edk2] [PATCH v3 01/20] BaseTools: Fix a typo in ini.py

2018-06-20 Thread Gary Lin
"if mis not None:" => "if m is not None:" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Jaben Carsey Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/ini.py | 2 +- 1 file cha

[edk2] [PATCH v3 09/20] BaseTools: Remove types.TypeType

2018-06-20 Thread Gary Lin
"types.TypeType" is now an alias of the built-in "type" and is not compatible with python 3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Tests/TestTools.py | 3 +-- 1 file changed, 1 inser

  1   2   3   4   >