rpi-eeprom-config: Add --debug flag to args

This commit is contained in:
Tim Gover
2024-04-17 08:55:20 +01:00
committed by Tim Gover
parent a2fb4ed28d
commit afa5822e03

View File

@@ -463,6 +463,7 @@ class BootloaderImage(object):
sys.stdout.write(config_bytes) sys.stdout.write(config_bytes)
def main(): def main():
global DEBUG
""" """
Utility for reading and writing the configuration file in the Utility for reading and writing the configuration file in the
Raspberry Pi bootloader EEPROM image. Raspberry Pi bootloader EEPROM image.
@@ -548,8 +549,10 @@ See 'rpi-eeprom-update -h' for more information about the available EEPROM image
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) 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)
parser.add_argument('-t', '--timestamp', help='Set the timestamp in the EEPROM image file', required=False) parser.add_argument('-t', '--timestamp', help='Set the timestamp in the EEPROM image file', required=False)
parser.add_argument('--cacertder', help='The name of a CA Certificate DER encoded file to store in the EEPROM', required=False) parser.add_argument('--cacertder', help='The name of a CA Certificate DER encoded file to store in the EEPROM', required=False)
parser.add_argument('--debug', help='Debug logging for this tool', action='store_true', required=False)
parser.add_argument('eeprom', nargs='?', help='Name of EEPROM file to use as input') parser.add_argument('eeprom', nargs='?', help='Name of EEPROM file to use as input')
args = parser.parse_args() args = parser.parse_args()
DEBUG = args.debug
if (args.edit or args.apply is not None) and os.getuid() != 0: if (args.edit or args.apply is not None) and os.getuid() != 0:
exit_error("--edit/--apply must be run as root") exit_error("--edit/--apply must be run as root")