summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Jirman <megous@megous.com>2019-02-13 18:50:36 +0100
committerJagan Teki <jagan@amarulasolutions.com>2019-04-18 22:17:51 +0530
commit0eabec145fda8bb6b4faebfbbce506a357445956 (patch)
treef6228aaf44cb77921072f9cbd14aff074e8b4b1a
parent517ee6420564ed40d53d49f1d2d96c71ad275c6a (diff)
sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled
Fixes a compilation failure with disabled PXE or DHCP command when using sunxi platform. Signed-off-by: Ondřej Jirman <megous@megous.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
-rw-r--r--include/configs/sunxi-common.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index a498393472b..79afba2aba0 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -393,6 +393,18 @@ extern int soft_i2c_gpio_scl;
#define BOOT_TARGET_DEVICES_USB(func)
#endif
+#ifdef CONFIG_CMD_PXE
+#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
+#else
+#define BOOT_TARGET_DEVICES_PXE(func)
+#endif
+
+#ifdef CONFIG_CMD_DHCP
+#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
+#else
+#define BOOT_TARGET_DEVICES_DHCP(func)
+#endif
+
/* FEL boot support, auto-execute boot.scr if a script address was provided */
#define BOOTENV_DEV_FEL(devtypeu, devtypel, instance) \
"bootcmd_fel=" \
@@ -408,8 +420,8 @@ extern int soft_i2c_gpio_scl;
BOOT_TARGET_DEVICES_MMC(func) \
BOOT_TARGET_DEVICES_SCSI(func) \
BOOT_TARGET_DEVICES_USB(func) \
- func(PXE, pxe, na) \
- func(DHCP, dhcp, na)
+ BOOT_TARGET_DEVICES_PXE(func) \
+ BOOT_TARGET_DEVICES_DHCP(func)
#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
#define BOOTCMD_SUNXI_COMPAT \