]> git.sur5r.net Git - u-boot/commitdiff
ti: am335x: Fix bootargs when building without NET
authorAlex Kiernan <alex.kiernan@gmail.com>
Sun, 1 Apr 2018 09:22:35 +0000 (09:22 +0000)
committerTom Rini <trini@konsulko.com>
Mon, 9 Apr 2018 03:00:58 +0000 (23:00 -0400)
If DHCP/PXE commands are disabled then the compilation fails due to
bootargs attempting to use them:

  include/config_distro_bootcmd.h:319:2: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’

Ensure that if the command aren't enabled, we don't try and use them.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
include/configs/am335x_evm.h

index 8d45b6fadec2d6fbe6b083098726ead8dca8ca31..fc3fc179fb6134e1aa6004d39b2207d4ef9c07fe 100644 (file)
 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
        #devtypel #instance " "
 
+#if CONFIG_IS_ENABLED(CMD_PXE)
+# define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
+#else
+# define BOOT_TARGET_PXE(func)
+#endif
+
+#if CONFIG_IS_ENABLED(CMD_DHCP)
+# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
+#else
+# define BOOT_TARGET_DHCP(func)
+#endif
+
 #define BOOT_TARGET_DEVICES(func) \
        func(MMC, mmc, 0) \
        func(LEGACY_MMC, legacy_mmc, 0) \
        func(MMC, mmc, 1) \
        func(LEGACY_MMC, legacy_mmc, 1) \
        func(NAND, nand, 0) \
-       func(PXE, pxe, na) \
-       func(DHCP, dhcp, na)
+       BOOT_TARGET_PXE(func) \
+       BOOT_TARGET_DHCP(func)
 
 #include <config_distro_bootcmd.h>