summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2016-11-09 18:18:01 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2016-11-15 10:21:47 +0800
commitf475f1e2361877e9947ecda98a697bc55fb9d85a (patch)
tree9a06ab5337be7b1ae4d18b50498a4521f61c80bf /BaseTools
parentec8a387700905bf2776f304576d1fb3b969ad16a (diff)
downloadedk2-platforms-f475f1e2361877e9947ecda98a697bc55fb9d85a.tar.xz
BaseTools: Fix the bug to support generate FFS by Align=Auto
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>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 5489df59a6..f17a41f94d 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -2746,7 +2746,9 @@ class FdfParser:
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)