From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 205CB9415D9 for ; Wed, 30 Aug 2023 08:43:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=91brdnNQW7VeOt/k4xGbB0xJxP5PjblFH90Y2wBVwEQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20140610; t=1693385006; v=1; b=ScB37eB8N/i45RSpmajemvuAVDQ7SOepQHgCc4UbavNcF5/lWAqcrQb5E8vVEiurhM/yn2dd VIzE4IYE0nZ+f+t/3xfMZaHfs+SC884qbjuj9g9hOdaVH7rANxudjON2FTZvPJJpSABiV6h1D/P l4Wbw8IDqPZOYhNIj364Sd+M= X-Received: by 127.0.0.2 with SMTP id KQmyYY7687511x2h9I3xQH4v; Wed, 30 Aug 2023 01:43:26 -0700 X-Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web10.9656.1693385004237589246 for ; Wed, 30 Aug 2023 01:43:25 -0700 X-Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id ACF3CDDA7F9 for ; Wed, 30 Aug 2023 16:43:20 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id A8AACDDA7F4 for ; Wed, 30 Aug 2023 16:43:20 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id B0076DDA7E6 for ; Wed, 30 Aug 2023 16:43:17 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Wed, 30 Aug 2023 16:43:01 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , , "'Chen, Christine'" Cc: "'Rebecca Cran'" References: <20230629033420.872-1-yuwei.chen@intel.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoIFYyIDEvNF0gQmFzZVRvb2xzOiBmaXhpbmcgRk1NVCBTaHJpbmtGdiBpc3N1ZQ==?= Date: Wed, 30 Aug 2023 16:43:03 +0800 Message-ID: <046601d9db1d$fdb03b60$f910b220$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQJ/u0azJS3m3Dm2ofnHecjJWqzL7gEejPMNrq3P6aA= Precedence: Bulk List-Subscribe: List-Help: 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,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hxhA2GJpzFw1suC1nyXhuDCwx7686176AA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ScB37eB8; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Christine: I have no comments for this patch set. Reviewed-by: Liming Gao Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED Bob Feng > =B7=A2=CB=CD=CA=B1=BC=E4: 2023=C4=EA6=D4=C229=C8=D5 14:54 > =CA=D5=BC=FE=C8=CB: Chen, Christine ; devel@edk2.gr= oups.io > =B3=AD=CB=CD: Rebecca Cran ; Gao, Liming > > =D6=F7=CC=E2: Re: [edk2-devel] [Patch V2 1/4] BaseTools: fixing FMMT Shri= nkFv issue >=20 > Reviewed-by: Bob Feng >=20 > -----Original Message----- > From: Chen, Christine > Sent: Thursday, June 29, 2023 11:34 AM > To: devel@edk2.groups.io > Cc: Rebecca Cran ; Gao, Liming > ; Feng, Bob C > Subject: [Patch V2 1/4] BaseTools: fixing FMMT ShrinkFv issue >=20 > 1. FvLength not change issue; > 2. FileSystemGuid align with File Size; >=20 > Cc: Rebecca Cran > Cc: Liming Gao > Cc: Bob Feng > Signed-off-by: Yuwei Chen > --- > BaseTools/Source/Python/FMMT/core/FMMTOperation.py | 2 +- > BaseTools/Source/Python/FMMT/core/FvHandler.py | 10 +++++++--- > 2 files changed, 8 insertions(+), 4 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/FMMT/core/FMMTOperation.py > b/BaseTools/Source/Python/FMMT/core/FMMTOperation.py > index a86f8dda9a1a..d4aa3397036d 100644 > --- a/BaseTools/Source/Python/FMMT/core/FMMTOperation.py > +++ b/BaseTools/Source/Python/FMMT/core/FMMTOperation.py > @@ -188,7 +188,7 @@ def ExtractFfs(inputfile: str, Ffs_name: str, outputfile: > str, Fv_name: str=3DNone >=20 > FmmtParser.WholeFvTree.Findlist.remove(FmmtParser.WholeFvTree.Findlist[i > ndex]) > if FmmtParser.WholeFvTree.Findlist !=3D []: > TargetNode =3D FmmtParser.WholeFvTree.Findlist[0] > - if TargetNode.type =3D=3D FV_TREE or SEC_FV_TREE or > DATA_FV_TREE: > + if TargetNode.type =3D=3D FV_TREE or TargetNode.type =3D=3D > SEC_FV_TREE or TargetNode.type =3D=3D DATA_FV_TREE: > FinalData =3D struct2stream(TargetNode.Data.Header) + > TargetNode.Data.Data > with open(outputfile, "wb") as f: > f.write(FinalData) > diff --git a/BaseTools/Source/Python/FMMT/core/FvHandler.py > b/BaseTools/Source/Python/FMMT/core/FvHandler.py > index ff3d637623f8..b0cc1951a1c6 100644 > --- a/BaseTools/Source/Python/FMMT/core/FvHandler.py > +++ b/BaseTools/Source/Python/FMMT/core/FvHandler.py > @@ -279,7 +279,7 @@ class FvHandler: > ParTree.Child.remove(ParTree.Child[-1]) > ParTree.Data.Free_Space =3D 0 > ParTree.Data.Size +=3D Needed_Space > - ParTree.Data.Header.Fvlength =3D > ParTree.Data.Size > + ParTree.Data.Header.FvLength =3D > ParTree.Data.Size > ModifyFvSystemGuid(ParTree) > for item in ParTree.Child: > if item.type =3D=3D FFS_FREE_SPACE: > @@ -650,8 +650,12 @@ class FvHandler: > Removed_Space =3D TargetFv.Data.Free_Space - > New_Free_Space > TargetFv.Child[-1].Data.Data =3D b'\xff' * New_Free_Space > TargetFv.Data.Size -=3D Removed_Space > - TargetFv.Data.Header.Fvlength =3D TargetFv.Data.Size > - ModifyFvSystemGuid(TargetFv) > + TargetFv.Data.Header.FvLength =3D TargetFv.Data.Size > + if struct2stream(TargetFv.Data.Header.FileSystemGuid) =3D=3D > EFI_FIRMWARE_FILE_SYSTEM3_GUID_BYTE: > + if TargetFv.Data.Size <=3D 0xFFFFFF: > + TargetFv.Data.Header.FileSystemGuid =3D > ModifyGuidFormat( > + "8c8ce578-8a3d-4f1c-9935-896185c32dd3") > + > for item in TargetFv.Child: > if item.type =3D=3D FFS_FREE_SPACE: > TargetFv.Data.Data +=3D item.Data.Data + > item.Data.PadData > -- > 2.27.0.windows.1 >=20 >=20 >=20 >=20 >=20 -=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 (#108140): https://edk2.groups.io/g/devel/message/108140 Mute This Topic: https://groups.io/mt/101048509/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-