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

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


Hi Wolfgang,

On Tue, 19 Oct 2021 at 10:09, Wolfgang Denk <wd at denx.de> wrote:
>
> Dear Simon,
>
> In message <CAPnjgZ3KS06_cy8mLL2V-ezqZYO6QEecz2C78hVaUQAnAz0fNg at mail.gmail.com> you wrote:
> >
> > I thought you were trying to use + at the end of a variable.
> >
> > I used:
> >
> > fred\+=aaa
> >
> > and got
> >
> > cc1: warning: unknown escape sequence: '\=''
> >
> > You can try it yourself by editing sandbox.env in the
> > u-boot-dm/env-working tree.
>
> Hmmm...
>
> -> cat foo.c
> #define A ampersand
> #define B berta
>
> foo\+=B;
> -> gcc -E foo.c
> # 0 "foo.c"
> # 0 "<built-in>"
> # 0 "<command-line>"
> # 1 "/usr/include/stdc-predef.h" 1 3 4
> # 0 "<command-line>" 2
> # 1 "foo.c"
>
>
>
> foo\+=berta;
>
>
>
> -> cat bar.c
> fred\+=aaa
> -> gcc -E bar.c
> # 0 "bar.c"
> # 0 "<built-in>"
> # 0 "<command-line>"
> # 1 "/usr/include/stdc-predef.h" 1 3 4
> # 0 "<command-line>" 2
> # 1 "bar.c"
> fred\+=aaa
>
>
> I do not see this problem...

Would you mind actually trying it in the env file, as I suggested?

Regards,
Simon


More information about the U-Boot mailing list