From fc6405cfab224d6e72577b70174fcea8908fe6fd Mon Sep 17 00:00:00 2001 From: Andrew Pattison Date: Thu, 21 Nov 2019 21:49:52 +0000 Subject: [PATCH] Correct help text per timg236's comments --- rpi-eeprom-config | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/rpi-eeprom-config b/rpi-eeprom-config index 0acf0e1..bab1e2e 100755 --- a/rpi-eeprom-config +++ b/rpi-eeprom-config @@ -97,10 +97,23 @@ class BootloaderImage(object): sys.stdout.write(config_bytes) def main(): - parser = argparse.ArgumentParser('RPI EEPROM config tool') - parser.add_argument('--config', help='Insert new bootloader config into EEPROM image. CONFIG specifies the file containing the new config.') - parser.add_argument('--out', help='Extract current bootloader config from EEPROM image. OUT specifies the file to put the config into.') - parser.add_argument('eeprom', help='Name of EEPROM image file (e.g. pieeprom.bin)') + parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, \ + description='RPI EEPROM config tool. \ +\n\nThere are 3 operating modes: \ +\n\n1. Output the bootloader configuration stored in an EEPROM image file to \ +the screen (STDOUT): specify only the name of an EEPROM image file using the \ +EEPROM option. \ +\n\n2. Output the bootloader configuration stored in an EEPROM image file to a \ +file: specify the EEPROM image file using the EEPROM option, and the output file\ +using the --out option. \ +\n\n3. Insert a new bootloader configuration into an EEPROM image file: specify \ +the EEPROM image file using the EEPROM option, the bootloader configuration file\ +using the --config option, and the name to use for the new file which will be a \ +combination of the original EEPROM image file, along with the new bootloader \ +configuration.') + parser.add_argument('--config', help='Filename of new bootloader config') + parser.add_argument('--out', help='Name of output file') + parser.add_argument('EEPROM', help='EEPROM filename (pieeprom.bin)') args = parser.parse_args() image = BootloaderImage(args.eeprom, args.out) @@ -110,4 +123,4 @@ def main(): image.read() if __name__ == '__main__': - main() + main() \ No newline at end of file