MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / StartBpdg

Function StartBpdg

BaseTools/Source/Python/BPDG/BPDG.py:129–147  ·  view source on GitHub ↗
(InputFileName, MapFileName, VpdFileName, Force)

Source from the content-addressed store, hash-verified

127# @param Force Override the exist Vpdfile or not.
128#
129def StartBpdg(InputFileName, MapFileName, VpdFileName, Force):
130 if os.path.exists(VpdFileName) and not Force:
131 print("\nFile %s already exist, Overwrite(Yes/No)?[Y]: " % VpdFileName)
132 choice = sys.stdin.readline()
133 if choice.strip().lower() not in ['y', 'yes', '']:
134 return
135
136 GenVPD = GenVpd.GenVPD (InputFileName, MapFileName, VpdFileName)
137
138 EdkLogger.info('%-24s = %s' % ("VPD input data file: ", InputFileName))
139 EdkLogger.info('%-24s = %s' % ("VPD output map file: ", MapFileName))
140 EdkLogger.info('%-24s = %s' % ("VPD output binary file: ", VpdFileName))
141
142 GenVPD.ParserInputFile()
143 GenVPD.FormatFileLine()
144 GenVPD.FixVpdOffset()
145 GenVPD.GenerateVpdFile(MapFileName, VpdFileName)
146
147 EdkLogger.info("- Vpd pcd fixed done! -")
148
149if __name__ == '__main__':
150 try:

Callers 1

mainFunction · 0.85

Calls 5

ParserInputFileMethod · 0.95
FormatFileLineMethod · 0.95
FixVpdOffsetMethod · 0.95
GenerateVpdFileMethod · 0.95
printFunction · 0.85

Tested by

no test coverage detected