]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
beaglev_fire: Quote no_of_overlays in design test
authorSimon Glass <sjg@chromium.org>
Sun, 3 May 2026 20:49:22 +0000 (14:49 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 14 May 2026 21:39:09 +0000 (15:39 -0600)
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@chromium.org>
include/configs/beaglev_fire.h

index e3ee0f02f2d6ea64b2fb4f2a3dd7f727a82f1729..8724a71504c6ae28dde30cb45969f2e71c4044cb 100644 (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}; " \