|
5 | 5 |
|
6 | 6 |
|
7 | 7 | def main(): |
8 | | - arguments = [{'flags': ['--build-logging'], 'action': 'store_true', 'help': 'Enable additional build logging.'}, |
9 | | - {'flags': ['--no-build-logging'], 'action': 'store_false', 'help': 'Disable additional build logging.', 'dest': 'build_logging'}, |
10 | | - {'flags': ['-c', '--config'], 'action': 'store', 'help': 'Config file location.'}, |
11 | | - {'flags': ['--kernel-version', '--kver'], 'action': 'store', 'help': 'Set the kernel version.'}, |
12 | | - {'flags': ['--clean'], 'action': 'store_true', 'help': 'Enable build directory cleaning.'}, |
13 | | - {'flags': ['--no-clean'], 'action': 'store_false', 'help': 'Disable build directory cleaning.', 'dest': 'clean'}, |
14 | | - {'flags': ['--validate'], 'action': 'store_true', 'help': 'Enable config validation.'}, |
15 | | - {'flags': ['--no-validate'], 'action': 'store_false', 'help': 'Disable config validation.', 'dest': 'validate'}, |
16 | | - {'flags': ['--hostonly'], 'action': 'store_true', 'help': 'Enable hostonly mode, required for automatic kmod detection.'}, |
17 | | - {'flags': ['--no-hostonly'], 'action': 'store_false', 'help': 'Disable hostonly mode.', 'dest': 'hostonly'}, |
18 | | - {'flags': ['--lspci'], 'action': 'store_true', 'help': 'Use lspci to auto-detect kmods.', 'dest': 'kmod_autodetect_lspci'}, |
19 | | - {'flags': ['--no-lspci'], 'action': 'store_false', 'help': 'Do not use lspci to auto-detect kmods.', 'dest': 'kmod_autodetect_lspci'}, |
20 | | - {'flags': ['--lsmod'], 'action': 'store_true', 'help': 'Use lsmod to auto-detect kmods.', 'dest': 'kmod_autodetect_lsmod'}, |
21 | | - {'flags': ['--no-lsmod'], 'action': 'store_false', 'help': 'Do not use lsmod to auto-detect kmods.', 'dest': 'kmod_autodetect_lsmod'}, |
22 | | - {'flags': ['--firmware'], 'action': 'store_true', 'help': 'Include firmware files found with modinfo.', 'dest': 'kmod_pull_firmware'}, |
23 | | - {'flags': ['--no-firmware'], 'action': 'store_false', 'help': 'Exclude firmware files.', 'dest': 'kmod_pull_firmware'}, |
24 | | - {'flags': ['--autodetect-root'], 'action': 'store_true', 'help': 'Autodetect the root partition.'}, |
25 | | - {'flags': ['--no-autodetect-root'], 'action': 'store_false', 'help': 'Do not autodetect the root partition.', 'dest': 'autodetect_root'}, |
26 | | - {'flags': ['--autodetect-root-luks'], 'action': 'store_true', 'help': 'Autodetect LUKS volumes under the root partition.'}, |
27 | | - {'flags': ['--no-autodetect-root-luks'], 'action': 'store_false', 'help': 'Do not autodetect root LUKS volumes.', 'dest': 'autodetect_root_luks'}, |
28 | | - {'flags': ['--print-config'], 'action': 'store_true', 'help': 'Print the final config dict.'}, |
29 | | - {'flags': ['out_file'], 'action': 'store', 'help': 'Output file location.', 'nargs': '?'}] |
| 8 | + arguments = [{'flags': ['--build-logging'], 'action': 'store_true', 'help': 'enable additional build logging'}, |
| 9 | + {'flags': ['--no-build-logging'], 'action': 'store_false', 'help': 'disable additional build logging', 'dest': 'build_logging'}, |
| 10 | + {'flags': ['-c', '--config'], 'action': 'store', 'help': 'set the config file location'}, |
| 11 | + {'flags': ['--kernel-version', '--kver'], 'action': 'store', 'help': 'set the kernel version'}, |
| 12 | + {'flags': ['--clean'], 'action': 'store_true', 'help': 'clean the build directory at runtime'}, |
| 13 | + {'flags': ['--no-clean'], 'action': 'store_false', 'help': 'disable build directory cleaning', 'dest': 'clean'}, |
| 14 | + {'flags': ['--validate'], 'action': 'store_true', 'help': 'enable configuration validation'}, |
| 15 | + {'flags': ['--no-validate'], 'action': 'store_false', 'help': 'disable config validation', 'dest': 'validate'}, |
| 16 | + {'flags': ['--hostonly'], 'action': 'store_true', 'help': 'enable hostonly mode, required for automatic kmod detection'}, |
| 17 | + {'flags': ['--no-hostonly'], 'action': 'store_false', 'help': 'disable hostonly mode', 'dest': 'hostonly'}, |
| 18 | + {'flags': ['--lspci'], 'action': 'store_true', 'help': 'use lspci to auto-detect kmods', 'dest': 'kmod_autodetect_lspci'}, |
| 19 | + {'flags': ['--no-lspci'], 'action': 'store_false', 'help': 'do not use lspci to auto-detect kmods', 'dest': 'kmod_autodetect_lspci'}, |
| 20 | + {'flags': ['--lsmod'], 'action': 'store_true', 'help': 'use lsmod to auto-detect kmods', 'dest': 'kmod_autodetect_lsmod'}, |
| 21 | + {'flags': ['--no-lsmod'], 'action': 'store_false', 'help': 'do not use lsmod to auto-detect kmods', 'dest': 'kmod_autodetect_lsmod'}, |
| 22 | + {'flags': ['--firmware'], 'action': 'store_true', 'help': 'include firmware files found with modinfo', 'dest': 'kmod_pull_firmware'}, |
| 23 | + {'flags': ['--no-firmware'], 'action': 'store_false', 'help': 'exclude firmware files', 'dest': 'kmod_pull_firmware'}, |
| 24 | + {'flags': ['--autodetect-root'], 'action': 'store_true', 'help': 'autodetect the root partition'}, |
| 25 | + {'flags': ['--no-autodetect-root'], 'action': 'store_false', 'help': 'do not autodetect the root partition', 'dest': 'autodetect_root'}, |
| 26 | + {'flags': ['--autodetect-root-luks'], 'action': 'store_true', 'help': 'autodetect LUKS volumes under the root partition'}, |
| 27 | + {'flags': ['--no-autodetect-root-luks'], 'action': 'store_false', 'help': 'do not autodetect root LUKS volumes', 'dest': 'autodetect_root_luks'}, |
| 28 | + {'flags': ['--print-config'], 'action': 'store_true', 'help': 'print the final config dict'}, |
| 29 | + {'flags': ['out_file'], 'action': 'store', 'help': 'set the output image location', 'nargs': '?'}] |
30 | 30 |
|
31 | 31 | args, logger = get_args_n_logger(package=__package__, description='MicrogRAM disk initramfs generator', arguments=arguments, drop_default=True) |
32 | 32 | kwargs = get_kwargs_from_args(args, logger=logger) |
|
0 commit comments