2009-07-17 11:10:31 +02:00
|
|
|
## @file
|
|
|
|
# process OptionROM generation from FILE statement
|
|
|
|
#
|
2018-07-05 11:40:04 +02:00
|
|
|
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
2009-07-17 11:10:31 +02:00
|
|
|
#
|
2019-04-04 01:03:11 +02:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2009-07-17 11:10:31 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
##
|
|
|
|
# Import Modules
|
|
|
|
#
|
2018-10-15 02:27:53 +02:00
|
|
|
from __future__ import absolute_import
|
2014-08-15 05:06:48 +02:00
|
|
|
import Common.LongFilePathOs as os
|
2009-07-17 11:10:31 +02:00
|
|
|
|
2018-07-13 12:18:33 +02:00
|
|
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
2018-07-05 11:40:04 +02:00
|
|
|
##
|
2009-07-17 11:10:31 +02:00
|
|
|
#
|
|
|
|
#
|
|
|
|
class OptRomFileStatement:
|
|
|
|
## The constructor
|
|
|
|
#
|
|
|
|
# @param self The object pointer
|
|
|
|
#
|
|
|
|
def __init__(self):
|
|
|
|
self.FileName = None
|
|
|
|
self.FileType = None
|
|
|
|
self.OverrideAttribs = None
|
|
|
|
|
|
|
|
## GenFfs() method
|
|
|
|
#
|
|
|
|
# Generate FFS
|
|
|
|
#
|
|
|
|
# @param self The object pointer
|
|
|
|
# @param Dict dictionary contains macro and value pair
|
|
|
|
# @retval string Generated FFS file name
|
|
|
|
#
|
2019-09-12 10:18:27 +02:00
|
|
|
def GenFfs(self, Dict = None, IsMakefile=False):
|
|
|
|
|
|
|
|
if Dict is None:
|
|
|
|
Dict = {}
|
2018-07-05 11:40:04 +02:00
|
|
|
|
2018-03-26 22:25:43 +02:00
|
|
|
if self.FileName is not None:
|
2009-07-17 11:10:31 +02:00
|
|
|
self.FileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)
|
2018-07-05 11:40:04 +02:00
|
|
|
|
2009-07-17 11:10:31 +02:00
|
|
|
return self.FileName
|
|
|
|
|
|
|
|
|
|
|
|
|