public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix the bug to support generate FFS by Align=Auto
@ 2016-11-09 10:34 Yonghong Zhu
  2016-11-14  8:38 ` Gao, Liming
  0 siblings, 1 reply; 4+ messages in thread
From: Yonghong Zhu @ 2016-11-09 10:34 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao

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>
---
 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



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [Patch] BaseTools: Fix the bug to support generate FFS by Align = Auto
@ 2016-11-03 13:58 Yonghong Zhu
  2016-11-04  2:10 ` Gao, Liming
  0 siblings, 1 reply; 4+ messages in thread
From: Yonghong Zhu @ 2016-11-03 13:58 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao

FDF spec support to use 'Auto' as <FfsAlignmentValues>, but current Tool
report error about -a=Auto is invalid option.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index c3f3624..05c4070 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -432,10 +432,12 @@ class GenFdsGlobalVariable:
         if Fixed == True:
             Cmd += ["-x"]
         if CheckSum:
             Cmd += ["-s"]
         if Align not in [None, '']:
+            if Align == 'Auto':
+                Align = '1'
             Cmd += ["-a", Align]
 
         Cmd += ["-o", Output]
         for I in range(0, len(Input)):
             Cmd += ("-i", Input[I])
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-14  8:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09 10:34 [Patch] BaseTools: Fix the bug to support generate FFS by Align=Auto Yonghong Zhu
2016-11-14  8:38 ` Gao, Liming
  -- strict thread matches above, loose matches on Subject: below --
2016-11-03 13:58 [Patch] BaseTools: Fix the bug to support generate FFS by Align = Auto Yonghong Zhu
2016-11-04  2:10 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox