From patchwork Wed Feb 13 17:50:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 1041478 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=megous.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=megous.com header.i=@megous.com header.b="qv3URfx+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 4406Wq1cKQz9sMp for ; Thu, 14 Feb 2019 04:50:58 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 7B4DEC220A0; Wed, 13 Feb 2019 17:50:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AB3D0C21FB8; Wed, 13 Feb 2019 17:50:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7BB55C21FB8; Wed, 13 Feb 2019 17:50:48 +0000 (UTC) Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lists.denx.de (Postfix) with ESMTPS id 2F9FCC21F98 for ; Wed, 13 Feb 2019 17:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1550080247; bh=2U9xUxXyiaUfbKWp0J96dunZnPgq67t6Qm15JSCOMBs=; h=From:To:Cc:Subject:Date:From; b=qv3URfx+4qfrYLo7IAnog4Q3bJKa1lKAuAKK0qhv2Pvme5uaGDnNw/qXoWxmXVIrA wn79C/lFle4zQSAM4hBs/64RSbDekUSKSOYv7vkgIJynLhN3Tf9ZFtrJmlJQxGPzb5 BetQ4e6wOkbOSRqcWeUajv4HO7gIXU5M1fKguMc8= From: megous@megous.com To: u-boot@lists.denx.de Date: Wed, 13 Feb 2019 18:50:36 +0100 Message-Id: <20190213175036.4477-1-megous@megous.com> MIME-Version: 1.0 Cc: Ondrej Jirman , Stefan Mavrodiev , Maxime Ripard , Andre Przywara , Icenowy Zheng Subject: [U-Boot] [PATCH v2] sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Ondrej Jirman Fixes a compilation failure with disabled PXE or DHCP command when using sunxi platform. Signed-off-by: Ondřej Jirman Reviewed-by: Jagan Teki --- This was previously sent as a part of other series of patches, but it's unrelated to the rest of the patches, so I'm resending it individually. v2: - improved description 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 +#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=" \ @@ -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) #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT #define BOOTCMD_SUNXI_COMPAT \