From nobody Wed May 8 21:37:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+66584+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66584+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1603693033; cv=none; d=zohomail.com; s=zohoarc; b=YIz1YO5Wsqn6inlBH8Nyhqu5XLs1MAk//RSGw8PZVSCG077S/KdzwnqexCv+WesmdFokC5Y5h706+wKx/6VrrNicKHocdo2YZo677YyAQRtHKLJu3vu+dPIdF2ugLCe5jtbCrLkXcIZRWFsYezLpMdJOF8tN3zoq0q7/7bSh/ds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603693033; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ahG/t4UeSmGkTxnoZrANkeqUvjbeiBqdMsU+oz2AmBg=; b=XBmLXNkfuRw/D2w98BU0gk97X1ijmKGxsqbF2uym5A5lrytJIKiefzH98BgPbv19FFxabjJ7q/VW4Y3SWdOH2xEG4RUIk4eTJxER5QcNpSMdm7cvSw9JkUYCtgS3OCyXjOz25dflUfSy7C0VLWJHLoMfhrClyHZYTxEgQJycJAQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66584+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1603693033334513.6993254799407; Sun, 25 Oct 2020 23:17:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id b7ECYY1788612xVI2Nc6VWEv; Sun, 25 Oct 2020 23:17:13 -0700 X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web11.9127.1603693030843189117 for ; Sun, 25 Oct 2020 23:17:12 -0700 X-Received: from LAPTOP2AECFQIA ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Mon, 26 Oct 2020 14:17:00 +0800 X-WM-Sender: fengyunhua@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: fengyunhua@byosoft.com.cn From: "fengyunhua" To: , Cc: "'Bob Feng'" , "'Liming Gao'" , "'Yuwei Chen'" References: <20201023030142.2015-1-mingyuex.liang@intel.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBCYXNlVG9vbHM6IHJlcGxhY2UgYXJyYXkuZnJvbXN0cmluZyBNZXRob2QgZm9yIHN1cHBvcnRzIHB5LTIgYW5kIHB5LTMu?= Date: Mon, 26 Oct 2020 14:17:05 +0800 Message-ID: <000101d6ab5f$a0930200$e1b90600$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQK5Qvxi+ysv896Io6SpqbivPkS6aqfkLOrwgAAK6IA= Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,fengyunhua@byosoft.com.cn X-Gm-Message-State: x60Ibjm9qDDnd5DtucVL6EtPx1787277AA= Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603693033; bh=6BUY/bFnKJAwusWGsiBKBm/ZCqNc02G8l6NqNxaErXc=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=HGJihuTIPEDl1tiQN/WlfczBMsXbjQPBhNrVNdCi3faimVkTRG23TX5rCR8ScrpNxQj hNU5DiSDaYrDHQhFLNgUIh+LG6qQCJ2kO3+pqIuquZ1g5NkRcEHHTm1CdHxv6fXFjUbZ0 4+MjHichv7Ozd41J8ZB+HFa4uvMuAojBDKE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" This issue I have sent a patch https://edk2.groups.io/g/devel/message/66174 -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- =E5=8F=91=E4=BB=B6=E4=BA=BA: fengyunhua =20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8826=E6=97=A5 1= 3:40 =E6=94=B6=E4=BB=B6=E4=BA=BA: 'devel@edk2.groups.io' ;= 'mingyuex.liang@intel.com' =E6=8A=84=E9=80=81: 'Bob Feng' ; 'Liming Gao' ; 'Yuwei Chen' =E4=B8=BB=E9=A2=98: =E5=9B=9E=E5=A4=8D: [edk2-devel] [PATCH] BaseTools: rep= lace array.fromstring Method for supports py-2 and py-3. Array.tostring also should replace -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+66563+5049190+8953120@groups.io <= bounce+27952+66563+5049190+8953120@groups.io> =E4=BB=A3=E8=A1=A8 mliang2x =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B410=E6=9C=8823=E6=97=A5 1= 1:02 =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E6=8A=84=E9=80=81: Mingyue Liang ; Bob Feng ; Liming Gao ; Yuwei Chen =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH] BaseTools: replace array.fromstrin= g Method for supports py-2 and py-3. Because after Python 3.2, array.fromstring method is renamed frombytes, so it needs to be modified to support python2 and python3 methods. Signed-off-by: Mingyue Liang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/Python/Eot/EotMain.py | 8 ++++---- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/Eot/EotMain.py b/BaseTools/Source/Pyth= on/Eot/EotMain.py index 791fcdfeae..2ff68054e6 100644 --- a/BaseTools/Source/Python/Eot/EotMain.py +++ b/BaseTools/Source/Python/Eot/EotMain.py @@ -152,11 +152,11 @@ class CompressedImage(Image): try: TmpData =3D DeCompress('Efi', self[self._HEADER_SIZE_:]) DecData =3D array('B') - DecData.fromstring(TmpData) + list(map(lambda str: DecData.fromlist([ord(str), 0]), TmpData)) except: TmpData =3D DeCompress('Framework', self[self._HEADER_SIZE_:]) DecData =3D array('B') - DecData.fromstring(TmpData) + list(map(lambda str: DecData.fromlist([ord(str), 0]), TmpData)) =20 SectionList =3D [] Offset =3D 0 @@ -738,7 +738,7 @@ class GuidDefinedImage(Image): Offset =3D self.DataOffset - 4 TmpData =3D DeCompress('Framework', self[self.Offset:]) DecData =3D array('B') - DecData.fromstring(TmpData) + list(map(lambda str: DecData.fromlist([ord(str), 0]), TmpD= ata)) Offset =3D 0 while Offset < len(DecData): Sec =3D Section() @@ -759,7 +759,7 @@ class GuidDefinedImage(Image): =20 TmpData =3D DeCompress('Lzma', self[self.Offset:]) DecData =3D array('B') - DecData.fromstring(TmpData) + list(map(lambda str: DecData.fromlist([ord(str), 0]), TmpD= ata)) Offset =3D 0 while Offset < len(DecData): Sec =3D Section() diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseT= ools/Source/Python/GenFds/GenFdsGlobalVariable.py index dc1727c466..411af80c2b 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -463,7 +463,7 @@ class GenFdsGlobalVariable: GenFdsGlobalVariable.SecCmdList.append(' '.join(Cmd).s= trip()) else: SectionData =3D array('B', [0, 0, 0, 0]) - SectionData.fromstring(Ui.encode("utf_16_le")) + list(map(lambda str: SectionData.fromlist([ord(str), 0]), = Ui)) SectionData.append(0) SectionData.append(0) Len =3D len(SectionData) --=20 2.28.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66584): https://edk2.groups.io/g/devel/message/66584 Mute This Topic: https://groups.io/mt/77809328/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-