Home | History | Annotate | Download | only in AutoGen

Lines Matching refs:Platform

154     _CACHE_ = {}    # (BuildTarget, ToolChain) : {ARCH : {platform file: AutoGen object}}}

189 # The file path of platform file will be used to represent hash value of this object
191 # @retval int Hash value of the file path of platform file
198 # The file path of platform file will be used to represent this object
200 # @retval string String of platform file path
211 # This class is used mainly to control the whole platform build for different
221 # @param ActivePlatform Meta-file of active platform
246 self.Platform = self.BuildDatabase[self.MetaFile, 'COMMON', Target, Toolchain]
247 GlobalData.gActivePlatform = self.Platform
269 ArchList = set(self.Platform.SupArchList)
271 ArchList = set(self.ArchList) & set(self.Platform.SupArchList)
274 ExtraData = "Invalid ARCH specified. [Valid ARCH: %s]" % (" ".join(self.Platform.SupArchList)))
276 SkippedArchList = set(self.ArchList).symmetric_difference(set(self.Platform.SupArchList))
277 EdkLogger.verbose("\nArch [%s] is ignored because the platform supports [%s] only!"
278 % (" ".join(SkippedArchList), " ".join(self.Platform.SupArchList)))
282 if self.BuildTarget not in self.Platform.BuildTargets:
284 ExtraData="Build target [%s] is not supported by the platform. [Valid target: %s]"
285 % (self.BuildTarget, " ".join(self.Platform.BuildTargets)))
290 self.FdfFile = self.Platform.FlashDefinition
298 EdkLogger.info('\n%-24s = %s' % ("Active Platform", self.Platform))
342 Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
351 if ModuleFile in Platform.Modules:
361 Platform.SkuName = self.SkuId
376 Platform.AddPcd(Name, Guid, PcdSet[Name, Guid])
389 # Explicitly collect platform's dynamic PCDs
553 for Pcd in Pa.Platform.Pcds:
554 PcdType = Pa.Platform.Pcds[Pcd].Type
576 % (Pa.Platform.Pcds[Pcd].Type, Pcd[1], Pcd[0], Type),
586 "The PCD was not specified by any INF module in the platform for the given architecture.\n"
605 ## Return the build output directory platform specifies
607 return self.Platform.OutputDirectory
609 ## Return platform name
611 return self.Platform.PlatformName
615 return self.Platform.Guid
617 ## Return platform version
619 return self.Platform.Version
625 ## Return directory of platform makefile
640 # BuildCommand should be all the same. So just get one from platform AutoGen
715 ## Create makefile for the platform and modules in it
725 ## Create autogen code for platform and modules
727 # Since there's no autogen code for platform, this method will do nothing
739 ## Create AsBuilt INF file the platform
757 ## AutoGen class for platform
759 # PlatformAutoGen class will process the original information in platform
760 # file in order to generate makefile for platform.
797 # @param PlatformFile Platform file (DSC file)
800 # @param Arch arch of the platform supports
803 EdkLogger.debug(EdkLogger.DEBUG_9, "AutoGen platform [%s] [%s]" % (PlatformFile, Arch))
817 # get the original module/package/platform objects
871 ## Create autogen code for platform and modules
873 # Since there's no autogen code for platform, this method will do nothing
894 ## Create makefile for the platform and mdoules in it
901 for ModuleFile in self.Platform.Modules:
907 # no need to create makefile for the platform more than once
911 # create library/module build dirs for platform
946 # Gather dynamic PCDs list from each module and their settings from platform
947 # This interface should be invoked explicitly when platform action is created.
958 for F in self.Platform.Modules.keys():
962 self.Platform.Modules[F].M = M
974 if (PcdFromModule.TokenCName, PcdFromModule.TokenSpaceGuidCName) in self.Platform.Pcds.keys():
998 # PCD to the Platform's PCD Database.
1028 for ModuleInf in self.Platform.Modules.keys():
1040 # Override the module PCD setting by platform setting
1071 # this platform all (that use this PCD) list the PCD in a [PatchPcds]
1072 # section, AND all source INF files used by this platform the build
1074 # section, then the tools must NOT add the PCD to the Platform's PCD
1129 PlatformPcds = self.Platform.Pcds.keys()
1135 Pcd = self.Platform.Pcds[PcdKey]
1145 if self.Platform.VpdToolGuid == None or self.Platform.VpdToolGuid == '':
1155 DscPcdEntry = self.Platform.Pcds[DscPcd]
1157 if not (self.Platform.VpdToolGuid == None or self.Platform.VpdToolGuid == ''):
1181 %(DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName, self.Platform.MetaFile.Path))
1210 if (self.Platform.FlashDefinition == None or self.Platform.FlashDefinition == '') and \
1213 "Fail to get FLASH_DEFINITION definition in DSC file %s which is required when DSC contains VPD PCD." % str(self.Platform.MetaFile))
1216 DscTimeStamp = self.Platform.MetaFile.TimeStamp
1225 VpdFilePath = os.path.join(FvPath, "%s.txt" % self.Platform.VpdToolGuid)
1234 if ToolDef.has_key("GUID") and ToolDef["GUID"] == self.Platform.VpdToolGuid:
1236 EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "PATH attribute was not provided for BPDG guid tool %s in tools_def.txt" % self.Platform.VpdToolGuid)
1247 VpdMapFilePath = os.path.join(self.BuildDir, "FV", "%s.map" % self.Platform.VpdToolGuid)
1269 ## Return the platform build data object
1275 ## Return platform name
1277 return self.Platform.PlatformName
1281 return self.Platform.Guid
1283 ## Return the platform version
1285 return self.Platform.Version
1296 ## Return the build output directory platform specifies
1298 return self.Platform.OutputDirectory
1316 ## Return directory of platform makefile
1342 # Get each tool defition for given tool chain from tools_def.txt and platform
1439 ## Return the build options specific for all modules in this platform
1442 self._BuildOption = self._ExpandBuildOption(self.Platform.BuildOptions)
1445 ## Return the build options specific for EDK modules in this platform
1448 self._EdkBuildOption = self._ExpandBuildOption(self.Platform.BuildOptions, EDK_NAME)
1451 ## Return the build options specific for EDKII modules in this platform
1454 self._EdkIIBuildOption = self._ExpandBuildOption(self.Platform.BuildOptions, EDKII_NAME)
1480 ## Summarize the packages used by modules in this platform
1491 if ModuleFile in self.Platform.Modules:
1564 ## Summarize ModuleAutoGen objects of all modules/libraries to be built for this platform
1568 for ModuleFile in self.Platform.Modules:
1585 ## Summarize ModuleAutoGen objects of all modules to be built for this platform
1591 ## Summarize ModuleAutoGen objects of all libraries to be built for this platform
1597 ## Test if a module is supported by the platform
1600 # by the platform or current configuration
1603 return Module in self.Platform.Modules or Module in self.Platform.LibraryInstances \
1619 PlatformModule = self.Platform.Modules[str(Module)]
1627 for LibraryClass in self.Platform.LibraryClasses.GetKeys():
1628 if LibraryClass.startswith("NULL") and self.Platform.LibraryClasses[LibraryClass, Module.ModuleType]:
1629 Module.LibraryClasses[LibraryClass] = self.Platform.LibraryClasses[LibraryClass, Module.ModuleType]
1652 LibraryPath = self.Platform.LibraryClasses[LibraryClassName, ModuleType]
1794 ExtraData="%s.%s is defined as [%s] in module %s, but as [%s] in platform."\
1837 if self.Platform.SkuName in self.Platform.SkuIds:
1838 SkuName = self.Platform.SkuName
1842 SkuName : SkuInfoClass(SkuName, self.Platform.SkuIds[SkuName], '', '', '', '', '', ToPcd.DefaultValue)
1845 ## Apply PCD setting defined platform to a module
1849 # @retval PCD_list The list PCDs with settings from platform
1855 # find out the PCD setting in platform
1856 if (Name, Guid) in self.Platform.Pcds:
1857 PcdInPlatform = self.Platform.Pcds[Name, Guid]
1879 if Module in self.Platform.Modules:
1880 PlatformModule = self.Platform.Modules[str(Module)]
1906 Library = self.Platform.LibraryClasses[LibraryName, ':dummy:']
1908 for Key in self.Platform.LibraryClasses.data.keys():
1910 Library = self.Platform.LibraryClasses[Key, ':dummy:']
2067 ## Append build options in platform to a module
2071 # @retval options The options appended with build options in platform
2077 ModuleTypeOptions = self.Platform.GetBuildOptionsByModuleType(EDK_NAME, Module.ModuleType)
2080 ModuleTypeOptions = self.Platform.GetBuildOptionsByModuleType(EDKII_NAME, Module.ModuleType)
2083 if Module in self.Platform.Modules:
2084 PlatformModule = self.Platform.Modules[str(Module)]
2133 Platform = property(_GetPlatform)
2181 # @param PlatformFile Platform meta-file
2192 # check if this module is employed by active platform
2194 EdkLogger.verbose("Module [%s] for [%s] is not employed by active platform\n" \
2949 # apply PCD settings from platform
2970 # apply PCD settings from platform
3104 for Pcd in self.PlatformInfo.Platform.Pcds.values():