## @file\r
# process FV generation\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
#\r
-# All rights reserved. This program and the accompanying materials\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
self.InfFileName = None\r
self.FvAddressFileName = None\r
self.CapsuleName = None\r
-\r
+ self.FvBaseAddress = None\r
+ self.FvForceRebase = None\r
+ \r
## AddToBuffer()\r
#\r
# Generate Fv and add it to the Buffer\r
elif RegionData.upper() + 'fv' in GenFds.ImageBinDict.keys():\r
continue\r
elif self.UiFvName.upper() == RegionData.upper():\r
- GenFdsGlobalVariable.ErrorLogger("Capsule %s in FD region can't contain a FV %s in FD region." % (self.CapsuleName, self.UiFvName.upper()))\r
+ GenFdsGlobalVariable.ErrorLogger("Capsule %s in FD region can't contain a FV %s in FD region." % (self.CapsuleName, self.UiFvName.upper()))\r
\r
GenFdsGlobalVariable.InfLogger( "\nGenerating %s FV" %self.UiFvName)\r
+ GenFdsGlobalVariable.LargeFileInFvFlags.append(False)\r
+ FFSGuid = None\r
+ \r
+ if self.FvBaseAddress != None:\r
+ BaseAddress = self.FvBaseAddress\r
\r
self.__InitializeInf__(BaseAddress, BlockSize, BlockNum, ErasePloarity, VtfDict)\r
#\r
OrigFvInfo = None\r
if os.path.exists (FvInfoFileName):\r
OrigFvInfo = open(FvInfoFileName, 'r').read()\r
+ if GenFdsGlobalVariable.LargeFileInFvFlags[-1]:\r
+ FFSGuid = GenFdsGlobalVariable.EFI_FIRMWARE_FILE_SYSTEM3_GUID;\r
GenFdsGlobalVariable.GenerateFirmwareVolume(\r
FvOutputFile,\r
[self.InfFileName],\r
AddressFile=FvInfoFileName,\r
- FfsList=FfsFileList\r
+ FfsList=FfsFileList,\r
+ ForceRebase=self.FvForceRebase,\r
+ FileSystemGuid=FFSGuid\r
)\r
\r
NewFvInfo = None\r
for FfsFile in self.FfsList :\r
FileName = FfsFile.GenFfs(MacroDict, FvChildAddr, BaseAddress)\r
\r
+ if GenFdsGlobalVariable.LargeFileInFvFlags[-1]:\r
+ FFSGuid = GenFdsGlobalVariable.EFI_FIRMWARE_FILE_SYSTEM3_GUID;\r
#Update GenFv again\r
GenFdsGlobalVariable.GenerateFirmwareVolume(\r
FvOutputFile,\r
[self.InfFileName],\r
AddressFile=FvInfoFileName,\r
- FfsList=FfsFileList\r
+ FfsList=FfsFileList,\r
+ ForceRebase=self.FvForceRebase,\r
+ FileSystemGuid=FFSGuid\r
)\r
\r
#\r
self.FvAlignment = str (FvAlignmentValue)\r
FvFileObj.close()\r
GenFds.ImageBinDict[self.UiFvName.upper() + 'fv'] = FvOutputFile\r
+ GenFdsGlobalVariable.LargeFileInFvFlags.pop()\r
return FvOutputFile\r
\r
## __InitializeInf__()\r
Buffer = ''\r
for Index in range (0, len(self.FvExtEntryType)):\r
if self.FvExtEntryType[Index] == 'FILE':\r
- # check if the path is absolute or relative
- if os.path.isabs(self.FvExtEntryData[Index]):
- FileFullPath = os.path.normpath(self.FvExtEntryData[Index])
- else:
- FileFullPath = os.path.normpath(os.path.join(GenFdsGlobalVariable.WorkSpaceDir, self.FvExtEntryData[Index]))
- # check if the file path exists or not
- if not os.path.isfile(FileFullPath):
+ # check if the path is absolute or relative\r
+ if os.path.isabs(self.FvExtEntryData[Index]):\r
+ FileFullPath = os.path.normpath(self.FvExtEntryData[Index])\r
+ else:\r
+ FileFullPath = os.path.normpath(os.path.join(GenFdsGlobalVariable.WorkSpaceDir, self.FvExtEntryData[Index]))\r
+ # check if the file path exists or not\r
+ if not os.path.isfile(FileFullPath):\r
GenFdsGlobalVariable.ErrorLogger("Error opening FV Extension Header Entry file %s." % (self.FvExtEntryData[Index]))\r
FvExtFile = open (FileFullPath,'rb')\r
FvExtFile.seek(0,2)\r
Buffer += pack('B', int(ByteList[Index1], 16))\r
\r
Guid = self.FvNameGuid.split('-')\r
- Buffer = pack('LHHBBBBBBBBL', \r
+ Buffer = pack('=LHHBBBBBBBBL', \r
int(Guid[0], 16), \r
int(Guid[1], 16), \r
int(Guid[2], 16), \r