## @file\r
# process GUIDed section generation\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, 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 Section\r
import subprocess\r
from Ffs import Ffs\r
-import os\r
+import Common.LongFilePathOs as os\r
from GenFdsGlobalVariable import GenFdsGlobalVariable\r
from CommonDataClass.FdfClass import GuidSectionClassObject\r
from Common import ToolDefClassObject\r
from Common import EdkLogger\r
from Common.BuildToolError import *\r
from FvImageSection import FvImageSection\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
\r
## generate GUIDed section\r
#\r
\r
Attribute = []\r
HeaderLength = None\r
- if self.ProcessRequired == "NONE":\r
- if TempFileSize > InputFileSize and TempFileSize % 4 == 0:\r
+ if self.ExtraHeaderSize != -1:\r
+ HeaderLength = str(self.ExtraHeaderSize)\r
+\r
+ if self.ProcessRequired == "NONE" and HeaderLength == None:\r
+ if TempFileSize > InputFileSize:\r
FileHandleIn.seek(0)\r
BufferIn = FileHandleIn.read()\r
FileHandleOut.seek(0)\r
if self.ProcessRequired in ("TRUE", "1"):\r
if 'PROCESSING_REQUIRED' not in Attribute:\r
Attribute.append('PROCESSING_REQUIRED')\r
- HeaderLength = None\r
+ \r
if self.AuthStatusValid in ("TRUE", "1"):\r
Attribute.append('AUTH_STATUS_VALID')\r
GenFdsGlobalVariable.GenerateSection(OutputFile, [TempFile], Section.Section.SectionType['GUIDED'],\r
if self.KeyStringList == None or self.KeyStringList == []:\r
Target = GenFdsGlobalVariable.TargetName\r
ToolChain = GenFdsGlobalVariable.ToolChainTag\r
- ToolDb = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.WorkSpaceDir).ToolsDefTxtDatabase\r
+ ToolDb = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.ConfDir).ToolsDefTxtDatabase\r
if ToolChain not in ToolDb['TOOL_CHAIN_TAG']:\r
EdkLogger.error("GenFds", GENFDS_ERROR, "Can not find external tool because tool tag %s is not defined in tools_def.txt!" % ToolChain)\r
self.KeyStringList = [Target+'_'+ToolChain+'_'+self.CurrentArchList[0]]\r
for Arch in self.CurrentArchList:\r
- if Target+'_'+ToolChain+'_'+Arch not in self.KeyStringList:\r
- self.KeyStringList.append(Target+'_'+ToolChain+'_'+Arch)\r
- \r
- ToolDefinition = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.WorkSpaceDir).ToolsDefTxtDictionary\r
+ if Target + '_' + ToolChain + '_' + Arch not in self.KeyStringList:\r
+ self.KeyStringList.append(Target + '_' + ToolChain + '_' + Arch)\r
+\r
+ ToolDefinition = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.ConfDir).ToolsDefTxtDictionary\r
ToolPathTmp = None\r
for ToolDef in ToolDefinition.items():\r
if self.NameGuid == ToolDef[1]:\r