mirror of https://github.com/acidanthera/audk.git
IntelFsp2Pkg-Tools: GenCfgOpt.py shouldn't include specific UPD name
PcdSerialIoUartDebugEnable UPD is platform specific and should not be included in generic GenCfgOpt.py script. Remove this and platform DSC should control the default value instead. Cc: Jiewen Yao <Jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
This commit is contained in:
parent
5df73e2cc8
commit
37431eb1fe
|
@ -289,7 +289,6 @@ class CGenCfgOpt:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.Debug = False
|
self.Debug = False
|
||||||
self.Error = ''
|
self.Error = ''
|
||||||
self.ReleaseMode = True
|
|
||||||
|
|
||||||
self._GlobalDataDef = """
|
self._GlobalDataDef = """
|
||||||
GlobalDataDef
|
GlobalDataDef
|
||||||
|
@ -318,13 +317,6 @@ EndList
|
||||||
self._FvDir = ''
|
self._FvDir = ''
|
||||||
self._MapVer = 0
|
self._MapVer = 0
|
||||||
|
|
||||||
def ParseBuildMode (self, OutputStr):
|
|
||||||
if "RELEASE_" in OutputStr:
|
|
||||||
self.ReleaseMode = True
|
|
||||||
if "DEBUG_" in OutputStr:
|
|
||||||
self.ReleaseMode = False
|
|
||||||
return
|
|
||||||
|
|
||||||
def ParseMacros (self, MacroDefStr):
|
def ParseMacros (self, MacroDefStr):
|
||||||
# ['-DABC=1', '-D', 'CFG_DEBUG=1', '-D', 'CFG_OUTDIR=Build']
|
# ['-DABC=1', '-D', 'CFG_DEBUG=1', '-D', 'CFG_OUTDIR=Build']
|
||||||
self._MacroDict = {}
|
self._MacroDict = {}
|
||||||
|
@ -815,9 +807,6 @@ EndList
|
||||||
TxtFd.write("%s.UnusedUpdSpace%d|%s0x%04X|0x%04X|{0}\n" % (Item['space'], SpaceIdx, Default, NextOffset - StartAddr, Offset - NextOffset))
|
TxtFd.write("%s.UnusedUpdSpace%d|%s0x%04X|0x%04X|{0}\n" % (Item['space'], SpaceIdx, Default, NextOffset - StartAddr, Offset - NextOffset))
|
||||||
SpaceIdx = SpaceIdx + 1
|
SpaceIdx = SpaceIdx + 1
|
||||||
NextOffset = Offset + Item['length']
|
NextOffset = Offset + Item['length']
|
||||||
if Item['cname'] == 'PcdSerialIoUartDebugEnable':
|
|
||||||
if self.ReleaseMode == False:
|
|
||||||
Item['value'] = 0x01
|
|
||||||
TxtFd.write("%s.%s|%s0x%04X|%s|%s\n" % (Item['space'],Item['cname'],Default,Item['offset'] - StartAddr,Item['length'],Item['value']))
|
TxtFd.write("%s.%s|%s0x%04X|%s|%s\n" % (Item['space'],Item['cname'],Default,Item['offset'] - StartAddr,Item['length'],Item['value']))
|
||||||
TxtFd.close()
|
TxtFd.close()
|
||||||
return 0
|
return 0
|
||||||
|
@ -1437,7 +1426,6 @@ def Main():
|
||||||
print "ERROR: Macro parsing failed !"
|
print "ERROR: Macro parsing failed !"
|
||||||
return 3
|
return 3
|
||||||
|
|
||||||
GenCfgOpt.ParseBuildMode(sys.argv[3])
|
|
||||||
FvDir = sys.argv[3]
|
FvDir = sys.argv[3]
|
||||||
if not os.path.exists(FvDir):
|
if not os.path.exists(FvDir):
|
||||||
os.makedirs(FvDir)
|
os.makedirs(FvDir)
|
||||||
|
|
Loading…
Reference in New Issue