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

Function main

BaseTools/Source/Python/BPDG/BPDG.py:43–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41# @retval 1 Tool failed
42#
43def main():
44 global Options, Args
45
46 # Initialize log system
47 EdkLogger.Initialize()
48 Options, Args = MyOptionParser()
49
50 ReturnCode = 0
51
52 if Options.opt_verbose:
53 EdkLogger.SetLevel(EdkLogger.VERBOSE)
54 elif Options.opt_quiet:
55 EdkLogger.SetLevel(EdkLogger.QUIET)
56 elif Options.debug_level is not None:
57 EdkLogger.SetLevel(Options.debug_level + 1)
58 else:
59 EdkLogger.SetLevel(EdkLogger.INFO)
60
61 if Options.bin_filename is None:
62 EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -o option to specify the file name for the VPD binary file")
63 if Options.filename is None:
64 EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -m option to specify the file name for the mapping file")
65
66 Force = False
67 if Options.opt_force is not None:
68 Force = True
69
70 if (Args[0] is not None) :
71 StartBpdg(Args[0], Options.filename, Options.bin_filename, Force)
72 else :
73 EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please specify the file which contain the VPD pcd info.",
74 None)
75
76 return ReturnCode
77
78
79## Parse command line options

Callers 1

BPDG.pyFile · 0.70

Calls 4

StartBpdgFunction · 0.85
InitializeMethod · 0.80
MyOptionParserFunction · 0.70
errorMethod · 0.45

Tested by

no test coverage detected