From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 58BF781C72 for ; Wed, 9 Nov 2016 02:35:00 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 09 Nov 2016 02:35:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,465,1473145200"; d="scan'208";a="29206310" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.144]) by fmsmga005.fm.intel.com with ESMTP; 09 Nov 2016 02:35:02 -0800 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao Date: Wed, 9 Nov 2016 18:34:59 +0800 Message-Id: <1478687699-31688-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [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: Wed, 09 Nov 2016 10:35:00 -0000 FDF spec support to use 'Auto' as , but current Tool report error about -a=Auto is invalid option when we set Align=Auto for RAW File. 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(-) 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 = 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.__Token, self.FileName, self.CurrentLineNumber) - AlignValue = self.__Token + #For FFS, Auto is default option same to "" + if not self.__Token == "Auto": + AlignValue = self.__Token if not self.__GetNextToken(): raise Warning("expected Filename value", self.FileName, self.CurrentLineNumber) FileName = self.__Token.replace('$(SPACE)', ' ') if FileName == '}': -- 2.6.1.windows.1