]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
config_distro_bootcmd: remove booting environment variables from SPL environment
authorTroy Kisky <troykiskyboundary@gmail.com>
Mon, 13 Mar 2023 21:31:34 +0000 (14:31 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 10 May 2023 20:45:42 +0000 (16:45 -0400)
SPL environments don't need commands that they can never use.
Avoid errors with CONFIG_IS_ENABLED conversions by skipping them now.

Signed-off-by: Troy Kisky <troykiskyboundary@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/config_distro_bootcmd.h

index 9d2a225e7eb34d04812bd22a7538a59d5a1f3364..2a136b96a6d9fe3d7731c4cb7e042e06f0de39ff 100644 (file)
        #devtypel "_boot=" \
        BOOTENV_SHARED_BLKDEV_BODY(devtypel)
 
+#define BOOTENV_DEV_BLKDEV_NONE(devtypeu, devtypel, instance)
+
 #define BOOTENV_DEV_BLKDEV(devtypeu, devtypel, instance) \
        "bootcmd_" #devtypel #instance "=" \
                "devnum=" #instance "; " \
                "run " #devtypel "_boot\0"
 
+#define BOOTENV_DEV_NAME_BLKDEV_NONE(devtypeu, devtypel, instance)
+
 #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \
        #devtypel #instance " "
 
 #define BOOTENV_SHARED_MMC     BOOTENV_SHARED_BLKDEV(mmc)
 #define BOOTENV_DEV_MMC                BOOTENV_DEV_BLKDEV
 #define BOOTENV_DEV_NAME_MMC   BOOTENV_DEV_NAME_BLKDEV
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_SHARED_MMC
+#define BOOTENV_DEV_MMC                BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_MMC   BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_SHARED_MMC
 #define BOOTENV_DEV_MMC \
 #define BOOTENV_SHARED_SATA    BOOTENV_SHARED_BLKDEV(sata)
 #define BOOTENV_DEV_SATA       BOOTENV_DEV_BLKDEV
 #define BOOTENV_DEV_NAME_SATA  BOOTENV_DEV_NAME_BLKDEV
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_SHARED_SATA
+#define BOOTENV_DEV_SATA       BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_SATA  BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_SHARED_SATA
 #define BOOTENV_DEV_SATA \
                BOOTENV_SHARED_BLKDEV_BODY(usb)
 #define BOOTENV_DEV_USB                BOOTENV_DEV_BLKDEV
 #define BOOTENV_DEV_NAME_USB   BOOTENV_DEV_NAME_BLKDEV
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_RUN_NET_USB_START
+#define BOOTENV_SHARED_USB
+#define BOOTENV_DEV_USB                BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_USB   BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_RUN_NET_USB_START
 #define BOOTENV_SHARED_USB
                "\0"
 #define BOOTENV_DEV_NAME_DHCP(devtypeu, devtypel, instance) \
        "dhcp "
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_DEV_DHCP       BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_DHCP  BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_DEV_DHCP \
        BOOT_TARGET_DEVICES_references_DHCP_without_CONFIG_CMD_DHCP
                "fi\0"
 #define BOOTENV_DEV_NAME_PXE(devtypeu, devtypel, instance) \
        "pxe "
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_DEV_PXE                BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_PXE   BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_DEV_PXE \
        BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE