From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8FC0981DCC for ; Mon, 14 Nov 2016 00:38:40 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP; 14 Nov 2016 00:38:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,637,1473145200"; d="scan'208";a="30921450" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 14 Nov 2016 00:38:44 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 14 Nov 2016 00:38:44 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.96]) with mapi id 14.03.0248.002; Mon, 14 Nov 2016 16:38:42 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Fix the bug to support generate FFS by Align=Auto Thread-Index: AQHSOnTxAwqf/ONTPkC47jWpGDZ1AKDYMBMA Date: Mon, 14 Nov 2016 08:38:41 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B4B188F@shsmsx102.ccr.corp.intel.com> References: <1478687699-31688-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1478687699-31688-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix the bug to support generate FFS by Align=Auto X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2016 08:38:40 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Zhu, Yonghong > Sent: Wednesday, November 09, 2016 6:35 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [Patch] BaseTools: Fix the bug to support generate FFS by > Align=3DAuto >=20 > FDF spec support to use 'Auto' as , but current Tool > report error about -a=3DAuto is invalid option when we set Align=3DAuto f= or > RAW File. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/GenFds/FdfParser.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py > b/BaseTools/Source/Python/GenFds/FdfParser.py > index 5489df5..f17a41f 100644 > --- a/BaseTools/Source/Python/GenFds/FdfParser.py > +++ b/BaseTools/Source/Python/GenFds/FdfParser.py > @@ -2744,11 +2744,13 @@ class FdfParser: > while True: > AlignValue =3D None > if self.__GetAlignment(): > if self.__Token not in ("Auto", "8", "16", "32", "64", "= 128", "512", "1K", > "4K", "32K" ,"64K"): > raise Warning("Incorrect alignment '%s'" % self.__To= ken, > self.FileName, self.CurrentLineNumber) > - AlignValue =3D self.__Token > + #For FFS, Auto is default option same to "" > + if not self.__Token =3D=3D "Auto": > + AlignValue =3D self.__Token > if not self.__GetNextToken(): > raise Warning("expected Filename value", self.FileName, > self.CurrentLineNumber) >=20 > FileName =3D self.__Token.replace('$(SPACE)', ' ') > if FileName =3D=3D '}': > -- > 2.6.1.windows.1