]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the bug to support generate FFS by Align=Auto
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 9 Nov 2016 10:18:01 +0000 (18:18 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 15 Nov 2016 02:21:47 +0000 (10:21 +0800)
FDF spec support to use 'Auto' as <FfsAlignmentValues>, but current Tool
report error about -a=Auto is invalid option when we set Align=Auto for
RAW File.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/GenFds/FdfParser.py

index 5489df59a6edf8c3da9ed84d6ec78976629b9cf3..f17a41f94df69ffe116f851c19d8889f753ba74e 100644 (file)
@@ -2746,7 +2746,9 @@ class FdfParser:
             if self.__GetAlignment():\r
                 if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
                     raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
-                AlignValue = self.__Token\r
+                #For FFS, Auto is default option same to ""\r
+                if not self.__Token == "Auto":\r
+                    AlignValue = self.__Token\r
             if not self.__GetNextToken():\r
                 raise Warning("expected Filename value", self.FileName, self.CurrentLineNumber)\r
 \r