[U-Boot] [PATCH] Allow U-Boot scripts to be placed in a .env file

Otavio Salvador otavio at ossystems.com.br
Wed Apr 24 05:20:45 CEST 2013


On Wed, Apr 24, 2013 at 12:05 AM, Simon Glass <sjg at chromium.org> wrote:
> On Tue, Apr 23, 2013 at 7:44 PM, Otavio Salvador
> <otavio at ossystems.com.br> wrote:
>> On Tue, Apr 23, 2013 at 11:36 PM, Simon Glass <sjg at chromium.org> wrote:
>>> Thanks for the suggestion. But that, along with the need for quotes,
>>> is one of the reasons I would like to provide a way to enter scripts
>>> naturally.
>>>
>>> Adding \ at the end of each line is error-prone and gets in the way.
>>> Python and C don't have this requirement - so why should U-Boot
>>> scripts?
>>>
>>> I wonder if we could define that 'xxx=' at the start of a line
>>> delineates a new variable?
>>
>> The problem with this kind of thing is we might end doing a full
>> parser and doing a semantic interpret of the text. It seems to be way
>> too complex ...
>
> I can do the above with a simple sed script.
>
> Do you mean we might create a new type of parser? If so, then we could
> perhaps use a .scr extension or similar. My idea here is specifically
> for environment.

I fully agree that the environment file should be as easy as possible
to be written. However I also think it should be parsed by CPP or
something which would allow us to 'include' other environment files
and enable/disable parts of it depending on board config. My ultimate
goal with it would be to allow sharing of environment setup across
different boards (for example the Freescale boards).

--
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


More information about the U-Boot mailing list