diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-12 09:04:35 -0600 |
---|---|---|
committer | Bin Meng <bmeng@tinylab.org> | 2023-07-16 23:13:17 +0800 |
commit | d42243fe21c8847cd5c6db4e11b2aee660448451 (patch) | |
tree | 194d2faca5744bb699ebb5819cedc4d28ab78fb4 /cmd | |
parent | f4a91655c36a1a5fad2ea879ff3ab9217cd21337 (diff) | |
download | u-boot-d42243fe21c8847cd5c6db4e11b2aee660448451.tar.gz u-boot-d42243fe21c8847cd5c6db4e11b2aee660448451.tar.bz2 u-boot-d42243fe21c8847cd5c6db4e11b2aee660448451.zip |
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 <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootflow.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/bootflow.c b/cmd/bootflow.c index ddb168c703..f33db7be5f 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; } |