]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: phytec: phycore-imx93: Set boot_targets dynamically
authorPrimoz Fiser <primoz.fiser@norik.com>
Fri, 5 Dec 2025 11:10:43 +0000 (12:10 +0100)
committerFabio Estevam <festevam@nabladev.com>
Sat, 6 Dec 2025 18:26:07 +0000 (15:26 -0300)
Set boot_targets environment variable dynamically, so that when booting
from SD-card, boot binaries are also preferably fetched from the SD-card
by default. If the user decides to set their own boot_targets, we should
not overwrite them.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
board/phytec/phycore_imx93/phycore-imx93.c

index c6a4e923b074741675936c013f75193e1ecf80f3..cfc6d91f20f2dad1e9ce517ce0e750f6226ed4f8 100644 (file)
@@ -38,6 +38,8 @@ int board_late_init(void)
        switch (get_boot_device()) {
        case SD2_BOOT:
                env_set_ulong("mmcdev", 1);
+               if (!env_get("boot_targets"))
+                       env_set("boot_targets", "mmc1 mmc0 ethernet");
                break;
        case MMC1_BOOT:
                env_set_ulong("mmcdev", 0);