## @file\r
# process APRIORI file data and generate PEI/DXE APRIORI file\r
#\r
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# Import Modules\r
#\r
from struct import *\r
-import os\r
+import Common.LongFilePathOs as os\r
import StringIO\r
import FfsFileStatement\r
from GenFdsGlobalVariable import GenFdsGlobalVariable\r
# @param Dict dictionary contains macro and its value\r
# @retval string Generated file name\r
#\r
- def GenFfs (self, FvName, Dict = {}):\r
+ def GenFfs (self, FvName, Dict = {}, IsMakefile = False):\r
DXE_GUID = "FC510EE7-FFDC-11D4-BD41-0080C73C8881"\r
PEI_GUID = "1B45CC0A-156A-428A-AF62-49864DA0E6E6"\r
Buffer = StringIO.StringIO('')\r
AprioriFileGuid + FvName + '.Ffs')\r
\r
Dict.update(self.DefineVarDict)\r
+ InfFileName = None\r
for FfsObj in self.FfsList :\r
Guid = ""\r
if isinstance(FfsObj, FfsFileStatement.FileStatement):\r
\r
RawSectionFileName = os.path.join( OutputAprFilePath, \\r
AprioriFileGuid + FvName + '.raw' )\r
- GenFdsGlobalVariable.GenerateSection(RawSectionFileName, [OutputAprFileName], 'EFI_SECTION_RAW')\r
+ MakefilePath = None\r
+ if IsMakefile:\r
+ if not InfFileName:\r
+ return None\r
+ MakefilePath = InfFileName, Arch\r
+ GenFdsGlobalVariable.GenerateSection(RawSectionFileName, [OutputAprFileName], 'EFI_SECTION_RAW', IsMakefile=IsMakefile)\r
GenFdsGlobalVariable.GenerateFfs(AprFfsFileName, [RawSectionFileName],\r
- 'EFI_FV_FILETYPE_FREEFORM', AprioriFileGuid)\r
+ 'EFI_FV_FILETYPE_FREEFORM', AprioriFileGuid, MakefilePath=MakefilePath)\r
\r
return AprFfsFileName\r
\r