From: Ondrej Jirman Date: Wed, 13 Feb 2019 17:50:36 +0000 (+0100) Subject: sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled X-Git-Tag: v2025.01-rc5-pxa1908~2993^2~12 X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=0eabec145fda8bb6b4faebfbbce506a357445956;p=u-boot.git 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 Reviewed-by: Jagan Teki --- diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index a498393472..79afba2aba 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 \