summaryrefslogtreecommitdiff
path: root/cmd/bootflow.c
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2023-07-12 09:04:42 -0600
committerBin Meng <[email protected]>2023-07-17 13:38:35 +0800
commit33ebcb468109c40ef0dce262be00a4c161265b90 (patch)
tree7d2a0d0fd11a2d8c9329d2e83fb3f76ed8a39600 /cmd/bootflow.c
parent63b7ccbf9ffe9e79a6762a94eec74c8159f11a14 (diff)
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 <[email protected]> Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'cmd/bootflow.c')
-rw-r--r--cmd/bootflow.c5
1 files changed, 4 insertions, 1 deletions
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] <param> [<value>] - update cmdline";
+ "bootflow cmdline [set|get|clear|delete|auto] <param> [<value>] - update cmdline";
#else
"scan - boot first available bootflow\n";
#endif