Re: env: Allow U-Boot scripts to be placed in a .env file

2023-10-17 Thread Tom Rini
On Tue, Oct 17, 2023 at 10:14:13AM +0200, Wojciech Niziński wrote: > Hello. > > Very nice feature was introduced in commit: > >     86b9c3e4e48ba47ef28781d06b97846aca74bc8e| >     env: Allow U-Boot scripts to be placed in a .env file > > This feature wo

env: Allow U-Boot scripts to be placed in a .env file

2023-10-17 Thread Wojciech Niziński
Hello. Very nice feature was introduced in commit:     86b9c3e4e48ba47ef28781d06b97846aca74bc8e|     env: Allow U-Boot scripts to be placed in a .env file This feature works as extension for old CFG_EXTRA_ENV_SETTINGS and make me confused why it doesn't work for configured default env

Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2022-03-12 Thread Simon Glass
Hi Patrick, On Thu, 10 Feb 2022 at 04:20, Patrick DELAUNAY wrote: > > Hi Simon, > > On 10/22/21 05:08, Simon Glass wrote: > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > > to this file and de

Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2022-02-10 Thread Patrick DELAUNAY
Hi Simon, On 10/22/21 05:08, Simon Glass wrote: At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we

Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2021-11-13 Thread Simon Glass
Hi Daniel, On Fri, 12 Nov 2021 at 11:13, Daniel Golle wrote: > > On Thu, Oct 21, 2021 at 09:08:46PM -0600, Simon Glass wrote: > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > > to this file an

Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2021-11-12 Thread Daniel Golle
On Thu, Oct 21, 2021 at 09:08:46PM -0600, Simon Glass wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting and newlines is harder than it > should be. It wou

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-28 Thread Simon Glass
Hi, On Tue, 26 Oct 2021 at 04:16, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > > We need the space between the bootargs. > > > > > > Exactly like that, and for the case where you want to append something > > > _without_ an extra space there's the .=3D operator I

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-26 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > > We need the space between the bootargs. > > > > Exactly like that, and for the case where you want to append something > > _without_ an extra space there's the .=3D operator I also suggested. > > Do you have a link to the docs for that? > > Perhaps we sh

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Rasmus Villemoes
On 25/10/2021 17.18, Simon Glass wrote: > Hi Rasmus, > > On Mon, 25 Oct 2021 at 01:06, Rasmus Villemoes > wrote: >> Exactly, there's really never any case where that would be sensible. But >> I would probably go a bit further and simply restrict varnames to the >> usual alphanumerics plus [_.+-]

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Simon Glass
Hi Rasmus, On Mon, 25 Oct 2021 at 01:06, Rasmus Villemoes wrote: > > On 24/10/2021 21.54, Simon Glass wrote: > > Hi Rasmus, > > > > On Fri, 22 Oct 2021 at 00:41, Rasmus Villemoes > > wrote: > >> > >> On 21/10/2021 18.03, Tom Rini wrote: > >>> On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Wolfgang Denk
Dear Tom, In message <20211024164404.GQ3577824@bill-the-cat> you wrote: > > > It is a convenience tool, and it is OK if it has a few restrictions, > > like for the character set of supported variable names. > > > > But: > > > > 1) These restrictions must be clearly documented, both in the commi

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Rasmus Villemoes
On 24/10/2021 21.54, Simon Glass wrote: > Hi Rasmus, > > On Fri, 22 Oct 2021 at 00:41, Rasmus Villemoes > wrote: >> >> On 21/10/2021 18.03, Tom Rini wrote: >>> On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: Hi Marek, On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-24 Thread Simon Glass
Hi Rasmus, On Fri, 22 Oct 2021 at 00:41, Rasmus Villemoes wrote: > > On 21/10/2021 18.03, Tom Rini wrote: > > On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: > >> Hi Marek, > >> > >> On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: > >>> > >>> On Thu, 21 Oct 2021 15:25:37 +0200 > >>

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-24 Thread Tom Rini
On Sun, Oct 24, 2021 at 05:46:00PM +0200, Wolfgang Denk wrote: > Dear Tom, > > In message <20211022144759.GG3577824@bill-the-cat> you wrote: > > > > > Any escape character is also a legal name character. > > > > I am struggling to have a non-meme reaction to this. Perhaps the best > > step is ju

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-24 Thread Wolfgang Denk
Dear Tom, In message <20211022144759.GG3577824@bill-the-cat> you wrote: > > > Any escape character is also a legal name character. > > I am struggling to have a non-meme reaction to this. Perhaps the best > step is just earlier on in the series note that variable names need to > fit within the b

Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2021-10-24 Thread Wolfgang Denk
Dear Tom, In message <20211022142912.GF3577824@bill-the-cat> you wrote: > > > However, '\' is also a legal character in a variable name (and > > doubled backslashes or apostrophes etc. are legal, too), so > > above line should actually set the environment variable "maximum\+" > > to "value". > >

Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Tony Dinh
Hi all, My 2 cents. As a maintainer for some hobbyist downstream u-boots (tracking mainline) and some out-of-tree u-boots, I do lots of envs scripting. The most common scenario for me is to create an env by combining 2 or more strings. Examples, init_usb, init_sata, init_sata_usb and so on, i.e c

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Tom Rini
On Fri, Oct 22, 2021 at 10:06:55AM +0200, Wolfgang Denk wrote: > Dear Simon, > > In message > you > wrote: > > > > > > i.e. > > > > var+=value > > > > appends value to var, while > > > > var\+=value > > > > sets variable with name "var+" > > > > My first preference is to disallow + at the e

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Tom Rini
On Fri, Oct 22, 2021 at 10:08:05AM +0200, Wolfgang Denk wrote: > Dear Tom, > > In message <20211021160311.GC3577824@bill-the-cat> you wrote: > > > > How bad does it make the parser look if we allow trailing + in variable > > names, by escaping them? It's seemingly the substantive objection at >

Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Tom Rini
On Fri, Oct 22, 2021 at 10:29:26AM +0200, Wolfgang Denk wrote: > Dear Simon, > > In message > <20211021210847.v10.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you > wrote: > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTINGS. It is

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Marek Behún
Hello Wolfgang, On Fri, 22 Oct 2021 10:06:55 +0200 Wolfgang Denk wrote: > For the '+=' case, there is no way to escape the '+', as all > commonly used escapes are valid characters in the variable name, > too. We can define that backslash is to be also escaped if it is to be used as variable nam

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Rasmus Villemoes
On 21/10/2021 18.03, Tom Rini wrote: > On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: >> Hi Marek, >> >> On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: >>> >>> On Thu, 21 Oct 2021 15:25:37 +0200 >>> Marek Behún wrote: >>> Hello, On Thu, 21 Oct 2021 15:06:51 +0200 >>

Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Wolfgang Denk
Dear Simon, In message <20211021210847.v10.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Wolfgang Denk
Dear Tom, In message <20211021160311.GC3577824@bill-the-cat> you wrote: > > How bad does it make the parser look if we allow trailing + in variable > names, by escaping them? It's seemingly the substantive objection at > this point. Any escape character is also a legal name character. Best reg

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > > i.e. > > > var+=value > > > appends value to var, while > > > var\+=value > > > sets variable with name "var+" > > My first preference is to disallow + at the end of an end var. Perhaps > we can start printing a warning if people do it, for a few rel

[PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Simon Glass
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and ha

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Simon Glass
Hi Tom, On Thu, 21 Oct 2021 at 10:03, Tom Rini wrote: > > On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: > > Hi Marek, > > > > On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: > > > > > > On Thu, 21 Oct 2021 15:25:37 +0200 > > > Marek Behún wrote: > > > > > > > Hello, > > > > > >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Tom Rini
On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: > Hi Marek, > > On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: > > > > On Thu, 21 Oct 2021 15:25:37 +0200 > > Marek Behún wrote: > > > > > Hello, > > > > > > On Thu, 21 Oct 2021 15:06:51 +0200 > > > Wolfgang Denk wrote: > > > > > >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Simon Glass
Hi Marek, On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: > > On Thu, 21 Oct 2021 15:25:37 +0200 > Marek Behún wrote: > > > Hello, > > > > On Thu, 21 Oct 2021 15:06:51 +0200 > > Wolfgang Denk wrote: > > > > > I confirm that '+=' looks better. But '+=" is technically broken. > > > > a bit of m

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Tom Rini
On Thu, Oct 21, 2021 at 05:12:26PM +0200, Wolfgang Denk wrote: > Dear Marek, > > In message <20211021152831.15524883@thinkpad> you wrote: > > > > > > > I think =+ will confuse far more people than + as last character of var > > I still fail to see why '=+' could be confusing if properly > documen

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Wolfgang Denk
Dear Marek, In message <20211021152831.15524883@thinkpad> you wrote: > > > > I think =+ will confuse far more people than + as last character of var I still fail to see why '=+' could be confusing if properly documented to be the append operator. I mean, it is not a new invention of mine. OpenE

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Marek Behún
On Thu, 21 Oct 2021 15:25:37 +0200 Marek Behún wrote: > Hello, > > On Thu, 21 Oct 2021 15:06:51 +0200 > Wolfgang Denk wrote: > > > I confirm that '+=' looks better. But '+=" is technically broken. > > a bit of my opinion: > I think =+ will confuse far more people than + as last character o

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Marek Behún
Hello, On Thu, 21 Oct 2021 15:06:51 +0200 Wolfgang Denk wrote: > I confirm that '+=' looks better. But '+=" is technically broken. a bit of my opinion: I think =+ will confuse far more people than + as last character of var name working weirdly. But I also think that + should be supported as l

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Wolfgang Denk
Dear Tom, In message <20211021122325.GX7964@bill-the-cat> you wrote: > > Do you have any other feedback on the entire rest of the series? I already wrote that I support the concept, and the few nit I saw have been fixed, I think. Except this unneeded breaking of backward compatibility. > Becau

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Tom Rini
On Thu, Oct 21, 2021 at 11:50:02AM +0200, Wolfgang Denk wrote: > Dear Simon, > > In message > <20211019164418.v9.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you > wrote: > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTINGS. It is p

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Wolfgang Denk
Dear Simon, In message <20211019164418.v9.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting a

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

2021-10-21 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > Wait saying we'll add "+SOMETHING" is a common case? > > Yes we have places where we add to env vars depending on CONFIG settings. Yes, but how many places are there where the appended value starts with a '+' ? > The way I have this, is it fairly trivial

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

2021-10-21 Thread Wolfgang Denk
Dear Tom, In message <20211019163000.GI7964@bill-the-cat> you wrote: > > I'm not sure I like saying the operator is "=+" rather than "+=" because > "=+" is a less commonly seen operator and tends to be an alternative > appends for special cases / side-effects / position in parsing. I fully agre

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

2021-10-21 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > > var++=fred > > > > > > is unambiguous but very confusing. I think it would be better to disallow > > > + > > > > It's neither unambiguous nor confusing. It is assigning to "var++". > > What? Can you read that again? Did so, but didn't get what you mig

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

2021-10-19 Thread Simon Glass
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and ha

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

2021-10-19 Thread Simon Glass
Hi Tom, On Tue, 19 Oct 2021 at 10:44, Tom Rini wrote: > > On Tue, Oct 19, 2021 at 10:39:55AM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Tue, 19 Oct 2021 at 10:30, Tom Rini wrote: > > > > > > On Tue, Oct 19, 2021 at 10:24:25AM -0600, Simon Glass wrote: > > > > Hi Wolfgang, > > > > > > > > O

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

2021-10-19 Thread Tom Rini
On Tue, Oct 19, 2021 at 10:39:55AM -0600, Simon Glass wrote: > Hi Tom, > > On Tue, 19 Oct 2021 at 10:30, Tom Rini wrote: > > > > On Tue, Oct 19, 2021 at 10:24:25AM -0600, Simon Glass wrote: > > > Hi Wolfgang, > > > > > > On Tue, 19 Oct 2021 at 10:20, Wolfgang Denk wrote: > > > > > > > > Dear Sim

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

2021-10-19 Thread Simon Glass
Hi Tom, On Tue, 19 Oct 2021 at 10:30, Tom Rini wrote: > > On Tue, Oct 19, 2021 at 10:24:25AM -0600, Simon Glass wrote: > > Hi Wolfgang, > > > > On Tue, 19 Oct 2021 at 10:20, Wolfgang Denk wrote: > > > > > > Dear Simon, > > > > > > In message > > > you > > > wrote: > > > > > > > > But how do w

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

2021-10-19 Thread Tom Rini
On Tue, Oct 19, 2021 at 10:24:25AM -0600, Simon Glass wrote: > Hi Wolfgang, > > On Tue, 19 Oct 2021 at 10:20, Wolfgang Denk wrote: > > > > Dear Simon, > > > > In message > > you > > wrote: > > > > > > But how do we handle this? > > > > > > var+=fred > > > > > > Is this appending to var or assi

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

2021-10-19 Thread Simon Glass
Hi Wolfgang, On Tue, 19 Oct 2021 at 10:20, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > But how do we handle this? > > > > var+=fred > > > > Is this appending to var or assigning to var+ ? > > It is assigning to "var+". er... > > > > var++=fred > > > > is unamb

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

2021-10-19 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > But how do we handle this? > > var+=fred > > Is this appending to var or assigning to var+ ? It is assigning to "var+". > > var++=fred > > is unambiguous but very confusing. I think it would be better to disallow + It's neither unambiguous nor confusing.

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

2021-10-19 Thread Simon Glass
Hi Wolfgang, On Tue, 19 Oct 2021 at 10:09, Wolfgang Denk wrote: > > Dear Simon, > > In message > 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

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

2021-10-19 Thread Simon Glass
Hi Wolfgang, On Tue, 19 Oct 2021 at 10:05, Wolfgang Denk wrote: > > Dear Simon, > > In message > 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 wi

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

2021-10-19 Thread Wolfgang Denk
Dear Simon, In message 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.

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

2021-10-19 Thread Wolfgang Denk
Dear Simon, In message 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, t

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

2021-10-19 Thread Wolfgang Denk
Dear Tom, In message <20211019140711.GC7964@bill-the-cat> you wrote: > > As much as I and others appreciate that you've written the parser here > in a classic UNIX tool, awk, since a lot of the problems also seem to > stem from having the parser be able to handle previously valid > environment va

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

2021-10-19 Thread Simon Glass
Hi Tom, On Tue, 19 Oct 2021 at 08:25, Tom Rini wrote: > > On Tue, Oct 19, 2021 at 08:11:08AM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Tue, 19 Oct 2021 at 08:07, Tom Rini wrote: > > > > > > On Mon, Oct 18, 2021 at 12:13:18PM -0600, Simon Glass wrote: > > > > > > > At present U-Boot enviro

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

2021-10-19 Thread Marek Behún
On Mon, 18 Oct 2021 12:13:18 -0600 Simon Glass wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting and newlines is harder than it > should be. It would be

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

2021-10-19 Thread Tom Rini
On Tue, Oct 19, 2021 at 08:11:08AM -0600, Simon Glass wrote: > Hi Tom, > > On Tue, 19 Oct 2021 at 08:07, Tom Rini wrote: > > > > On Mon, Oct 18, 2021 at 12:13:18PM -0600, Simon Glass wrote: > > > > > At present U-Boot environment variables, and thus scripts, are defined > > > by CONFIG_EXTRA_ENV_

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

2021-10-19 Thread Simon Glass
Hi Wolfgang, On Tue, 19 Oct 2021 at 04:46, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > Can we just ban + ? > > Why? Just because your awk script is a lousy parser? > > > In the above, foo\+ gives an unknown escape sequence from the C > > preprocessor, then the w

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

2021-10-19 Thread Simon Glass
Hi Tom, On Tue, 19 Oct 2021 at 08:07, Tom Rini wrote: > > On Mon, Oct 18, 2021 at 12:13:18PM -0600, Simon Glass wrote: > > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > > to this file and dea

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

2021-10-19 Thread Tom Rini
On Mon, Oct 18, 2021 at 12:13:18PM -0600, Simon Glass wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting and newlines is harder than it > should be. It wo

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

2021-10-19 Thread Wolfgang Denk
Dear Simon, In message <20211018121315.v8.4.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you wrote: > > The environment variables should be of the form "var=value". Values can > extend to multiple lines. See the README under 'Environment Variables:' > for more information and an example.

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

2021-10-19 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > Can we just ban + ? Why? Just because your awk script is a lousy parser? > In the above, foo\+ gives an unknown escape sequence from the C > preprocessor, then the whole line is ignored by the script Really? -> cat foo.c #define A ampersand #define B be

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

2021-10-19 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > Hm... I can't find it right now but did I not also read about other > > restrictions to variable names, like they must noch begin with '_' > > when using this new tool? > > Yes but I took that out (I think in v6). I'll update the commit message. Why exact

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

2021-10-19 Thread Wolfgang Denk
Dear Tom, In message <20211018142404.GR7964@bill-the-cat> you wrote: > > > > Perhaps we should just make "+" an illegal character in the variable > > > name, for consistency? > > > > And break backward compatibility? I'd rather see a better > > definition of the syntax of the environment files,

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

2021-10-18 Thread Simon Glass
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and ha

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

2021-10-18 Thread Simon Glass
Hi Wolfgang, On Mon, 18 Oct 2021 at 05:59, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > I really think your fixed filename proposal does not work well in > > > reality. The file name should be Kconfig configurable. See [1] > > > for details. > > > > > > [1] htt

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

2021-10-18 Thread Simon Glass
Hi Wolfgang, On Mon, 18 Oct 2021 at 08:10, Wolfgang Denk wrote: > > Dear Tom, > > In message <20211018133728.GQ7964@bill-the-cat> you wrote: > > > > > And please see also my comments about changing the autostart > > > functionality for the user. > > > > Perhaps we should just make "+" an illegal

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

2021-10-18 Thread Tom Rini
On Mon, Oct 18, 2021 at 04:10:34PM +0200, Wolfgang Denk wrote: > Dear Tom, > > In message <20211018133728.GQ7964@bill-the-cat> you wrote: > > > > > And please see also my comments about changing the autostart > > > functionality for the user. > > > > Perhaps we should just make "+" an illegal cha

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

2021-10-18 Thread Wolfgang Denk
Dear Tom, In message <20211018133728.GQ7964@bill-the-cat> you wrote: > > > And please see also my comments about changing the autostart > > functionality for the user. > > Perhaps we should just make "+" an illegal character in the variable > name, for consistency? And break backward compatibili

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

2021-10-18 Thread Tom Rini
On Mon, Oct 18, 2021 at 01:58:57PM +0200, Wolfgang Denk wrote: > Dear Simon, > > In message > you > wrote: > > > > > I really think your fixed filename proposal does not work well in > > > reality. The file name should be Kconfig configurable. See [1] > > > for details. > > > > > > [1] https:/

Re: [PATCH v7 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-18 Thread Wolfgang Denk
Dear Simon, In message <20211015183321.v7.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you wrote: > > Add a feature that brings in a .env file associated with the board > config, if present. To use it, create a file in a board//env > directory called .env (or common.env if you want the

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

2021-10-18 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > I really think your fixed filename proposal does not work well in > > reality. The file name should be Kconfig configurable. See [1] > > for details. > > > > [1] https://lists.denx.de/pipermail/u-boot/2021-October/462668.html > > Yes I saw that but I forg

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

2021-10-15 Thread Simon Glass
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and ha

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

2021-10-15 Thread Simon Glass
Hi Wolfgang, On Fri, 15 Oct 2021 at 08:32, Wolfgang Denk wrote: > > Dear Simon Glass, > > In message > <20211014122254.v6.4.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you > wrote: > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTING

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

2021-10-15 Thread Wolfgang Denk
Dear Simon Glass, In message <20211014122254.v6.4.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quo

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

2021-10-14 Thread Simon Glass
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and ha

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-06 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > 1) This requires that the .env files are run through CPP, which is > >only added in a later patch. > > OK perhaps I should just merge the patches. It is a bit artificial > having two and it seems that people agree we need the += syntax. Yes, some way

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-05 Thread Simon Glass
Hi Tom, On Tue, 5 Oct 2021 at 09:52, Tom Rini wrote: > > On Tue, Oct 05, 2021 at 09:33:18AM -0600, Simon Glass wrote: > > Hi Wolfgang, > > > > On Tue, 5 Oct 2021 at 08:56, Wolfgang Denk wrote: > > > > > > Dear Simon, > > > > > > In message > > > you > > > wrote: > > > > > > > > > > Add a feat

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-05 Thread Tom Rini
On Tue, Oct 05, 2021 at 09:33:18AM -0600, Simon Glass wrote: > Hi Wolfgang, > > On Tue, 5 Oct 2021 at 08:56, Wolfgang Denk wrote: > > > > Dear Simon, > > > > In message > > you > > wrote: > > > > > > > > Add a feature that brings in a .env file associated with the board > > > > > config, if pr

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-05 Thread Simon Glass
Hi Wolfgang, On Tue, 5 Oct 2021 at 08:56, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > > Add a feature that brings in a .env file associated with the board > > > > config, if present. To use it, create a file in a board//env > > > > directory called .env (or com

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-05 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > > Add a feature that brings in a .env file associated with the board > > > config, if present. To use it, create a file in a board//env > > > directory called .env (or common.env if you want the same > > > environment for all boards). > > > > This should b

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-05 Thread Simon Glass
Hi Rasmus, On Mon, 4 Oct 2021 at 01:28, Rasmus Villemoes wrote: > > On 02/10/2021 02.38, Simon Glass wrote: > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > > to this file and dealing with quo

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-05 Thread Simon Glass
Hi Wolfgang, On Mon, 4 Oct 2021 at 06:08, Wolfgang Denk wrote: > > Dear Simon, > > In message > <20211001183842.v5.3.If789ba3e2667c46c03eda3386ca84a863baeda55@changeid> you > wrote: > > > > Add a feature that brings in a .env file associated with the board > > config, if present. To use it, cre

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-04 Thread Tom Rini
On Mon, Oct 04, 2021 at 09:28:43AM +0200, Rasmus Villemoes wrote: > On 02/10/2021 02.38, Simon Glass wrote: > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > > to this file and dealing with quot

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-04 Thread Wolfgang Denk
Dear Simon, In message <20211001183842.v5.3.If789ba3e2667c46c03eda3386ca84a863baeda55@changeid> you wrote: > > Add a feature that brings in a .env file associated with the board > config, if present. To use it, create a file in a board//env > directory called .env (or common.env if you want the

Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-04 Thread Rasmus Villemoes
On 02/10/2021 02.38, Simon Glass wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting and newlines is harder than it > should be. It would be better if we co

[PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-10-01 Thread Simon Glass
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and ha

Re: [PATCH v4 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-09-20 Thread Wolfgang Denk
Dear Simon, In message <20210919125937.v4.3.If789ba3e2667c46c03eda3386ca84a863baeda55@changeid> you wrote: > ... > +It is also possible to create an environment file with the name > +`board//env/.env` for your board. If that file is not present > +then U-Boot will look for `oard//env/common.env`

[PATCH v4 3/5] env: Allow U-Boot scripts to be placed in a .env file

2021-09-19 Thread Simon Glass
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and ha