2009-07-17 09:10:31 +00:00
|
|
|
## @file
|
|
|
|
|
# process OptionROM generation from FILE statement
|
|
|
|
|
#
|
2018-07-05 17:40:04 +08:00
|
|
|
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
2009-07-17 09:10:31 +00:00
|
|
|
#
|
2019-04-03 16:03:11 -07:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2009-07-17 09:10:31 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
# Import Modules
|
|
|
|
|
#
|
2018-10-15 08:27:53 +08:00
|
|
|
from __future__ import absolute_import
|
2014-08-15 03:06:48 +00:00
|
|
|
import Common.LongFilePathOs as os
|
2009-07-17 09:10:31 +00:00
|
|
|
|
2018-07-13 18:18:33 +08:00
|
|
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
2018-07-05 17:40:04 +08:00
|
|
|
##
|
2009-07-17 09:10:31 +00: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 16:18:27 +08:00
|
|
|
def GenFfs(self, Dict = None, IsMakefile=False):
|
|
|
|
|
|
|
|
|
|
if Dict is None:
|
|
|
|
|
Dict = {}
|
2018-07-05 17:40:04 +08:00
|
|
|
|
2018-03-27 04:25:43 +08:00
|
|
|
if self.FileName is not None:
|
2009-07-17 09:10:31 +00:00
|
|
|
self.FileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)
|
2018-07-05 17:40:04 +08:00
|
|
|
|
2009-07-17 09:10:31 +00:00
|
|
|
return self.FileName
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|