]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/Fv.py
BaseTools: Fix regression boot hang issue by commit 0e982cf03dd5
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / Fv.py
index 510f2834a88122a7dea4004945837e15d6f34b71..c66fc383278d37950d2a6f4f0b4c59a9db48f53a 100644 (file)
@@ -204,8 +204,8 @@ class FV (FvClassObject):
                     GenFdsGlobalVariable.VerboseLogger("\nGenerate %s FV Successfully" % self.UiFvName)\r
                     GenFdsGlobalVariable.SharpCounter = 0\r
 \r
-                    Buffer.write(FvFileObj.read())\r
                     FvFileObj.seek(0)\r
+                    Buffer.write(FvFileObj.read())\r
                     # FV alignment position.\r
                     FvAlignmentValue = 1 << (ord(FvHeaderBuffer[0x2E]) & 0x1F)\r
                     if FvAlignmentValue >= 0x400:\r