[PATCH v1] env: setenv add resolve value option
Simon Glass
sjg at chromium.org
Fri Nov 5 03:02:01 CET 2021
Hi Art,
On Wed, 3 Nov 2021 at 01:41, Art Nikpal <email2tema at gmail.com> wrote:
>
> > The high level problem I have with this patch is that we keep going back
> > to "we really need to update to a modern hush (or other shell) rather
> > than patching new features in to our ancient fork".
>
> Yes it will be fine ! Does anybody have information about these plans ?
Yes see here: https://docs.google.com/document/d/1YBOMsbM19uSFyoJWnt7-PsOLBaevzQUgV-hiR88a5-o/edit#bookmark=id.j6h2xzste5sy
We could ask for an update on progress.
> but in any case my patch didn't broke compatibility like next patch
>
> > See also this old patch:
> > https://patchwork.ozlabs.org/project/uboot/patch/1449255744-25787-1-git-send-email-nm@ti.com/
>
> > Can you please add to the env tests?
> > please add function comment
> > ...
>
> tnx for suggestions ...
> i can make v2 variant for my patch , if no one is against this idea
I am not against it. But see Tom's comment.
>
> On Wed, Nov 3, 2021 at 12:44 AM Tom Rini <trini at konsulko.com> wrote:
> >
> > On Tue, Nov 02, 2021 at 03:19:14PM +0800, Artem Lapkin wrote:
> >
> > > Add possibility setup env variable with additional resolving vars inside
> > > value.
> > >
> > > Usage examples
> > >
> > > => setenv a hello
> > > => setenv b world
> > > => setenv c '${a} ${b}'
> > > => setenv -r d '${c}! ${a}...'
> > > => printenv d
> > > d=hello world! hello...
> > >
> > > /* internal usage example */
> > > env_resolve("d", "${c}! ${a}...");
> > > /* d="hello world! hello..." */
> > >
> > > Notes
> > >
> > > Resolving works only for ${var} "bracket" and didn't workd for
> > > "unbracket" $var
> > >
> > > => setenv -r d '$c! $a...'
> > > => printenv d
> > > d=$c! $a...
> > >
> > > Signed-off-by: Artem Lapkin <art at khadas.com>
> >
> > The high level problem I have with this patch is that we keep going back
> > to "we really need to update to a modern hush (or other shell) rather
> > than patching new features in to our ancient fork".
It is orthogonal to the shell, so far as I can tell.
Regards,
Simon
More information about the U-Boot
mailing list