X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FGenFds%2FGenFdsGlobalVariable.py;h=eeb3ec2197a8f9f468f848851f02fa7ab65f62d4;hp=6eb1201cee49ee0f9ab0f72702802092c0ef7c0c;hb=f7496d717357b9af78414d19679b073403812340;hpb=39456d00f36e04b7e7efb208f350f4e83b6c3531 diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py index 6eb1201cee..eeb3ec2197 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -65,7 +65,7 @@ class GenFdsGlobalVariable: FdfFileTimeStamp = 0 FixedLoadAddress = False PlatformName = '' - + BuildRuleFamily = "MSFT" ToolChainFamily = "MSFT" __BuildRuleDatabase = None @@ -75,7 +75,7 @@ class GenFdsGlobalVariable: CopyList = [] ModuleFile = '' EnableGenfdsMultiThread = False - + # # The list whose element are flags to indicate if large FFS or SECTION files exist in FV. # At the beginning of each generation of FV, false flag is appended to the list, @@ -90,7 +90,7 @@ class GenFdsGlobalVariable: LARGE_FILE_SIZE = 0x1000000 SectionHeader = struct.Struct("3B 1B") - + ## LoadBuildRule # @staticmethod @@ -117,7 +117,7 @@ class GenFdsGlobalVariable: and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY] \ and ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]: GenFdsGlobalVariable.BuildRuleFamily = ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag] - + if DataType.TAB_TOD_DEFINES_FAMILY in ToolDefinition \ and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY] \ and ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY][GenFdsGlobalVariable.ToolChainTag]: @@ -229,11 +229,11 @@ class GenFdsGlobalVariable: while Index < len(SourceList): Source = SourceList[Index] Index = Index + 1 - + if File.IsBinary and File == Source and Inf.Binaries is not None and File in Inf.Binaries: # Skip all files that are not binary libraries if not Inf.LibraryClass: - continue + continue RuleObject = BuildRules[DataType.TAB_DEFAULT_BINARY_FILE] elif FileType in BuildRules: RuleObject = BuildRules[FileType] @@ -244,15 +244,15 @@ class GenFdsGlobalVariable: if LastTarget: TargetList.add(str(LastTarget)) break - + FileType = RuleObject.SourceFileType - + # stop at STATIC_LIBRARY for library if Inf.LibraryClass and FileType == DataType.TAB_STATIC_LIBRARY: if LastTarget: TargetList.add(str(LastTarget)) break - + Target = RuleObject.Apply(Source) if not Target: if LastTarget: @@ -261,11 +261,11 @@ class GenFdsGlobalVariable: elif not Target.Outputs: # Only do build for target with outputs TargetList.add(str(Target)) - + # to avoid cyclic rule if FileType in RuleChain: break - + RuleChain.append(FileType) SourceList.extend(Target.Outputs) LastTarget = Target @@ -645,19 +645,19 @@ class GenFdsGlobalVariable: @staticmethod def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None, Revision=None, DeviceId=None, VendorId=None, IsMakefile=False): - InputList = [] + InputList = [] Cmd = ["EfiRom"] if len(EfiInput) > 0: - + if Compress: Cmd.append("-ec") else: Cmd.append("-e") - + for EfiFile in EfiInput: Cmd.append(EfiFile) InputList.append (EfiFile) - + if len(BinaryInput) > 0: Cmd.append("-b") for BinFile in BinaryInput: @@ -668,7 +668,7 @@ class GenFdsGlobalVariable: if not GenFdsGlobalVariable.NeedsUpdate(Output, InputList) and not IsMakefile: return GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, InputList)) - + if ClassCode is not None: Cmd += ("-l", ClassCode) if Revision is not None: @@ -811,7 +811,7 @@ class GenFdsGlobalVariable: EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern) if PcdObj.DatumType != DataType.TAB_VOID: EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern) - + PcdValue = PcdObj.DefaultValue return PcdValue @@ -827,7 +827,7 @@ class GenFdsGlobalVariable: EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern) if PcdObj.DatumType != DataType.TAB_VOID: EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern) - + PcdValue = PcdObj.DefaultValue return PcdValue