From: megous at megous.com Date: Sat, 9 Feb 2019 14:39:55 +0100 Subject: [U-Boot] [PATCH 2/4] sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled In-Reply-To: <20190209133957.12713-1-megous@megous.com> References: <20190209133957.12713-1-megous@megous.com> Message-ID: <20190209133957.12713-3-megous@megous.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de From: Ondrej Jirman Signed-off-by: Ond=C5=99ej Jirman --- include/configs/sunxi-common.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index b01d1c3c84..d421b93509 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -399,6 +399,18 @@ extern int soft_i2c_gpio_scl; #define BOOT_TARGET_DEVICES_USB(func) #endif =20 +#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 provide= d */ #define BOOTENV_DEV_FEL(devtypeu, devtypel, instance) \ "bootcmd_fel=3D" \ @@ -414,8 +426,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) =20 #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT #define BOOTCMD_SUNXI_COMPAT \ --=20 2.20.1