summaryrefslogtreecommitdiff
path: root/include/env
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-05-14 15:39:22 -0600
committerTom Rini <[email protected]>2026-05-14 15:39:22 -0600
commit9a13d08732509fd31e9070989570e6d6bd2ad007 (patch)
tree0489ed69b340eb610c676f1214e9218294cef0d0 /include/env
parente3e651c480c46b332f16a7555b97c6c6fd640a40 (diff)
parent93d7dc20e80e33ace9b871de44877548642f86cb (diff)
Merge patch series "test: Quote variables in 'test -n' expressions across boards"
Simon Glass <[email protected]> says: Several boards use 'test -n ${var}' (unquoted) in env scripts to detect an empty variable and trigger a fallback or skip a hook. That works only because of a U-Boot 'test' quirk where calls with argc < 3 returned false; an empty variable made the expression 'test -n' (one operand) and hit that path. Commit 8b0619579b22 ("cmd: test: fix handling of single-argument form of test") aligned 'test' with POSIX so those expressions flipped to true. f7e7c55e53e8 ("cmd: test: add bug-compatibility special case for 'test -n'") restored the old behaviour for the exact 'test -n' (one arg) case, so the boards are not broken at runtime today, but the reliance on a bug-compat path isn't great. This series updates various boards to quote each affected variable so the emptiness check is explicit and does not depend on the special-case path. Each commit carries a Fixes: tag pointing at 8b0619579b22 Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/env')
-rw-r--r--include/env/ti/ti_common.env2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env
index 62b93eb25c4..e6ceaa17adc 100644
--- a/include/env/ti/ti_common.env
+++ b/include/env/ti/ti_common.env
@@ -24,7 +24,7 @@ get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
bootcmd_ti_mmc=
run init_${boot};
- if test -n ${board_init}; then
+ if test -n "${board_init}"; then
echo Running board_init ...;
run board_init;
fi;