From: Sean Anderson <seanga2@gmail.com>
To: Simon Glass <sjg@chromium.org>,
U-Boot Mailing List <u-boot@lists.denx.de>
Cc: "Joe Hershberger" <joe.hershberger@ni.com>,
"Marek Behún" <marek.behun@nic.cz>
Subject: Re: [PATCH] env: Avoid using a leftover text-environment file
Date: Sat, 12 Mar 2022 00:42:27 -0500 [thread overview]
Message-ID: <a4e96642-c6eb-d0cd-3724-756b88bb3e60@gmail.com> (raw)
In-Reply-To: <20220312053723.517229-1-sjg@chromium.org>
On 3/12/22 12:37 AM, Simon Glass wrote:
> If include/generated/environment.h exists (perhaps leftover from a build
> of another board) it is used, even if the board currently being built does
> not have a text environment.
>
> This causes a build error. Fix it by emptying the file if it should not be
> there.
>
> Fixes: https://source.denx.de/u-boot/u-boot/-/issues/9
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reported-by: Sean Anderson <seanga2@gmail.com>
> ---
>
> Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 9ef34ca4b7f..2351d6dacd2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1834,7 +1834,9 @@ ENV_FILE := $(if $(ENV_SOURCE_FILE),$(ENV_FILE_CFG),$(wildcard $(ENV_FILE_BOARD)
>
> # Run the environment text file through the preprocessor, but only if it is
> # non-empty, to save time and possible build errors if something is wonky with
> -# the board
> +# the board.
> +# If there is no ENV_FILE, produce an empty output file, to prevent a previous
> +# build's file being used in the case of in-tree builds.
> quiet_cmd_gen_envp = ENVP $@
> cmd_gen_envp = \
> if [ -s "$(ENV_FILE)" ]; then \
> @@ -1845,6 +1847,7 @@ quiet_cmd_gen_envp = ENVP $@
> -I$(srctree)/arch/$(ARCH)/include \
> $< -o $@; \
> else \
> + rm $@; \
> touch $@ ; \
> fi
> include/generated/env.in: include/generated/env.txt FORCE
>
Thanks!
Tested-by: Sean Anderson <seanga2@gmail.com>
next prev parent reply other threads:[~2022-03-12 5:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-12 5:37 [PATCH] env: Avoid using a leftover text-environment file Simon Glass
2022-03-12 5:42 ` Sean Anderson [this message]
2022-04-01 0:14 ` Sean Anderson
2022-04-01 1:19 ` 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=a4e96642-c6eb-d0cd-3724-756b88bb3e60@gmail.com \
--to=seanga2@gmail.com \
--cc=joe.hershberger@ni.com \
--cc=marek.behun@nic.cz \
--cc=sjg@chromium.org \
--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