@@ -29,8 +29,7 @@ def cli_from_config(config, terminal_choice):
if terminal_choice != "none" and name:
# TODO if raw mode
# cli.extend(["--parameter", f"{terminal}.mode=raw"])
- # TODO put name into terminal title
- cli.extend(["--parameter", f"{terminal}.terminal_command={terminals[terminal_choice].command}"])
+ cli.extend(["--parameter", f"{terminal}.terminal_command={terminals[terminal_choice].command.format(name=name)}"])
else:
# Disable terminal
cli.extend(["--parameter", f"{terminal}.start_telnet=0"])
@@ -53,7 +53,7 @@ class Terminals:
terminals = Terminals()
# TODO: option to switch between telnet and netcat
connect_command = "telnet localhost %port"
-terminals.add_terminal(2, "tmux", f"tmux new-window -n \"%title\" \"{connect_command}\"")
-terminals.add_terminal(2, "gnome-terminal", f"gnome-terminal --window --title \"%title\" --command \"{connect_command}\"")
-terminals.add_terminal(1, "xterm", f"xterm -title \"%title\" -e {connect_command}")
+terminals.add_terminal(2, "tmux", f"tmux new-window -n \"{{name}} - %title\" \"{connect_command}\"")
+terminals.add_terminal(2, "gnome-terminal", f"gnome-terminal --window --title \"{{name}} - %title\" --command \"{connect_command}\"")
+terminals.add_terminal(1, "xterm", f"xterm -title \"{{name}} - %title\" -e {connect_command}")
terminals.add_terminal(0, "none", None)
Currently, terminal title is %title, which is populated with the component name by the FVP. This commit prepends it with {name}, which is already a mandatory parameter for terminals to be launched. E.g. FVP_TERMINALS[terminal_uart] ?= "My Name" will launch a terminal with a title "My Name - terminal_uart". Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com> --- meta-arm/lib/fvp/runner.py | 3 +-- meta-arm/lib/fvp/terminal.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-)