* [PATCH] Replace echo -n's used in environment processing with touch
@ 2022-02-05 10:25 qthedev
2022-02-07 20:22 ` Simon Glass
2022-02-11 17:07 ` Tom Rini
0 siblings, 2 replies; 5+ messages in thread
From: qthedev @ 2022-02-05 10:25 UTC (permalink / raw)
To: u-boot
echo -n does not give the intended effect when invoked in macOS through /bin/sh, which is the shell make uses by default, see "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working" for a detailed explanation. In this case, it resulted in "-n" being written to env.txt and env.in even though they should be empty, which caused compilation to fail with "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS".
This patch prevents the error by replacing echo -n's with touch, as they are used to create empty files in these cases.
diff --git a/Makefile b/Makefile
index 184223ec63..3101aa0132 100644
--- a/Makefile
+++ b/Makefile
@@ -1843,7 +1843,7 @@ quiet_cmd_gen_envp = ENVP $@
-I$(srctree)/arch/$(ARCH)/include \
$< -o $@; \
else \
- echo -n >$@ ; \
+ touch $@ ; \
fi
include/generated/env.in: include/generated/env.txt FORCE
$(call cmd,gen_envp)
@@ -1860,7 +1860,7 @@ quiet_cmd_envc = ENVC $@
elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
echo "Missing file $(ENV_FILE_CFG)"; \
else \
- echo -n >$@ ; \
+ touch $@ ; \
fi
include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Replace echo -n's used in environment processing with touch
2022-02-05 10:25 [PATCH] Replace echo -n's used in environment processing with touch qthedev
@ 2022-02-07 20:22 ` Simon Glass
[not found] ` <whuZfs_csSqsLuX7qmVATpWqxEAjNxQyOQDDz0i9Bp6LlI-rlezPuR8w-6uxQ9fldEAV2ExBeaJfT9tlYU56y675F_351HvKjn4EgG9yIeQ=@protonmail.com>
2022-02-11 17:07 ` Tom Rini
1 sibling, 1 reply; 5+ messages in thread
From: Simon Glass @ 2022-02-07 20:22 UTC (permalink / raw)
To: qthedev; +Cc: u-boot
Hi,
On Sat, 5 Feb 2022 at 06:49, qthedev <qthedev@protonmail.com> wrote:
>
> echo -n does not give the intended effect when invoked in macOS through /bin/sh, which is the shell make uses by default, see "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working" for a detailed explanation. In this case, it resulted in "-n" being written to env.txt and env.in even though they should be empty, which caused compilation to fail with "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS".
>
> This patch prevents the error by replacing echo -n's with touch, as they are used to create empty files in these cases.
Please word-wrap your commit message and use a real name :-)
>
> diff --git a/Makefile b/Makefile
> index 184223ec63..3101aa0132 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1843,7 +1843,7 @@ quiet_cmd_gen_envp = ENVP $@
> -I$(srctree)/arch/$(ARCH)/include \
> $< -o $@; \
> else \
> - echo -n >$@ ; \
> + touch $@ ; \
> fi
> include/generated/env.in: include/generated/env.txt FORCE
> $(call cmd,gen_envp)
> @@ -1860,7 +1860,7 @@ quiet_cmd_envc = ENVC $@
> elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
> echo "Missing file $(ENV_FILE_CFG)"; \
> else \
> - echo -n >$@ ; \
> + touch $@ ; \
> fi
>
> include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
>
Regards,
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Replace echo -n's used in environment processing with touch
[not found] ` <whuZfs_csSqsLuX7qmVATpWqxEAjNxQyOQDDz0i9Bp6LlI-rlezPuR8w-6uxQ9fldEAV2ExBeaJfT9tlYU56y675F_351HvKjn4EgG9yIeQ=@protonmail.com>
@ 2022-02-09 17:16 ` Simon Glass
2022-02-10 22:20 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2022-02-09 17:16 UTC (permalink / raw)
To: qthedev, U-Boot Mailing List, Tom Rini
Hi Qthedev,
On Wed, 9 Feb 2022 at 08:25, qthedev <qthedev@protonmail.com> wrote:
>
> On Monday, February 7th, 2022 at 11:22 PM, Simon Glass <sjg@chromium.org> wrote:
>
> > Hi,
> >
> > On Sat, 5 Feb 2022 at 06:49, qthedev qthedev@protonmail.com wrote:
> >
> > > echo -n does not give the intended effect when invoked in macOS through /bin/sh, which is the shell make uses by default, see "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working" for a detailed explanation. In this case, it resulted in "-n" being written to env.txt and env.in even though they should be empty, which caused compilation to fail with "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS".
> > >
> > > This patch prevents the error by replacing echo -n's with touch, as they are used to create empty files in these cases.
> >
> > Please word-wrap your commit message and use a real name :-)
> >
> > > diff --git a/Makefile b/Makefile
> > >
> > > index 184223ec63..3101aa0132 100644
> > >
> > > --- a/Makefile
> > >
> > > +++ b/Makefile
> > >
> > > @@ -1843,7 +1843,7 @@ quiet_cmd_gen_envp = ENVP $@
> > >
> > > -I$(srctree)/arch/$(ARCH)/include \
> > >
> > > $< -o $@; \
> > >
> > > else \
> > >
> > > - echo -n >$@ ; \\
> > >
> > >
> > >
> > > - touch $@ ; \\
> > > fi
> > >
> > >
> > >
> > > include/generated/env.in: include/generated/env.txt FORCE
> > >
> > > $(call cmd,gen_envp)
> > >
> > > @@ -1860,7 +1860,7 @@ quiet_cmd_envc = ENVC $@
> > >
> > > elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
> > >
> > > echo "Missing file $(ENV_FILE_CFG)"; \
> > >
> > > else \
> > >
> > > - echo -n >$@ ; \\
> > >
> > >
> > >
> > > - touch $@ ; \\
> > > fi
> > >
> > >
> > >
> > > include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
> >
> > Regards,
> >
> > Simon
>
> Hi,
>
> I am not able to use my real name for privacy reasons, I hope it is not a problem.
> Here is the patch with a word wrapped version of the commit message:
>
> echo -n does not give the intended effect when invoked in macOS
> through /bin/sh, which is the shell make uses by default, see
> "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working"
> for a detailed explanation. In this case, it resulted in "-n" being
> written to env.txt and env.in even though they should be empty, which
> caused compilation to fail with "Your board uses a text-file environment,
> so must not define CONFIG_EXTRA_ENV_SETTINGS".
>
> This patch prevents the error by replacing echo -n's with touch,
> as they are used to create empty files in these cases.
>
> diff --git a/Makefile b/Makefile
> index 184223ec63..3101aa0132 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1843,7 +1843,7 @@ quiet_cmd_gen_envp = ENVP $@
> -I$(srctree)/arch/$(ARCH)/include \
> $< -o $@; \
> else \
> - echo -n >$@ ; \
> + touch $@ ; \
> fi
> include/generated/env.in: include/generated/env.txt FORCE
> $(call cmd,gen_envp)
> @@ -1860,7 +1860,7 @@ quiet_cmd_envc = ENVC $@
> elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
> echo "Missing file $(ENV_FILE_CFG)"; \
> else \
> - echo -n >$@ ; \
> + touch $@ ; \
> fi
>
> include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
I don't think we can accept anonymous patches since the sign-off is
not meaningful in that situation. Perhaps you could get someone else
to submit it for you and sign off?
Information about submitting patches is here:
https://www.denx.de/wiki/U-Boot/Patches
+U-Boot Mailing List
+Tom Rini for thoughts on this
Regards,
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Replace echo -n's used in environment processing with touch
2022-02-09 17:16 ` Simon Glass
@ 2022-02-10 22:20 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2022-02-10 22:20 UTC (permalink / raw)
To: Simon Glass; +Cc: qthedev, U-Boot Mailing List
[-- Attachment #1: Type: text/plain, Size: 4414 bytes --]
On Wed, Feb 09, 2022 at 10:16:18AM -0700, Simon Glass wrote:
> Hi Qthedev,
>
> On Wed, 9 Feb 2022 at 08:25, qthedev <qthedev@protonmail.com> wrote:
> >
> > On Monday, February 7th, 2022 at 11:22 PM, Simon Glass <sjg@chromium.org> wrote:
> >
> > > Hi,
> > >
> > > On Sat, 5 Feb 2022 at 06:49, qthedev qthedev@protonmail.com wrote:
> > >
> > > > echo -n does not give the intended effect when invoked in macOS through /bin/sh, which is the shell make uses by default, see "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working" for a detailed explanation. In this case, it resulted in "-n" being written to env.txt and env.in even though they should be empty, which caused compilation to fail with "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS".
> > > >
> > > > This patch prevents the error by replacing echo -n's with touch, as they are used to create empty files in these cases.
> > >
> > > Please word-wrap your commit message and use a real name :-)
> > >
> > > > diff --git a/Makefile b/Makefile
> > > >
> > > > index 184223ec63..3101aa0132 100644
> > > >
> > > > --- a/Makefile
> > > >
> > > > +++ b/Makefile
> > > >
> > > > @@ -1843,7 +1843,7 @@ quiet_cmd_gen_envp = ENVP $@
> > > >
> > > > -I$(srctree)/arch/$(ARCH)/include \
> > > >
> > > > $< -o $@; \
> > > >
> > > > else \
> > > >
> > > > - echo -n >$@ ; \\
> > > >
> > > >
> > > >
> > > > - touch $@ ; \\
> > > > fi
> > > >
> > > >
> > > >
> > > > include/generated/env.in: include/generated/env.txt FORCE
> > > >
> > > > $(call cmd,gen_envp)
> > > >
> > > > @@ -1860,7 +1860,7 @@ quiet_cmd_envc = ENVC $@
> > > >
> > > > elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
> > > >
> > > > echo "Missing file $(ENV_FILE_CFG)"; \
> > > >
> > > > else \
> > > >
> > > > - echo -n >$@ ; \\
> > > >
> > > >
> > > >
> > > > - touch $@ ; \\
> > > > fi
> > > >
> > > >
> > > >
> > > > include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
> > >
> > > Regards,
> > >
> > > Simon
> >
> > Hi,
> >
> > I am not able to use my real name for privacy reasons, I hope it is not a problem.
> > Here is the patch with a word wrapped version of the commit message:
> >
> > echo -n does not give the intended effect when invoked in macOS
> > through /bin/sh, which is the shell make uses by default, see
> > "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working"
> > for a detailed explanation. In this case, it resulted in "-n" being
> > written to env.txt and env.in even though they should be empty, which
> > caused compilation to fail with "Your board uses a text-file environment,
> > so must not define CONFIG_EXTRA_ENV_SETTINGS".
> >
> > This patch prevents the error by replacing echo -n's with touch,
> > as they are used to create empty files in these cases.
> >
> > diff --git a/Makefile b/Makefile
> > index 184223ec63..3101aa0132 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1843,7 +1843,7 @@ quiet_cmd_gen_envp = ENVP $@
> > -I$(srctree)/arch/$(ARCH)/include \
> > $< -o $@; \
> > else \
> > - echo -n >$@ ; \
> > + touch $@ ; \
> > fi
> > include/generated/env.in: include/generated/env.txt FORCE
> > $(call cmd,gen_envp)
> > @@ -1860,7 +1860,7 @@ quiet_cmd_envc = ENVC $@
> > elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
> > echo "Missing file $(ENV_FILE_CFG)"; \
> > else \
> > - echo -n >$@ ; \
> > + touch $@ ; \
> > fi
> >
> > include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
>
> I don't think we can accept anonymous patches since the sign-off is
> not meaningful in that situation. Perhaps you could get someone else
> to submit it for you and sign off?
>
> Information about submitting patches is here:
>
> https://www.denx.de/wiki/U-Boot/Patches
>
> +U-Boot Mailing List
> +Tom Rini for thoughts on this
It is quite strongly encouraged to have a Signed-off-by line for
anything but the most trivial of bugfixes. I don't strongly object to
taking this without a real name, but it's not desirable in general and
would be a problem for a more significant change.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Replace echo -n's used in environment processing with touch
2022-02-05 10:25 [PATCH] Replace echo -n's used in environment processing with touch qthedev
2022-02-07 20:22 ` Simon Glass
@ 2022-02-11 17:07 ` Tom Rini
1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2022-02-11 17:07 UTC (permalink / raw)
To: qthedev; +Cc: u-boot
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
On Sat, Feb 05, 2022 at 10:25:16AM +0000, qthedev wrote:
> echo -n does not give the intended effect when invoked in macOS through /bin/sh, which is the shell make uses by default, see "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working" for a detailed explanation. In this case, it resulted in "-n" being written to env.txt and env.in even though they should be empty, which caused compilation to fail with "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS".
>
> This patch prevents the error by replacing echo -n's with touch, as they are used to create empty files in these cases.
>
> diff --git a/Makefile b/Makefile
> index 184223ec63..3101aa0132 100644
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-02-11 17:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05 10:25 [PATCH] Replace echo -n's used in environment processing with touch qthedev
2022-02-07 20:22 ` Simon Glass
[not found] ` <whuZfs_csSqsLuX7qmVATpWqxEAjNxQyOQDDz0i9Bp6LlI-rlezPuR8w-6uxQ9fldEAV2ExBeaJfT9tlYU56y675F_351HvKjn4EgG9yIeQ=@protonmail.com>
2022-02-09 17:16 ` Simon Glass
2022-02-10 22:20 ` Tom Rini
2022-02-11 17:07 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.