- RegionData = GenFdsGlobalVariable.MacroExtend(RegionData, MacroDict)\r
- if RegionData[1] != ':' :\r
- RegionData = os.path.join (GenFdsGlobalVariable.WorkSpaceDir, RegionData)\r
- if not os.path.exists(RegionData):\r
- EdkLogger.error("GenFds", FILE_NOT_FOUND, ExtraData=RegionData)\r
+ if self.RegionType == 'INF':\r
+ RegionData.__InfParse__(None)\r
+ if len(RegionData.BinFileList) != 1:\r
+ EdkLogger.error('GenFds', GENFDS_ERROR, 'INF in FD region can only contain one binary: %s' % RegionData)\r
+ File = RegionData.BinFileList[0]\r
+ RegionData = RegionData.PatchEfiFile(File.Path, File.Type)\r
+ else:\r
+ RegionData = GenFdsGlobalVariable.MacroExtend(RegionData, MacroDict)\r
+ if RegionData[1] != ':' :\r
+ RegionData = mws.join (GenFdsGlobalVariable.WorkSpaceDir, RegionData)\r
+ if not os.path.exists(RegionData):\r
+ EdkLogger.error("GenFds", FILE_NOT_FOUND, ExtraData=RegionData)\r