1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-30 00:21:17 +00:00

runfvp: add --dry-run option

Add a --dry-run option to scripts/runfvp to print the constructed
FVP command line and exit without launching the model.

This is useful for checking parameters and reusing them with different
FVP binaries.

Signed-off-by: Michael Safwat <michael.safwat@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Michael Safwat
2026-05-28 09:23:57 +01:00
committed by Jon Mason
parent 3c07303388
commit 6ab14ea640
+7
View File
@@ -27,6 +27,7 @@ def parse_args(arguments):
group.add_argument("-t", "--terminals", choices=terminals.all_terminals(), default=terminals.preferred_terminal(), help=f"Automatically start terminals (default: %(default)s). Available terminals are ({available_terminals})")
group.add_argument("-c", "--console", action="store_true", help="Attach the first uart to stdin/stdout")
parser.add_argument("--verbose", action="store_true", help="Output verbose logging")
parser.add_argument("--dry-run", action="store_true", help="Print the FVP command and exit")
parser.usage = f"{parser.format_usage().strip()} -- [ arguments passed to FVP ]"
# TODO option for telnet vs netcat
@@ -54,6 +55,12 @@ def start_fvp(args, fvpconf, extra_args):
fvp = runner.FVPRunner(logger)
try:
if args.dry_run:
config = conffile.load(fvpconf)
cli = runner.cli_from_config(config, args.terminals) + extra_args
print(runner.shlex_join(cli))
return 0
if args.terminals:
if not terminal.terminals[args.terminals].is_ready():
return 1