[PATCH v8 4/8] env: Allow U-Boot scripts to be placed in a .env file

Simon Glass sjg at chromium.org
Tue Oct 19 18:14:37 CEST 2021


Hi Wolfgang,

On Tue, 19 Oct 2021 at 10:05, Wolfgang Denk <wd at denx.de> wrote:
>
> Dear Simon,
>
> In message <CAPnjgZ3THSM=TYvkGQJanmD0SwUzWsmcYWTG=vUaHiqFje3VfQ at mail.gmail.com> you wrote:
> >
> > Well ideally I'd like to avoid Python in this case as it is in the
> > compilation path. I am not sure yet what Wolfgang actually wants,
> > apart from variable names ending with + which I would like to
> > disallow.
> >
> > So if we can clearly understand the goal, then we might be able to do
> > it in awk, but, again, can we just disallow '+' in var names ?

Re lex..

I cannot imagine why we would want to use that, given that we want to
include the environment literally, so far as possible.

Anyway, if we did we would presumably have symbols for + and += so how
would that help with the ambiguity I mentioned?

>
> My goal is to have a parser that does not place new restrictions on
> an ancient interface.  The first step would probably be to define a
> clear syntax description.
>
> Eventually this would be also more allowing for variations in white
> space, so that "<name>=<value>" could also be written as "<name> =
> <value>".  ....which in turn would allow for
>
>         foo+ = bar
> vs.
>         foo += bar
> .
>
> Just my 2¢...

I think we're up to about $12 at this point :-)

But then how do you add a space to an env variable? At the moment you can do:

bootargs=fred
#ifdef CONFIG_SOMETHING
bootargs+= more
#endif

Regards,
Simon


More information about the U-Boot mailing list