U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Martyn Welch <martyn.welch@collabora.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/3] env: Don't check CONFIG_ENV_OFFSET_REDUND for SPL build
Date: Mon, 25 Feb 2019 15:32:59 +0000	[thread overview]
Message-ID: <20190225153300.11668-2-martyn.welch@collabora.com> (raw)
In-Reply-To: <20190225153300.11668-1-martyn.welch@collabora.com>

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 <martyn.welch@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

---

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
 
-- 
2.20.1

  reply	other threads:[~2019-02-25 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 15:32 [U-Boot] [PATCH v3 1/3] Add support for the MT41K128M16JT125K memory modules Martyn Welch
2019-02-25 15:32 ` Martyn Welch [this message]
2019-04-12 16:30   ` [U-Boot] [U-Boot, v3, 2/3] env: Don't check CONFIG_ENV_OFFSET_REDUND for SPL build Tom Rini
2019-02-25 15:33 ` [U-Boot] [PATCH v3 3/3] am335x, guardian: Add support for the bosch guardian board Martyn Welch
2019-02-25 15:46   ` Felix Brack
2019-04-12 16:30   ` [U-Boot] [U-Boot, v3, " Tom Rini
2019-04-12 16:30 ` [U-Boot] [U-Boot, v3, 1/3] Add support for the MT41K128M16JT125K memory modules Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190225153300.11668-2-martyn.welch@collabora.com \
    --to=martyn.welch@collabora.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox