summaryrefslogtreecommitdiff
path: root/cmd/bootflow.c
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2023-07-12 09:04:35 -0600
committerBin Meng <[email protected]>2023-07-16 23:13:17 +0800
commitd42243fe21c8847cd5c6db4e11b2aee660448451 (patch)
tree194d2faca5744bb699ebb5819cedc4d28ab78fb4 /cmd/bootflow.c
parentf4a91655c36a1a5fad2ea879ff3ab9217cd21337 (diff)
bootstd: Use the bootargs env var for changing the cmdline
The "bootargs" environment variable is used to set the command-line arguments to pass to the OS. Use this same mechanism with bootstd as well. When the variable is updated, it is written to the current bootflow. When the current bootflow is updated, the environment variable is updated too. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'cmd/bootflow.c')
-rw-r--r--cmd/bootflow.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index ddb168c7039..f33db7be5f2 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -288,6 +288,12 @@ static int do_bootflow_select(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
std->cur_bootflow = found;
+ if (IS_ENABLED(CONFIG_BOOTSTD_FULL)) {
+ if (env_set("bootargs", found->cmdline)) {
+ printf("Cannot set bootargs\n");
+ return CMD_RET_FAILURE;
+ }
+ }
return 0;
}