From 93d7dc20e80e33ace9b871de44877548642f86cb Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 3 May 2026 14:49:24 -0600 Subject: aristainetos2: Quote rescue_reason in rescueboot test The rescueboot script optionally runs a per-board rescue_reason hook with: if test -n ${rescue_reason}; then run rescue_reason; fi; The default state is "no rescue reason script", i.e. rescue_reason unset. The expression then expands to 'test -n' with no operand and relies on a U-Boot 'test' quirk that treats a missing operand as false to skip the run. Quote the variable so an unset rescue_reason expands to 'test -n ""' and the emptiness check is explicit. Fixes: 8b0619579b22 ("cmd: test: fix handling of single-argument form of test") Signed-off-by: Simon Glass Reviewed-by: Heiko Schocher --- include/configs/aristainetos2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h index 8a66b1275df..2078ebc5282 100644 --- a/include/configs/aristainetos2.h +++ b/include/configs/aristainetos2.h @@ -211,7 +211,7 @@ "${pubkey}\0" \ "rescueboot=echo Booting rescue system ...; " \ "run addmtd addmisc;" \ - "if test -n ${rescue_reason}; then run rescue_reason;fi;" \ + "if test -n \"${rescue_reason}\"; then run rescue_reason;fi;" \ "run boot_board_type;" \ "if bootm ${fit_addr_r}; then ; " \ "else " \ -- cgit v1.3.1