From: Tom Rini Date: Fri, 22 Feb 2019 11:44:08 -0500 Subject: [U-Boot] [PATCH 2/3] env: Don't check CONFIG_ENV_OFFSET_REDUND for SPL build In-Reply-To: <724D7297-4365-4470-8C3A-741835113AD1@theobroma-systems.com> References: <20190221101343.13590-1-martyn.welch@collabora.com> <20190221101343.13590-2-martyn.welch@collabora.com> <724D7297-4365-4470-8C3A-741835113AD1@theobroma-systems.com> Message-ID: <20190222164408.GY12379@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Feb 22, 2019 at 05:38:44PM +0100, Philipp Tomsich wrote: > > > > On 21.02.2019, at 11:13, Martyn Welch wrote: > > > > Currently CONFIG_ENV_OFFSET_REDUND is checked regardless of the type of > > build being performed, but this doesn't seem to be needed in SPL builds. > > > > Don't check this configuration option for SPL builds. > > > > Signed-off-by: Martyn Welch > > --- > > > > 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 > > Could we use CONFIG_IS_ENABLED and then differentiate via Kconfig > and ENV_OFFSET_REDUND, SPL_ENV_OFFSET_REDUND and > TPL_ENV_OFFSET_REDUND? We need another round of non-trivial ENV related Kconfig migration and then we would remove this hunk entirely and express things correctly. CONFIG_CMD_NAND check here is an abuse from before we had globally a real CONFIG_NAND to check on, and I'm not sure CMD_SAVEENV is _really_ needed (I mean, it is, in order to populate the alt location, I think anyhow). -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: