130fdf1140b8d1ce93f3821d986fa165552023440lgao## @file 230fdf1140b8d1ce93f3821d986fa165552023440lgao# process OptionROM generation from FILE statement 330fdf1140b8d1ce93f3821d986fa165552023440lgao# 41be2ed90a20618d71ddf34b8a07d038da0b36854Hess Chen# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 530fdf1140b8d1ce93f3821d986fa165552023440lgao# 640d841f6a8f84e75409178e19e69b95e01bada0flgao# This program and the accompanying materials 730fdf1140b8d1ce93f3821d986fa165552023440lgao# are licensed and made available under the terms and conditions of the BSD License 830fdf1140b8d1ce93f3821d986fa165552023440lgao# which accompanies this distribution. The full text of the license may be found at 930fdf1140b8d1ce93f3821d986fa165552023440lgao# http://opensource.org/licenses/bsd-license.php 1030fdf1140b8d1ce93f3821d986fa165552023440lgao# 1130fdf1140b8d1ce93f3821d986fa165552023440lgao# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 1230fdf1140b8d1ce93f3821d986fa165552023440lgao# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 1330fdf1140b8d1ce93f3821d986fa165552023440lgao# 1430fdf1140b8d1ce93f3821d986fa165552023440lgao 1530fdf1140b8d1ce93f3821d986fa165552023440lgao## 1630fdf1140b8d1ce93f3821d986fa165552023440lgao# Import Modules 1730fdf1140b8d1ce93f3821d986fa165552023440lgao# 181be2ed90a20618d71ddf34b8a07d038da0b36854Hess Chenimport Common.LongFilePathOs as os 1930fdf1140b8d1ce93f3821d986fa165552023440lgao 2030fdf1140b8d1ce93f3821d986fa165552023440lgaofrom GenFdsGlobalVariable import GenFdsGlobalVariable 2130fdf1140b8d1ce93f3821d986fa165552023440lgao## 2230fdf1140b8d1ce93f3821d986fa165552023440lgao# 2330fdf1140b8d1ce93f3821d986fa165552023440lgao# 2430fdf1140b8d1ce93f3821d986fa165552023440lgaoclass OptRomFileStatement: 2530fdf1140b8d1ce93f3821d986fa165552023440lgao ## The constructor 2630fdf1140b8d1ce93f3821d986fa165552023440lgao # 2730fdf1140b8d1ce93f3821d986fa165552023440lgao # @param self The object pointer 2830fdf1140b8d1ce93f3821d986fa165552023440lgao # 2930fdf1140b8d1ce93f3821d986fa165552023440lgao def __init__(self): 3030fdf1140b8d1ce93f3821d986fa165552023440lgao self.FileName = None 3130fdf1140b8d1ce93f3821d986fa165552023440lgao self.FileType = None 3230fdf1140b8d1ce93f3821d986fa165552023440lgao self.OverrideAttribs = None 3330fdf1140b8d1ce93f3821d986fa165552023440lgao 3430fdf1140b8d1ce93f3821d986fa165552023440lgao ## GenFfs() method 3530fdf1140b8d1ce93f3821d986fa165552023440lgao # 3630fdf1140b8d1ce93f3821d986fa165552023440lgao # Generate FFS 3730fdf1140b8d1ce93f3821d986fa165552023440lgao # 3830fdf1140b8d1ce93f3821d986fa165552023440lgao # @param self The object pointer 3930fdf1140b8d1ce93f3821d986fa165552023440lgao # @param Dict dictionary contains macro and value pair 4030fdf1140b8d1ce93f3821d986fa165552023440lgao # @retval string Generated FFS file name 4130fdf1140b8d1ce93f3821d986fa165552023440lgao # 4230fdf1140b8d1ce93f3821d986fa165552023440lgao def GenFfs(self, Dict = {}): 4330fdf1140b8d1ce93f3821d986fa165552023440lgao 4430fdf1140b8d1ce93f3821d986fa165552023440lgao if self.FileName != None: 4530fdf1140b8d1ce93f3821d986fa165552023440lgao self.FileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName) 4630fdf1140b8d1ce93f3821d986fa165552023440lgao 4730fdf1140b8d1ce93f3821d986fa165552023440lgao return self.FileName 4830fdf1140b8d1ce93f3821d986fa165552023440lgao 4930fdf1140b8d1ce93f3821d986fa165552023440lgao 5030fdf1140b8d1ce93f3821d986fa165552023440lgao 51