From patchwork Fri Feb 22 17:52:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martyn Welch X-Patchwork-Id: 1047007 X-Patchwork-Delegate: trini@ti.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=none dis=none) header.from=collabora.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 445f8J2KlGz9s71 for ; Sat, 23 Feb 2019 04:53:15 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 87365C21EEB; Fri, 22 Feb 2019 17:53:10 +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=SPF_HELO_PASS 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 5BC5AC21C93; Fri, 22 Feb 2019 17:53:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DCE6AC21C4A; Fri, 22 Feb 2019 17:53:06 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lists.denx.de (Postfix) with ESMTPS id CCBDFC21C93 for ; Fri, 22 Feb 2019 17:53:05 +0000 (UTC) Received: from hades.home (unknown [IPv6:2a00:23c5:58d:db00:68bb:47d:d5ca:9abd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: martyn) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id AC93A282134; Fri, 22 Feb 2019 17:53:04 +0000 (GMT) From: Martyn Welch To: Tom Rini Date: Fri, 22 Feb 2019 17:52:53 +0000 Message-Id: <20190222175254.28195-2-martyn.welch@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190222175254.28195-1-martyn.welch@collabora.com> References: <20190222175254.28195-1-martyn.welch@collabora.com> MIME-Version: 1.0 Cc: Martyn Welch , u-boot@lists.denx.de, Igor Grinberg , York Sun Subject: [U-Boot] [PATCH v2 2/3] env: Don't check CONFIG_ENV_OFFSET_REDUND for SPL build 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" When booting using an SPL on am335x, if we want to support booting with the boot ROM loader via USB (which uses RNDIS, making bootp and tftp calls) we need to enable gadget eth in the SPL to load the main U-Boot image. To enable CONFIG_SPL_ETH_SUPPORT, we must enable CONFIG_SPL_ENV_SUPPORT as the environment is used by the eth support, but we don't actually need to have environment variables saved in the SPL environment. We do however have environment variables saved in the main U-Boot image and enable CONFIG_ENV_OFFSET_REDUND (we are storing in raw NAND). In such instances, even with the build config enabling both CONFIG_CMD_SAVEENV and CONFIG_CMD_NAND, these options aren't set when building the SPL, but CONFIG_ENV_OFFSET_REDUND still is. Don't check this configuration option for SPL builds to enable the above configuration. Signed-off-by: Martyn Welch Reviewed-by: Tom Rini --- Changes in v2: - Reword commit message to better describe the issue env/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/nand.c b/env/nand.c index 29eda66fad..d0b95f483d 100644 --- a/env/nand.c +++ b/env/nand.c @@ -26,7 +26,7 @@ #if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_NAND) && \ !defined(CONFIG_SPL_BUILD) #define CMD_SAVEENV -#elif defined(CONFIG_ENV_OFFSET_REDUND) +#elif defined(CONFIG_ENV_OFFSET_REDUND) && !defined(CONFIG_SPL_BUILD) #error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND #endif