[PATCH 4/6] beaglev_fire: Quote no_of_overlays in design test

Simon Glass sjg at chromium.org
Sun May 3 22:49:22 CEST 2026


On beaglev_fire, design_overlays gates an overlay-application loop
on:

    if test -n ${no_of_overlays}; then ...

The default state is "no overlays", i.e. no_of_overlays 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 loop.

Quote the variable so an unset no_of_overlays 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 <sjg at chromium.org>
---

 include/configs/beaglev_fire.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/beaglev_fire.h b/include/configs/beaglev_fire.h
index e3ee0f02f2d..8724a71504c 100644
--- a/include/configs/beaglev_fire.h
+++ b/include/configs/beaglev_fire.h
@@ -30,7 +30,7 @@
 
 #define BOOTENV_DESIGN_OVERLAYS \
 	"design_overlays=" \
-	"if test -n ${no_of_overlays}; then " \
+	"if test -n \"${no_of_overlays}\"; then " \
 		"setenv inc 1; " \
 		"setenv idx 0; " \
 		"fdt resize ${dtbo_size}; " \
-- 
2.43.0



More information about the U-Boot mailing list