From patchwork Mon Feb 25 15:32:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martyn Welch X-Patchwork-Id: 1047785 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 447QvV2xBDz9s2R for ; Tue, 26 Feb 2019 02:33:24 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 35BFFC21E1A; Mon, 25 Feb 2019 15:33:18 +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 DEE96C21C2F; Mon, 25 Feb 2019 15:33:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 83562C21C2F; Mon, 25 Feb 2019 15:33:14 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lists.denx.de (Postfix) with ESMTPS id 6692EC21C38 for ; Mon, 25 Feb 2019 15:33:13 +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 0C4202820CC; Mon, 25 Feb 2019 15:33:12 +0000 (GMT) From: Martyn Welch To: Tom Rini Date: Mon, 25 Feb 2019 15:32:59 +0000 Message-Id: <20190225153300.11668-2-martyn.welch@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190225153300.11668-1-martyn.welch@collabora.com> References: <20190225153300.11668-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 v3 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 v3: None 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