[U-Boot] [PATCH 5/5] Add env var giving the board revision

Wolfgang Denk wd at denx.de
Sun Aug 12 23:20:13 CEST 2012


Dear =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?=,

In message <383502175.2331918.1344791463023.JavaMail.root at advansee.com> you wrote:
> 
> OK. Actually, the only reason for which I need this patch is to make a variable
> read-only, and the only reason for which you reject it is because you fear that
> it breaks something.
>
> So we could add a config like CONFIG_BOARD_REV_RO_VARIABLE to enable the code in
> my patch. But I think you won't like that either because you will find it too
> specific.

No, this may solve your problem, but will never scale for any real
life use.

> What about adding a config like CONFIG_READONLY_VARS that would be an array
> initializer containing the names of the board-specific variables to make
> read-only? _do_env_set() and fw_env_write() would use it besides the hard-coded
> serial# and the like. That would give something like:
> #define CONFIG_READONLY_VARS {"my_ro_var1", "my_ro_var2", "board_rev"}
> That would be a very simple solution to make everyone happy before Wolfgang
> implements a more sophisticated solution with read-only and volatile flags. What
> do you think?

Please feel free to add this to your local code.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
backups: always in season, never out of style.


More information about the U-Boot mailing list