beaglev_fire: Quote no_of_overlays in design test

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: 8b0619579b ("cmd: test: fix handling of single-argument form of test")
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2026-05-03 14:49:22 -06:00
committed by Tom Rini
parent 6b109a1304
commit 2120834c25

View File

@@ -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}; " \