From 33ebcb468109c40ef0dce262be00a4c161265b90 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 12 Jul 2023 09:04:42 -0600 Subject: bootstd: Support automatically setting Linux parameters Some Linux parameters can be set automatically by U-Boot, if it knows the device being used. For example, since U-Boot knows the serial console being used, it can add parameters for earlycon and console. Add support for this. Note that this is an experimental feature and we will see how useful it turns out to be. It is very handy for ChromeOS, since otherwise it is very difficult to manually determine the UART address or port number, particularly in a script. Provide an example of how this is used with ChromeOS. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- cmd/bootflow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/bootflow.c b/cmd/bootflow.c index ab00e4a19e1..c0aa4f84fe8 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -474,6 +474,9 @@ static int do_bootflow_cmdline(struct cmd_tbl *cmdtp, int flag, int argc, if (ret >= 0) printf("%.*s\n", ret, val); break; + case 'a': /* auto */ + ret = bootflow_cmdline_auto(bflow, arg); + break; } switch (ret) { case -E2BIG: @@ -508,7 +511,7 @@ static char bootflow_help_text[] = "bootflow info [-d] - show info on current bootflow (-d dump bootflow)\n" "bootflow boot - boot current bootflow (or first available if none selected)\n" "bootflow menu [-t] - show a menu of available bootflows\n" - "bootflow cmdline [set|get|clear|delete] [] - update cmdline"; + "bootflow cmdline [set|get|clear|delete|auto] [] - update cmdline"; #else "scan - boot first available bootflow\n"; #endif -- cgit v1.2.3