From: Patrick DELAUNAY Date: Thu, 5 Sep 2019 07:56:45 +0000 Subject: [U-Boot] [PATCH] env: Add CONFIG_ENV_SUPPORT In-Reply-To: <20190904105141.71c20ab0@jawa> References: <1567530547-14331-1-git-send-email-patrick.delaunay@st.com> <20190904105141.71c20ab0@jawa> Message-ID: <7fea5cf3c889406cb74e652068f0aaa0@SFHDAG6NODE3.st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Lukasz, > From: Lukasz Majewski > Sent: mercredi 4 septembre 2019 10:52 > > Hi Patrick, > > > Add a new flag CONFIG_ENV_SUPPORT to compile all the environment > > features in U-Boot (attributes, callbacks and flags). It is the > > equivalent of the 2 existing flags > > - CONFIG_SPL_ENV_SUPPORT for SPL > > - CONFIG_TPL_ENV_SUPPORT for TPL > > Shouldn't it be the "supplement" ? > > I guess that it is possible to define > > CONFIG_SPL_ENV_SUPPORT to have ENV support in SPL > > CONFIG_TPL_ENV_SUPPORT to have ENV support in TPL > > and there is a third flag - CONFIG_ENV_SUPPORT to enable envs support in U- > Boot proper? > > In that way one can enable ENV support only in SPL (via SPL_ENV_SUPPORT) > and disable envs in U-Boot proper (by NOT defining ENV_SUPPORT) and use > build in envs (in the binary). Yes exactly the support for U-Boot, SPL or TPL are now independent, I will update the commit message in V2, "supplement" is more clear. > > > > > This new configuration allows to use the macro > > CONFIG_IS_ENABLED(ENV_SUPPORT) in the code without issue and solves > > the regression introduced by commit 7d4776545b0f ("env: solve > > compilation error in SPL"); change_ok was always NULL in U-Boot. > > > > Signed-off-by: Patrick Delaunay > > --- > > > > cmd/Kconfig | 2 ++ > > env/Kconfig | 7 +++++++ > > env/Makefile | 11 ++++------- > > include/env_callback.h | 4 ++++ > > include/env_flags.h | 4 ++++ > > 5 files changed, 21 insertions(+), 7 deletions(-) > > > > Best regards, > > Lukasz Majewski > Best regards Patrick Delaunay