aboutsummaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorPiotr Kubik <piotr.kubik@iopsys.eu>2023-11-24 17:30:46 +0100
committerTom Rini <trini@konsulko.com>2023-12-20 10:46:54 -0500
commit7481632b192f61b5bcb028c885a460d8b9c2731c (patch)
treed9324601c3458c8d2efc1ea41d83ffbdb40f75fe /boot
parent785834d62ef3c4121601a4a68a032d96100b7475 (diff)
downloadu-boot-7481632b192f61b5bcb028c885a460d8b9c2731c.zip
u-boot-7481632b192f61b5bcb028c885a460d8b9c2731c.tar.gz
u-boot-7481632b192f61b5bcb028c885a460d8b9c2731c.tar.bz2
bootm: Fix flags used for bootargs string substitution
Commit 51bb33846ad2 ("bootm: Support string substitution in bootargs") introduced a feature of bootargs string substitution and changed a flag used in bootm_process_cmdline_env() call to be either true or false. With this flag value, condition in bootm_process_cmdline() `if (flags & BOOTM_CL_SUBST)` is never true and process_subst() is never called. Add a simple test to verify if substitution works OK. Signed-off-by: Piotr Kubik <piotr.kubik@iopsys.eu> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/bootm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index 301cfde..4cf66cc 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -1103,7 +1103,11 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
if (!ret && (states & BOOTM_STATE_OS_BD_T))
ret = boot_fn(BOOTM_STATE_OS_BD_T, argc, argv, images);
if (!ret && (states & BOOTM_STATE_OS_PREP)) {
- ret = bootm_process_cmdline_env(images->os.os == IH_OS_LINUX);
+ int flags = 0;
+ /* For Linux OS do all substitutions at console processing */
+ if (images->os.os == IH_OS_LINUX)
+ flags = BOOTM_CL_ALL;
+ ret = bootm_process_cmdline_env(flags);
if (ret) {
printf("Cmdline setup failed (err=%d)\n", ret);
ret = CMD_RET_FAILURE;