Revision: 19374
          http://sourceforge.net/p/edk2/code/19374
Author:   vanjeff
Date:     2015-12-18 06:47:07 +0000 (Fri, 18 Dec 2015)
Log Message:
-----------
Revert the change in r19137.

(Sync patch r19138 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/19137
    http://sourceforge.net/p/edk2/code/19138

Modified Paths:
--------------
    branches/UDK2015/BaseTools/Source/C/Include/Common/BuildVersion.h
    branches/UDK2015/BaseTools/Source/Python/GenFds/Fv.py

Modified: branches/UDK2015/BaseTools/Source/C/Include/Common/BuildVersion.h
===================================================================
--- branches/UDK2015/BaseTools/Source/C/Include/Common/BuildVersion.h   
2015-12-18 06:46:23 UTC (rev 19373)
+++ branches/UDK2015/BaseTools/Source/C/Include/Common/BuildVersion.h   
2015-12-18 06:47:07 UTC (rev 19374)
@@ -12,4 +12,4 @@
 
 **/
 
-#define __BUILD_VERSION "Build 99862"
+#define __BUILD_VERSION ""

Modified: branches/UDK2015/BaseTools/Source/Python/GenFds/Fv.py
===================================================================
--- branches/UDK2015/BaseTools/Source/Python/GenFds/Fv.py       2015-12-18 
06:46:23 UTC (rev 19373)
+++ branches/UDK2015/BaseTools/Source/Python/GenFds/Fv.py       2015-12-18 
06:47:07 UTC (rev 19374)
@@ -181,33 +181,30 @@
         #
         # Write the Fv contents to Buffer
         #
-        if os.path.isfile(FvOutputFile):
-            FvFileObj = open ( FvOutputFile,'r+b')
+        FvFileObj = open ( FvOutputFile,'r+b')
 
-            GenFdsGlobalVariable.VerboseLogger( "\nGenerate %s FV 
Successfully" %self.UiFvName)
-            GenFdsGlobalVariable.SharpCounter = 0
+        GenFdsGlobalVariable.VerboseLogger( "\nGenerate %s FV Successfully" 
%self.UiFvName)
+        GenFdsGlobalVariable.SharpCounter = 0
 
-            Buffer.write(FvFileObj.read())
-            FvFileObj.seek(0)
-            # PI FvHeader is 0x48 byte
-            FvHeaderBuffer = FvFileObj.read(0x48)
-            # FV alignment position.
-            FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F)
-            # FvAlignmentValue is larger than or equal to 1K
-            if FvAlignmentValue >= 0x400:
-                if FvAlignmentValue >= 0x10000:
-                    #The max alignment supported by FFS is 64K.
-                    self.FvAlignment = "64K"
-                else:
-                    self.FvAlignment = str (FvAlignmentValue / 0x400) + "K"
+        Buffer.write(FvFileObj.read())
+        FvFileObj.seek(0)
+        # PI FvHeader is 0x48 byte
+        FvHeaderBuffer = FvFileObj.read(0x48)
+        # FV alignment position.
+        FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F)
+        # FvAlignmentValue is larger than or equal to 1K
+        if FvAlignmentValue >= 0x400:
+            if FvAlignmentValue >= 0x10000:
+                #The max alignment supported by FFS is 64K.
+                self.FvAlignment = "64K"
             else:
-                # FvAlignmentValue is less than 1K
-                self.FvAlignment = str (FvAlignmentValue)
-            FvFileObj.close()
-            GenFds.ImageBinDict[self.UiFvName.upper() + 'fv'] = FvOutputFile
-            GenFdsGlobalVariable.LargeFileInFvFlags.pop()
+                self.FvAlignment = str (FvAlignmentValue / 0x400) + "K"
         else:
-            GenFdsGlobalVariable.ErrorLogger("Failed to generate %s FV file." 
%self.UiFvName)
+            # FvAlignmentValue is less than 1K
+            self.FvAlignment = str (FvAlignmentValue)
+        FvFileObj.close()
+        GenFds.ImageBinDict[self.UiFvName.upper() + 'fv'] = FvOutputFile
+        GenFdsGlobalVariable.LargeFileInFvFlags.pop()
         return FvOutputFile
 
     ## _GetBlockSize()


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to