Skip to content

Commit afa5822

Browse files
committed
rpi-eeprom-config: Add --debug flag to args
1 parent a2fb4ed commit afa5822

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rpi-eeprom-config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ class BootloaderImage(object):
463463
sys.stdout.write(config_bytes)
464464

465465
def main():
466+
global DEBUG
466467
"""
467468
Utility for reading and writing the configuration file in the
468469
Raspberry Pi bootloader EEPROM image.
@@ -548,8 +549,10 @@ See 'rpi-eeprom-update -h' for more information about the available EEPROM image
548549
parser.add_argument('-b', '--bootcode', help='Signed boot 2712 only. The name of the customer signed bootcode.bin file to store in the EEPROM', required=False)
549550
parser.add_argument('-t', '--timestamp', help='Set the timestamp in the EEPROM image file', required=False)
550551
parser.add_argument('--cacertder', help='The name of a CA Certificate DER encoded file to store in the EEPROM', required=False)
552+
parser.add_argument('--debug', help='Debug logging for this tool', action='store_true', required=False)
551553
parser.add_argument('eeprom', nargs='?', help='Name of EEPROM file to use as input')
552554
args = parser.parse_args()
555+
DEBUG = args.debug
553556

554557
if (args.edit or args.apply is not None) and os.getuid() != 0:
555558
exit_error("--edit/--apply must be run as root")

0 commit comments

Comments
 (0)