board: phycore-imx93: env: Add option to disable bootenv.txt import
authorPrimoz Fiser <primoz.fiser@norik.com>
Thu, 10 Apr 2025 08:41:20 +0000 (10:41 +0200)
committerFabio Estevam <festevam@gmail.com>
Fri, 11 Apr 2025 13:00:59 +0000 (10:00 -0300)
Add support for disabling external environment import (bootenv.txt) by
setting the ${no_bootenv} environment variable.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
board/phytec/phycore_imx93/phycore_imx93.env

index 52c234a..d0694f2 100644 (file)
@@ -20,8 +20,10 @@ loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
 loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
 mmcboot=
        echo Booting from mmc ...;
-       if run mmc_load_bootenv; then
-               env import -t ${bootenv_addr_r} ${filesize};
+       if test ${no_bootenv} = 0; then
+               if run mmc_load_bootenv; then
+                       env import -t ${bootenv_addr_r} ${filesize};
+               fi;
        fi;
        run mmcargs;
        if run loadfdt; then
@@ -41,8 +43,10 @@ netboot=
        else
                setenv get_cmd tftp;
        fi;
-       if run net_load_bootenv; then
-               env import -t ${bootenv_addr_r} ${filesize};
+       if test ${no_bootenv} = 0; then
+               if run net_load_bootenv; then
+                       env import -t ${bootenv_addr_r} ${filesize};
+               fi;
        fi;
        ${get_cmd} ${loadaddr} ${image};
        if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then