]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/Python/GenFds/Fv.py
BaseTools: Fix regression boot hang issue by commit 0e982cf03dd5
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / Fv.py
CommitLineData
1ccc4d89 1from __future__ import absolute_import\r
30fdf114
LG
2## @file\r
3# process FV generation\r
4#\r
ff260aa7 5# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
30fdf114 6#\r
40d841f6 7# This program and the accompanying materials\r
30fdf114
LG
8# are licensed and made available under the terms and conditions of the BSD License\r
9# which accompanies this distribution. The full text of the license may be found at\r
10# http://opensource.org/licenses/bsd-license.php\r
11#\r
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14#\r
15\r
16##\r
17# Import Modules\r
18#\r
1be2ed90 19import Common.LongFilePathOs as os\r
30fdf114 20import subprocess\r
86379ac4 21from io import BytesIO\r
b303ea72 22from struct import *\r
30fdf114 23\r
bfa65b61
GL
24from . import Ffs\r
25from . import AprioriSection\r
26from . import FfsFileStatement\r
27from .GenFdsGlobalVariable import GenFdsGlobalVariable\r
30fdf114 28from CommonDataClass.FdfClass import FvClassObject\r
d0a0c52c 29from Common.Misc import SaveFileOnChange, PackGUID\r
1be2ed90
HC
30from Common.LongFilePathSupport import CopyLongFilePath\r
31from Common.LongFilePathSupport import OpenLongFilePath as open\r
91fa33ee 32from Common.DataType import *\r
30fdf114 33\r
0614d73b 34FV_UI_EXT_ENTY_GUID = 'A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C'\r
30fdf114
LG
35\r
36## generate FV\r
37#\r
38#\r
39class FV (FvClassObject):\r
40 ## The constructor\r
41 #\r
42 # @param self The object pointer\r
43 #\r
44 def __init__(self):\r
45 FvClassObject.__init__(self)\r
46 self.FvInfFile = None\r
47 self.FvAddressFile = None\r
48 self.BaseAddress = None\r
49 self.InfFileName = None\r
50 self.FvAddressFileName = None\r
fd171542 51 self.CapsuleName = None\r
4234283c 52 self.FvBaseAddress = None\r
79b74a03 53 self.FvForceRebase = None\r
135ae8c8 54 self.FvRegionInFD = None\r
9425b349 55 self.UsedSizeEnable = False\r
f7496d71 56\r
30fdf114
LG
57 ## AddToBuffer()\r
58 #\r
59 # Generate Fv and add it to the Buffer\r
60 #\r
61 # @param self The object pointer\r
62 # @param Buffer The buffer generated FV data will be put\r
63 # @param BaseAddress base address of FV\r
64 # @param BlockSize block size of FV\r
65 # @param BlockNum How many blocks in FV\r
66 # @param ErasePolarity Flash erase polarity\r
67 # @param VtfDict VTF objects\r
68 # @param MacroDict macro value pair\r
69 # @retval string Generated FV file path\r
70 #\r
37de70b7 71 def AddToBuffer (self, Buffer, BaseAddress=None, BlockSize= None, BlockNum=None, ErasePloarity='1', VtfDict=None, MacroDict = {}, Flag=False) :\r
30fdf114 72\r
7de00838
GL
73 if BaseAddress is None and self.UiFvName.upper() + 'fv' in GenFdsGlobalVariable.ImageBinDict:\r
74 return GenFdsGlobalVariable.ImageBinDict[self.UiFvName.upper() + 'fv']\r
f7496d71 75\r
fd171542 76 #\r
77 # Check whether FV in Capsule is in FD flash region.\r
78 # If yes, return error. Doesn't support FV in Capsule image is also in FD flash region.\r
79 #\r
4231a819 80 if self.CapsuleName is not None:\r
9eb87141 81 for FdObj in GenFdsGlobalVariable.FdfParser.Profile.FdDict.values():\r
fd171542 82 for RegionObj in FdObj.RegionList:\r
91fa33ee 83 if RegionObj.RegionType == BINARY_FILE_TYPE_FV:\r
fd171542 84 for RegionData in RegionObj.RegionDataList:\r
85 if RegionData.endswith(".fv"):\r
86 continue\r
7de00838 87 elif RegionData.upper() + 'fv' in GenFdsGlobalVariable.ImageBinDict:\r
fd171542 88 continue\r
89 elif self.UiFvName.upper() == RegionData.upper():\r
0d2711a6 90 GenFdsGlobalVariable.ErrorLogger("Capsule %s in FD region can't contain a FV %s in FD region." % (self.CapsuleName, self.UiFvName.upper()))\r
37de70b7
YZ
91 if not Flag:\r
92 GenFdsGlobalVariable.InfLogger( "\nGenerating %s FV" %self.UiFvName)\r
2bc3256c
LG
93 GenFdsGlobalVariable.LargeFileInFvFlags.append(False)\r
94 FFSGuid = None\r
f7496d71 95\r
4231a819 96 if self.FvBaseAddress is not None:\r
0d2711a6 97 BaseAddress = self.FvBaseAddress\r
37de70b7
YZ
98 if not Flag:\r
99 self.__InitializeInf__(BaseAddress, BlockSize, BlockNum, ErasePloarity, VtfDict)\r
30fdf114
LG
100 #\r
101 # First Process the Apriori section\r
102 #\r
103 MacroDict.update(self.DefineVarDict)\r
104\r
105 GenFdsGlobalVariable.VerboseLogger('First generate Apriori file !')\r
106 FfsFileList = []\r
107 for AprSection in self.AprioriSectionList:\r
37de70b7 108 FileName = AprSection.GenFfs (self.UiFvName, MacroDict, IsMakefile=Flag)\r
30fdf114
LG
109 FfsFileList.append(FileName)\r
110 # Add Apriori file name to Inf file\r
37de70b7
YZ
111 if not Flag:\r
112 self.FvInfFile.writelines("EFI_FILE_NAME = " + \\r
113 FileName + \\r
ef4f218b 114 TAB_LINE_BREAK)\r
30fdf114
LG
115\r
116 # Process Modules in FfsList\r
117 for FfsFile in self.FfsList :\r
37de70b7
YZ
118 if Flag:\r
119 if isinstance(FfsFile, FfsFileStatement.FileStatement):\r
120 continue\r
121 if GenFdsGlobalVariable.EnableGenfdsMultiThread and GenFdsGlobalVariable.ModuleFile and GenFdsGlobalVariable.ModuleFile.Path.find(os.path.normpath(FfsFile.InfFileName)) == -1:\r
122 continue\r
a743986d 123 FileName = FfsFile.GenFfs(MacroDict, FvParentAddr=BaseAddress, IsMakefile=Flag, FvName=self.UiFvName)\r
30fdf114 124 FfsFileList.append(FileName)\r
37de70b7
YZ
125 if not Flag:\r
126 self.FvInfFile.writelines("EFI_FILE_NAME = " + \\r
127 FileName + \\r
ef4f218b 128 TAB_LINE_BREAK)\r
37de70b7
YZ
129 if not Flag:\r
130 SaveFileOnChange(self.InfFileName, self.FvInfFile.getvalue(), False)\r
131 self.FvInfFile.close()\r
30fdf114
LG
132 #\r
133 # Call GenFv tool\r
134 #\r
135 FvOutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.UiFvName)\r
136 FvOutputFile = FvOutputFile + '.Fv'\r
137 # BUGBUG: FvOutputFile could be specified from FDF file (FV section, CreateFile statement)\r
4231a819 138 if self.CreateFileName is not None:\r
30fdf114
LG
139 FvOutputFile = self.CreateFileName\r
140\r
37de70b7 141 if Flag:\r
7de00838 142 GenFdsGlobalVariable.ImageBinDict[self.UiFvName.upper() + 'fv'] = FvOutputFile\r
37de70b7 143 return FvOutputFile\r
52302d4d 144\r
37de70b7
YZ
145 FvInfoFileName = os.path.join(GenFdsGlobalVariable.FfsDir, self.UiFvName + '.inf')\r
146 if not Flag:\r
147 CopyLongFilePath(GenFdsGlobalVariable.FvAddressFileName, FvInfoFileName)\r
148 OrigFvInfo = None\r
149 if os.path.exists (FvInfoFileName):\r
150 OrigFvInfo = open(FvInfoFileName, 'r').read()\r
151 if GenFdsGlobalVariable.LargeFileInFvFlags[-1]:\r
152 FFSGuid = GenFdsGlobalVariable.EFI_FIRMWARE_FILE_SYSTEM3_GUID\r
153 GenFdsGlobalVariable.GenerateFirmwareVolume(\r
154 FvOutputFile,\r
155 [self.InfFileName],\r
156 AddressFile=FvInfoFileName,\r
157 FfsList=FfsFileList,\r
158 ForceRebase=self.FvForceRebase,\r
159 FileSystemGuid=FFSGuid\r
160 )\r
161\r
162 NewFvInfo = None\r
163 if os.path.exists (FvInfoFileName):\r
164 NewFvInfo = open(FvInfoFileName, 'r').read()\r
4231a819 165 if NewFvInfo is not None and NewFvInfo != OrigFvInfo:\r
37de70b7
YZ
166 FvChildAddr = []\r
167 AddFileObj = open(FvInfoFileName, 'r')\r
168 AddrStrings = AddFileObj.readlines()\r
169 AddrKeyFound = False\r
170 for AddrString in AddrStrings:\r
171 if AddrKeyFound:\r
172 #get base address for the inside FvImage\r
173 FvChildAddr.append (AddrString)\r
174 elif AddrString.find ("[FV_BASE_ADDRESS]") != -1:\r
175 AddrKeyFound = True\r
176 AddFileObj.close()\r
177\r
178 if FvChildAddr != []:\r
179 # Update Ffs again\r
180 for FfsFile in self.FfsList :\r
ff260aa7 181 FileName = FfsFile.GenFfs(MacroDict, FvChildAddr, BaseAddress, IsMakefile=Flag, FvName=self.UiFvName)\r
37de70b7
YZ
182\r
183 if GenFdsGlobalVariable.LargeFileInFvFlags[-1]:\r
184 FFSGuid = GenFdsGlobalVariable.EFI_FIRMWARE_FILE_SYSTEM3_GUID;\r
185 #Update GenFv again\r
0385efa0 186 GenFdsGlobalVariable.GenerateFirmwareVolume(\r
37de70b7
YZ
187 FvOutputFile,\r
188 [self.InfFileName],\r
189 AddressFile=FvInfoFileName,\r
190 FfsList=FfsFileList,\r
191 ForceRebase=self.FvForceRebase,\r
192 FileSystemGuid=FFSGuid\r
193 )\r
194\r
195 #\r
196 # Write the Fv contents to Buffer\r
197 #\r
0e982cf0 198 if os.path.isfile(FvOutputFile) and os.path.getsize(FvOutputFile) >= 0x48:\r
37de70b7 199 FvFileObj = open(FvOutputFile, 'rb')\r
37de70b7
YZ
200 # PI FvHeader is 0x48 byte\r
201 FvHeaderBuffer = FvFileObj.read(0x48)\r
0e982cf0 202 Signature = FvHeaderBuffer[0x28:0x32]\r
203 if Signature and Signature.startswith('_FVH'):\r
204 GenFdsGlobalVariable.VerboseLogger("\nGenerate %s FV Successfully" % self.UiFvName)\r
205 GenFdsGlobalVariable.SharpCounter = 0\r
206\r
0e982cf0 207 FvFileObj.seek(0)\r
272ecccd 208 Buffer.write(FvFileObj.read())\r
0e982cf0 209 # FV alignment position.\r
210 FvAlignmentValue = 1 << (ord(FvHeaderBuffer[0x2E]) & 0x1F)\r
211 if FvAlignmentValue >= 0x400:\r
212 if FvAlignmentValue >= 0x100000:\r
213 if FvAlignmentValue >= 0x1000000:\r
214 #The max alignment supported by FFS is 16M.\r
215 self.FvAlignment = "16M"\r
216 else:\r
217 self.FvAlignment = str(FvAlignmentValue / 0x100000) + "M"\r
37de70b7 218 else:\r
0e982cf0 219 self.FvAlignment = str(FvAlignmentValue / 0x400) + "K"\r
e921f58d 220 else:\r
0e982cf0 221 # FvAlignmentValue is less than 1K\r
222 self.FvAlignment = str (FvAlignmentValue)\r
223 FvFileObj.close()\r
224 GenFdsGlobalVariable.ImageBinDict[self.UiFvName.upper() + 'fv'] = FvOutputFile\r
225 GenFdsGlobalVariable.LargeFileInFvFlags.pop()\r
2ff9e575 226 else:\r
0e982cf0 227 GenFdsGlobalVariable.ErrorLogger("Invalid FV file %s." % self.UiFvName)\r
52302d4d 228 else:\r
37de70b7 229 GenFdsGlobalVariable.ErrorLogger("Failed to generate %s FV file." %self.UiFvName)\r
30fdf114
LG
230 return FvOutputFile\r
231\r
29d960f9
YL
232 ## _GetBlockSize()\r
233 #\r
234 # Calculate FV's block size\r
235 # Inherit block size from FD if no block size specified in FV\r
236 #\r
237 def _GetBlockSize(self):\r
238 if self.BlockSizeList:\r
239 return True\r
240\r
9eb87141 241 for FdObj in GenFdsGlobalVariable.FdfParser.Profile.FdDict.values():\r
29d960f9 242 for RegionObj in FdObj.RegionList:\r
91fa33ee 243 if RegionObj.RegionType != BINARY_FILE_TYPE_FV:\r
29d960f9
YL
244 continue\r
245 for RegionData in RegionObj.RegionDataList:\r
246 #\r
247 # Found the FD and region that contain this FV\r
248 #\r
249 if self.UiFvName.upper() == RegionData.upper():\r
250 RegionObj.BlockInfoOfRegion(FdObj.BlockSizeList, self)\r
251 if self.BlockSizeList:\r
252 return True\r
253 return False\r
254\r
30fdf114
LG
255 ## __InitializeInf__()\r
256 #\r
257 # Initilize the inf file to create FV\r
258 #\r
259 # @param self The object pointer\r
260 # @param BaseAddress base address of FV\r
261 # @param BlockSize block size of FV\r
262 # @param BlockNum How many blocks in FV\r
263 # @param ErasePolarity Flash erase polarity\r
264 # @param VtfDict VTF objects\r
265 #\r
266 def __InitializeInf__ (self, BaseAddress = None, BlockSize= None, BlockNum = None, ErasePloarity='1', VtfDict=None) :\r
267 #\r
268 # Create FV inf file\r
269 #\r
270 self.InfFileName = os.path.join(GenFdsGlobalVariable.FvDir,\r
271 self.UiFvName + '.inf')\r
1ccc4d89 272 self.FvInfFile = BytesIO()\r
30fdf114
LG
273\r
274 #\r
275 # Add [Options]\r
276 #\r
ef4f218b 277 self.FvInfFile.writelines("[options]" + TAB_LINE_BREAK)\r
4231a819 278 if BaseAddress is not None :\r
30fdf114
LG
279 self.FvInfFile.writelines("EFI_BASE_ADDRESS = " + \\r
280 BaseAddress + \\r
ef4f218b 281 TAB_LINE_BREAK)\r
30fdf114 282\r
4231a819 283 if BlockSize is not None:\r
30fdf114
LG
284 self.FvInfFile.writelines("EFI_BLOCK_SIZE = " + \\r
285 '0x%X' %BlockSize + \\r
ef4f218b 286 TAB_LINE_BREAK)\r
4231a819 287 if BlockNum is not None:\r
30fdf114
LG
288 self.FvInfFile.writelines("EFI_NUM_BLOCKS = " + \\r
289 ' 0x%X' %BlockNum + \\r
ef4f218b 290 TAB_LINE_BREAK)\r
30fdf114 291 else:\r
52302d4d 292 if self.BlockSizeList == []:\r
29d960f9
YL
293 if not self._GetBlockSize():\r
294 #set default block size is 1\r
ef4f218b 295 self.FvInfFile.writelines("EFI_BLOCK_SIZE = 0x1" + TAB_LINE_BREAK)\r
f7496d71 296\r
30fdf114 297 for BlockSize in self.BlockSizeList :\r
4231a819 298 if BlockSize[0] is not None:\r
30fdf114
LG
299 self.FvInfFile.writelines("EFI_BLOCK_SIZE = " + \\r
300 '0x%X' %BlockSize[0] + \\r
ef4f218b 301 TAB_LINE_BREAK)\r
30fdf114 302\r
4231a819 303 if BlockSize[1] is not None:\r
30fdf114
LG
304 self.FvInfFile.writelines("EFI_NUM_BLOCKS = " + \\r
305 ' 0x%X' %BlockSize[1] + \\r
ef4f218b 306 TAB_LINE_BREAK)\r
30fdf114 307\r
4231a819 308 if self.BsBaseAddress is not None:\r
30fdf114
LG
309 self.FvInfFile.writelines('EFI_BOOT_DRIVER_BASE_ADDRESS = ' + \\r
310 '0x%X' %self.BsBaseAddress)\r
4231a819 311 if self.RtBaseAddress is not None:\r
30fdf114
LG
312 self.FvInfFile.writelines('EFI_RUNTIME_DRIVER_BASE_ADDRESS = ' + \\r
313 '0x%X' %self.RtBaseAddress)\r
314 #\r
315 # Add attribute\r
316 #\r
ef4f218b 317 self.FvInfFile.writelines("[attributes]" + TAB_LINE_BREAK)\r
30fdf114
LG
318\r
319 self.FvInfFile.writelines("EFI_ERASE_POLARITY = " + \\r
320 ' %s' %ErasePloarity + \\r
ef4f218b 321 TAB_LINE_BREAK)\r
4231a819 322 if not (self.FvAttributeDict is None):\r
dca689d5 323 for FvAttribute in self.FvAttributeDict.keys() :\r
9425b349
YF
324 if FvAttribute == "FvUsedSizeEnable":\r
325 if self.FvAttributeDict[FvAttribute].upper() in ('TRUE', '1') :\r
326 self.UsedSizeEnable = True\r
327 continue\r
30fdf114
LG
328 self.FvInfFile.writelines("EFI_" + \\r
329 FvAttribute + \\r
330 ' = ' + \\r
331 self.FvAttributeDict[FvAttribute] + \\r
ef4f218b 332 TAB_LINE_BREAK )\r
4231a819 333 if self.FvAlignment is not None:\r
30fdf114
LG
334 self.FvInfFile.writelines("EFI_FVB2_ALIGNMENT_" + \\r
335 self.FvAlignment.strip() + \\r
336 " = TRUE" + \\r
ef4f218b 337 TAB_LINE_BREAK)\r
f7496d71 338\r
30fdf114 339 #\r
b303ea72 340 # Generate FV extension header file\r
30fdf114 341 #\r
128d435f 342 if not self.FvNameGuid:\r
9425b349 343 if len(self.FvExtEntryType) > 0 or self.UsedSizeEnable:\r
b303ea72 344 GenFdsGlobalVariable.ErrorLogger("FV Extension Header Entries declared for %s with no FvNameGuid declaration." % (self.UiFvName))\r
128d435f 345 else:\r
b303ea72 346 TotalSize = 16 + 4\r
1ccc4d89 347 Buffer = ''\r
9425b349
YF
348 if self.UsedSizeEnable:\r
349 TotalSize += (4 + 4)\r
350 ## define EFI_FV_EXT_TYPE_USED_SIZE_TYPE 0x03\r
351 #typedef struct\r
352 # {\r
353 # EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr;\r
354 # UINT32 UsedSize;\r
355 # } EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE;\r
356 Buffer += pack('HHL', 8, 3, 0)\r
357\r
aaf8aa7b
YL
358 if self.FvNameString == 'TRUE':\r
359 #\r
360 # Create EXT entry for FV UI name\r
361 # This GUID is used: A67DF1FA-8DE8-4E98-AF09-4BDF2EFFBC7C\r
362 #\r
363 FvUiLen = len(self.UiFvName)\r
364 TotalSize += (FvUiLen + 16 + 4)\r
365 Guid = FV_UI_EXT_ENTY_GUID.split('-')\r
366 #\r
367 # Layout:\r
368 # EFI_FIRMWARE_VOLUME_EXT_ENTRY : size 4\r
369 # GUID : size 16\r
370 # FV UI name\r
371 #\r
372 Buffer += (pack('HH', (FvUiLen + 16 + 4), 0x0002)\r
d0a0c52c 373 + PackGUID(Guid)\r
1ccc4d89 374 + self.UiFvName)\r
0614d73b 375\r
b303ea72
LG
376 for Index in range (0, len(self.FvExtEntryType)):\r
377 if self.FvExtEntryType[Index] == 'FILE':\r
f51461c8
LG
378 # check if the path is absolute or relative\r
379 if os.path.isabs(self.FvExtEntryData[Index]):\r
380 FileFullPath = os.path.normpath(self.FvExtEntryData[Index])\r
381 else:\r
382 FileFullPath = os.path.normpath(os.path.join(GenFdsGlobalVariable.WorkSpaceDir, self.FvExtEntryData[Index]))\r
383 # check if the file path exists or not\r
384 if not os.path.isfile(FileFullPath):\r
b303ea72 385 GenFdsGlobalVariable.ErrorLogger("Error opening FV Extension Header Entry file %s." % (self.FvExtEntryData[Index]))\r
ccaa7754
GL
386 FvExtFile = open (FileFullPath, 'rb')\r
387 FvExtFile.seek(0, 2)\r
b303ea72
LG
388 Size = FvExtFile.tell()\r
389 if Size >= 0x10000:\r
390 GenFdsGlobalVariable.ErrorLogger("The size of FV Extension Header Entry file %s exceeds 0x10000." % (self.FvExtEntryData[Index]))\r
391 TotalSize += (Size + 4)\r
392 FvExtFile.seek(0)\r
393 Buffer += pack('HH', (Size + 4), int(self.FvExtEntryTypeValue[Index], 16))\r
f7496d71 394 Buffer += FvExtFile.read()\r
b303ea72
LG
395 FvExtFile.close()\r
396 if self.FvExtEntryType[Index] == 'DATA':\r
397 ByteList = self.FvExtEntryData[Index].split(',')\r
398 Size = len (ByteList)\r
399 if Size >= 0x10000:\r
400 GenFdsGlobalVariable.ErrorLogger("The size of FV Extension Header Entry data %s exceeds 0x10000." % (self.FvExtEntryData[Index]))\r
401 TotalSize += (Size + 4)\r
402 Buffer += pack('HH', (Size + 4), int(self.FvExtEntryTypeValue[Index], 16))\r
403 for Index1 in range (0, Size):\r
404 Buffer += pack('B', int(ByteList[Index1], 16))\r
405\r
406 Guid = self.FvNameGuid.split('-')\r
d0a0c52c 407 Buffer = PackGUID(Guid) + pack('=L', TotalSize) + Buffer\r
b303ea72
LG
408\r
409 #\r
410 # Generate FV extension header file if the total size is not zero\r
411 #\r
412 if TotalSize > 0:\r
413 FvExtHeaderFileName = os.path.join(GenFdsGlobalVariable.FvDir, self.UiFvName + '.ext')\r
86379ac4 414 FvExtHeaderFile = BytesIO()\r
b303ea72 415 FvExtHeaderFile.write(Buffer)\r
a709adfa 416 Changed = SaveFileOnChange(FvExtHeaderFileName, FvExtHeaderFile.getvalue(), True)\r
b303ea72 417 FvExtHeaderFile.close()\r
a709adfa
LG
418 if Changed:\r
419 if os.path.exists (self.InfFileName):\r
420 os.remove (self.InfFileName)\r
b303ea72
LG
421 self.FvInfFile.writelines("EFI_FV_EXT_HEADER_FILE_NAME = " + \\r
422 FvExtHeaderFileName + \\r
ef4f218b 423 TAB_LINE_BREAK)\r
30fdf114 424\r
f7496d71 425\r
b303ea72
LG
426 #\r
427 # Add [Files]\r
428 #\r
ef4f218b 429 self.FvInfFile.writelines("[files]" + TAB_LINE_BREAK)\r
b491aa95 430 if VtfDict and self.UiFvName in VtfDict:\r
30fdf114 431 self.FvInfFile.writelines("EFI_FILE_NAME = " + \\r
9eb87141 432 VtfDict[self.UiFvName] + \\r
ef4f218b 433 TAB_LINE_BREAK)\r